I've just installed Ubuntu 12.10 on a stick. I set the persistent size to 1GB, which later seem not enough IF you want to upgrade your installation. So I decide to resize my system file (casper-rw) in the USB stick using Windows (this was done on Windows 7 64-bit) but it should serve the same for all the others version.
First up, you need Cygwin (a Linux environment inside Windows). There are several tools available on the internet but none of it works, so I decide to use Cygwin. It pretty simple and straight forward actually. So these are the requirement:
- Cygwin for Windows
- Binaries (dd, e2fsck, resize2fs)
- Your uBuntu installation on USB
- a Windows-based PC
First, you need to extend the image file to the desired size. If you want increase the size from 500MB to 1.5GB, you'll need to add 1000MB of zeroes to the end of the file. Please note in Windows we need to specify the location of the file using forward slash '\'
dd if=/dev/zero bs=1M count=1000 >> f:\casper-rw
Next, you need to verify the step with these command:
e2fsck -f f:\casper-rw
Finally, do the resize so it will cover the entire system file: