Blog

Resize your casper-rw file (ubuntu persistent file) from Windows

Thursday 27 September 2012 - Be the first to comment

Resize your casper-rw file (ubuntu persistent file) from Windows

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:

  1. Cygwin for Windows
  2. Binaries (dd, e2fsck, resize2fs)
  3. Your uBuntu installation on USB
  4. 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:

resize2fs f:\casper-rw

Written by Fadli Saad in the category Ubuntu tags: .

Comments

wrote

Great post, I admire the writing style :) A little off topic here but what theme are you using? Looks pretty cool.

Comment