4

I'm currently running Ubuntu as a Live USB on a PC which also has Windows installed. However, I've discovered that updating or messing around with the kernel doesn't seem to do great things with the Live version and so after seeing it didn't boot anymore ended-up having to reformat the USB and then start again. Obviously I save all files on a different drive, but I realized that it would be a good idea in future to have a backup of the settings and installed programs and other Ubuntu-specific things to save the hassle in case it happens again.

It occurred to me that instead of using a program to backup only a certain part, considering that the persistence is only 4GB, I could just go into Windows and backup the contents of the entire USB to another drive, say, on a weekly basis, and then if I found it became corrupted or didn't boot for some reason, (assuming it was an issue with the data rather than the MBR) I could go back into Windows and copy the entire contents of the backup to overwrite the data on the USB drive, thereby having what would hopefully be an uncorrupted, but relatively up-to-date fresh version of Ubuntu again, without having to go through the process of reinstalling programs, changing settings, etc.

My question is ... would this very primitive method work? I'm wondering whether there are other aspects of the Live USB system itself which would detect that everything had been replaced. I can't think of anything specifically that might become a problem, but I just want to make sure because obviously otherwise it's not going to be a very useful form of backup! Any assurance or advice would be very appreciated, and please don't laugh at my distinctly string-and-paper approach to technology!

4 Answers4

2

You need not copy the entire contents of the USB drive. Just copy the casper-rw file to the computer as a backup.

casper-rw is the name of the file where the Live USB stores persistent information.

The next time you need to create a USB drive with the same settings and applications, create a live USB using uNetbootin or any other program and copy your backed up copy of casper-rw to it.

0

You can also use the gnome-disks utility, select the drive and on the tree dot menu select Create Disk Image..." Gnome Disks

0

If you create your persistent live drive with mkusb, and use the dus-persistent method, there are shellscripts to use in order to back up the whole partition for persistence or only the home directory. (The home directory is more robust, can be ported to new versions of the same flavour of Ubuntu, and is also less sensitive to corruption than some other parts of the Ubuntu system.)

The shellscripts backup and restore are modified to manage not only the old label casper-rw but also the new label writable for the partition for persistence.

See the following links,

sudodus
  • 47,684
0

You can not just add casper-rw to a Live, (non persistent), install of Ubuntu and expect persistence.

You can make this method work if you press F6 at boot and add " persistent", (That is -space-persistent), to the menu after "quiet splash --". You need to do this every boot.

Or

You can make a Persistent install using Startup Disk Creator or UNetbootin and replace the casper-rw file with the new one.

Or

Depending on the installer, you can edit, syslinux.cfg or loopback.cfg or txt.cfg in a Live, (non-persistent), install and add " persistent" after "quiet splash --".

C.S.Cameron
  • 20,530
  • 12
  • 78
  • 125