3

When I boot my laptop using my live-usb, and then change the settings (e.g. desktop wallpaper) and then reboot, the settings go back to default. How do I make the live-usb save the settings?

2 Answers2

3

By default, Ubuntu live-USB doesn’t keep settings, and data after system restart, since its read-only. In order to have settings and data saved you need to create a persistence USB drive.

To do that click Here or Here

Mitch
  • 107,631
  • Thanks for the answer, Mitch! When I first used the Live-USB creator, it gave me an option to allot memory for persistence and I did, yet it still doesn't save the settings.. – captainawzm Apr 19 '13 at 12:25
2

With a typical persistent install changes are stored in a file named casper-rw.

Maximum size of this file is 4GB due to the limits of the FAT file system.

You can also have persistent ext2, 3 or 4, partitions named casper-rw and home-rw, of any size that will fit the drive.

Casper-rw stores your downloaded programs and home-rw stores your settings, email and downloads, etc, (but is optional).

Once the casper-rw file or partition exists, the session can be made persistent by pressing F6 on boot and then typing persistent.

This can be automated by editing syslinux.cfg or text.cfg and adding the word persistent.

I prefer to overwrite the contents of syslinux.cfg with the following:

default persistent
label persistent
  say Booting an Ubuntu Persistent session...
  kernel /casper/vmlinuz
  append  file=/cdrom/preseed/ubuntu.seed boot=casper persistent initrd=/casper/initrd.lz quiet splash noprompt --

This has the advantage of removing the Try/Install screens and reduces boot time by 30%.

C.S.Cameron
  • 19,519
  • Thanks for the answer, C.S.Cameron, but do you think you can explain this in a way a typical high school student would understand? – captainawzm Apr 21 '13 at 08:09
  • @TheInvisibleGirl, there are several current descriptions of how to create a persistent live drive, both using tools, that do it more or less automatically, and doing it yourself with commands, that helps you understand what happens. See this link: tools and that link: do it yourself to get more details. – sudodus Jan 02 '20 at 00:10
  • @sudodus do you know some kind link to PROPERLY convert a live USB thumbdrive with on it Ubuntu 20.04 created with e.g. rufus to a persistent one? Thank you. I mean convert, so the thumbdrive is already existent – Robert Jan 06 '21 at 11:54
  • I think it is easier and fast enough to start from the beginning from the iso file compared to converting from an already created live-only drive to a persistent live drive. But yes, it is possible to convert too. You can create different kinds of live drives with Rufus, and depending on the kind, you need different methods to make it persistent live. – sudodus Jan 06 '21 at 12:16
  • A standard Rufus-mode drive is a live drive with a FAT32 partition, and you can 1: create a file with the name casper-rw or writable and size max 4095 Mibibytes, and create an ext2, ext3 or ext4 file system in it; or 2: shrink the FAT32 partition and use the created unallocated drive space for a new partition with the label casper-rw or writable and create an ext2, ext3 or ext4 file system in it. This method lets you use more space for persistence, not limited to 4095 Mibibytes, only limited by the size of the drive (drive size minus space occupied by the operating system). – sudodus Jan 06 '21 at 12:28
  • @Robert, To make the conversion complete you must also edit the file grub.cfg: add the word (boot option) persistent near the end of the line starting with linux: Like this: linux ... persistent --- where ... is actually a lot of text (boot options) for booting in UEFI mode and the method in the answer (by C.S.Cameron) for booting with syslinux in BIOS mode. – sudodus Jan 06 '21 at 12:43
  • @Robert, As you can see, there are several steps in the procedure to convert from a live-only to a persistent live drive, and there are several ways it can fail. So I can only recommend it for learning. If you want to create a persistent live drive as quickly as possible, I recommend that you use one of the tool/methods that start from the beginning and create a persistent live drive from an iso file and overwrite whatever happens to be stored on the USB drive. – sudodus Jan 06 '21 at 12:50
  • @Robert Changing Live Pendrive to Persistent Pendrive https://askubuntu.com/questions/1126145/can-i-convert-a-live-ubuntu-usb-to-one-with-persistent-memory – C.S.Cameron Jan 07 '21 at 01:23