Ubuntu – Xubuntu live usb persistence – how to

live-usbpersistencexubuntu

I'm using Xubuntu 13.04 from live usb.

I know that in order to be able to keep files/settings/etc after restart, USB live disk should be created with some storage reserved.
However since I got this USB from a friend who created installation, I don't know if he reserved any space, and so my questions are:

  • How can I find out amount of space reserved (if any)?
  • If no space is reserved, can I manually chose USB/HDD location to store my settings in order to be able to boot into them the next time I log on?

I'm currently running a very long session and it would help me if I could somehow be able to store my settings (firefox, apt-gets, xrandr screen conf. … ) to not have to do it again after I reboot.

Thanks,

IR

Best Answer

If your settings and files are not saved when you reboot, you do not have persistence enabled.

You can either make a new Flash drive. This may be easiest as there are graphical tools to do this for you ("install" the iso to the flash drive and enable persistence).

See: https://wiki.ubuntu.com/LiveUsbPendrivePersistent#Live_USB_creator_.28GUI-based.29

Alternately you can manually enable persistence. You can do this either by making a file or partition named "casper-rw". I think making a file would be easiest.

First, mount the flash drive at say /mnt

sudo mount /dev/sda1 /mnt

then make a file, change the count to increase the size:

dd if=/dev/zero of=/mnt/casper-rw bs=1M count=128

mkfs.ext4 /mnt/casper-rw

Then reboot, at the boot screen add the work "persistent" to the boot options.

See https://help.ubuntu.com/community/LiveCD/Persistence#Using_a_Loopback_File for details.

Related Question