Sunday 24 April 2011

How to change the size of the persistence in Ubuntu Live on a USB pendrive

  1. Load linux from elsewhere (any where except from the USB drive itself).
  2. Mount the pendrive
  3. go into the root of the pendrive
  4. There should be a file called casper-rw here.
From a shell, run these commands in the directory

NOTE: dd is a very powerful tool, make sure you run this command exactly as it is, otherwise you could corrupt important files on your main hard disk.

In this example you can see that the byte size (BS) is 1 million (megabyte) and the count is 1024. So thats 1gb extra. Change the count according to how much you want to extend the persistence on your drive.

dd if=/dev/zero bs=1M count=1024 >> casper-rw
e2fsck -f casper-rw
resize2fs casper-rw

Hopefully all went well, and you should now be able to restart and boot off your now-larger persistent live USB. If you have any errors, you know where to look.

No comments:

Post a Comment