Live USB – Can I Convert a Live Ubuntu USB to One with Persistent Memory?

live-usbpersistence

I know there are other posts about how to create a live ubuntu usb with persistent memory – HOWEVER, there is no [question / answer] on how to convert a live (ubuntu) usb to one with persistent memory / storage. Is this possible?

Best Answer

Changing Live Pendrive to Persistent Pendrive

This works both with BIOS and UEFI.

Many people prefer a Persistent Pendrive that will save changes;

  • Create a Live Pendrive using Rufus or similar;

  • Boot the pendrive toram to make the drive editable:

    Press Shift when booting; press Esc from Language; press F6; press Esc;

    Type a Space and toram after quiet splash ---, and press Enter.

  • Create a casper-rw file:

    sudo dd if=/dev/zero of=casper-rw bs=1M count=512

    sudo mkfs.ext3 -L casper-rw -F casper-rw

(where count=512 is the persistence size in megabytes, with a max of 4GB).

  • Move the new casper-rw file from home to the root of the Live Pendrive;

  • Add a Space and persistent after quiet splash --- in the following files:

    /isolinux/txt.cfg, (for BIOS boot persistence Rufus);

    /syslinux.cfg, (for BIOS boot persistence UNetbootin);

    /boot/grub/grub.cfg, (for UEFI boot persistence).

  • Shut down and reboot the persistent drive.

It's also possible to turn a Live USB into a Full-Install USB which has some advantages, except it won't install Ubuntu: Can Ubuntu be installed to the pendrive it was booted from?

Related Question