Minimal or Dynamically expading storage?

Help
bl 102
2011-01-16
2013-04-23
  • bl 102
    bl 102
    2011-01-16

    Portable_Ubuntu_TRES.exe

    I don't want to use OpenOffice, Ubuntu Help, Evolution… I removed all, but .img file size is > 3GB. Can I RESIZE or REPLACE (xubuntu, kubuntu) img file?

    Thanks in advance :)

     
  • PionNegru
    PionNegru
    2011-01-30

    To resize your ubuntu image use toporesize. google it.

     
  • eadmaster
    eadmaster
    2011-02-07

    If i aint wrong, TopoResize will just shrink the image, thus reducing the available free space.
    For Dynamically expanding storage we need something like qcow image support…

     
  • Charles Lahlou
    Charles Lahlou
    2011-03-11

    Resize your partition - The tutorial that doesn't work

    I wanted to resize, because after successfuly found the password and unactivated the black screen, tried a few applications, i wanted to upgrade… but upgrade ask me 20MB more of free space that i had. So the idea to expand my virtual disk.

    In order to resize your ubuntu virtual disk, you need to first resize the file itself, then resize the partition into it

    Toporesize theoricaly does the job, but practicaly it only resizes the file.

    So, use it anyway - it has a GUI and no particular configuration
    1) download and extract http://csemler.com/toporesize-0.7.1.zip
    2) run toporesize.bat
    3) select your ubuntu image file, for TRES distribution it's in pubuntu\images\rootfs.img
    4) you can shrink or expand, just choose the new size with the slider
    5) press "resize file" button

    First step is done, you can check the new size of rootfs.img
    now you can restart pubuntu, you will see if you click on menu
    Places->Computer, one icon FileSystem : this is like the C: drive in windows
    But if you right-click on properties, you'll see that Free space is still the same (1.1Gb in my case)

    So, you need to download a partition manager. There is apparently qtparted and gparted.
    Go to menu Applications->Accessories->Terminal
    Type sudo apt-get install gparted
    If a password is required, type 123456 (with SHIFT or KEYPAD, not CAPSLOCK)
    At this point i had an error. If you experience the same, Quit terminal window, then restart it, then retype sudo apt-get install gparted

    Gparted: no device found…
    Spent half an hour on the net to try to find workarounds.. understand nothing
    Tried to install qtparted = Invalid operation
    Now pubuntu takes 90% of my cpu for the last hour, every dialog box takes 1 minute to display
    I'm a bit fed up, i'll start from scratch installing ubuntu 10.10 on a virtual machine, hope i'll have more success

    Congratulations anyway for your efforts and brillant idea but i really think pubuntu is not made for windows users like me. Not yet. Sigh.

     
  • John Cowan
    John Cowan
    2011-03-11

    Actually, you don't need to use any partition editor after toporesize, just fsck.  Do "sudo e2fsck -y" from the console window (click on the tray icon to make the console window visible) and DON'T TOUCH LINUX until it's finished.  You will get warnings about how this is unsafe, but it is in fact safe in these circumstances ONLY.  When e2fsck completes, your disk will have its full size as shown by "df".  To hide the console window, click on the tray icon again; if you close it, Linux will shut down.

     
  • nateddgg
    nateddgg
    2011-03-13

    I also have been trying to resize my portable ubuntu remix to be bigger.
    i wanted to make the 3gig into a 7gig.
    I used toporesize to make my roots.img 7.3g, but like skyrl said it doesnt change ur stats in "df"
    I then tryed johnwcowans advice and do "sudo e2fsck -y" .. but that is not enough paramaters.
    I dont want to nuke my other drives lol .. how do u use the e2fsck correctly to make my changes visiable inside ubuntu.
    thx

     
  • John Cowan
    John Cowan
    2011-03-13

    Sorry, I should have been more explicit.  The command line in full is:

    sudo e2fsck -y /dev/cobd0

     
  • nateddgg
    nateddgg
    2011-03-13

    well after running sudo e2fsck -y  /dev/cobd0 my ubuntu wont boot up anymore lol
    it says my fstab has a error on line 9 and to run fsck by itself. which i do but it just crashes out to root console.
    Im afraid ima have to redownload a fresh install again i guess.
    Has anyone had any success in making there ubuntu portable remix image Larger?
    Or even has anyone had any success in mounting a 2nd image maybe and mounting /usr/ and /var in it

     
  • nateddgg
    nateddgg
    2011-03-14

    so i found an earlier post of urs johnwcowan at http://sourceforge.net/projects/portableubuntu/forums/forum/858610/topic/3858295
    and it seemed to do the job great.  I think using the command line tfile.exe instead of the GUI is what made it work, anyways heres quick way to resize ur image

    1> In linux -> sudo halt

    2>  Download the Colinux Image Tools from [http://csemler.com/toporesize-0.7.1.zip. If that doesn't work, other links can be found at http://colinux.wikia.com/wiki/ColinuxImageTools. Unpack the ZIP file in any convenient windows directory.

    3>  In Windows run at command prompt > tfile …\images\rootfs.img n
    Such as for me it was>>   tfile d:\temp\Portable_Ubuntu_TRES\images\rootfs.img 8136
    That gave me a 8gig file

    4> Restart Linux and do >  sudo resize2fs /dev/cobd0
    This took about 1min to finish

    5> In Linux > du -h /
    Not sure what this did but i typed it to ^^

    Anyways new image seems to reboot and start no problems. pretty stoked. thanks again
    ](http://csemler.com/toporesize-0.7.1.zip)

     
  • Carlos
    Carlos
    2011-05-11

    The method described in post #9 works

    Thanks johncowan & xeener!

     
  • J. McHugh
    J. McHugh
    2011-10-28

    ::5> In Linux > du -h /
    :Not sure what this did but i typed it to ^^

    I know that this is a late reply, but I'm guessing that that should be:

    >df -h /

    That will tell you the size of the partition mounted at / (the filesystem you just re-sized).