3

I would like to create an Ubuntu live usb with persistence. With Linux Tails it was working well for me without problem but for Ubuntu and Mint I have some problems.

I tried to use rufus, unetbootlin and so on from Windows and mkusb from Linux.I always ended up with the following:

I have a casper-rw partition which is not writable after boot by default (after chmod777 it is writeable). When I am booting in grub I never see persistence in the parameter list (on partition 4 -  see partition description little later). I tried to add it there but system become unstable and haven't saved any changes I made like it is a live boot.

Last time I used mkusb. It looks that everything went OK (there were no errors in the console). I see new2 boot options in the BIOS.

bios picture

If I choose the partition 3 than it does nothing, only black screen and nothing happens. If I boot with the partition 4 than I can see a "usbboot" partition as partition 3. On that I see a grub.cfg which looks good, there is persistence and so on in the file. 

Gparted info about pendrive

If I choose the partition 4 for boot than it boots without any persistent (looks like this is the live usb image)

Can you please help me to fix this issue?

Do I have to activate persistence storage somehow like in the TAILS Linux? If you need any further details please let me know.

Kevin Bowen
  • 20,055
  • 57
  • 82
  • 84
user998456
  • 33
  • 1
  • 1
  • 3

3 Answers3

2

Adding Persistence Manually

UNetbootin: Add casper-rw file to USB root. Edit syslinux.cfg, adding a space and the word persistent to default boot, thus: "...splash --- persistent".

Rufus: Add casper-rw file to USB root. Edit /isolinux/txt.cfg, (for BIOS boot persistence) and /boot/grub/grub.cfg, (for UEFI boot persistence), thus: "...splash --- persistent".

Start up Disk Creator uses a write only ISO9660 file system which takes up the whole drive and GParted can't modify. Persistence is not possible.

Mkusb Live installs also use ISO9660 file system, (which GParted won't modify), however mkusb can be downloaded to the Live USB and used to turn the Live USB into an excellent Persistent drive that uses casper-rw partitions of unlimited size.

To 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 persistence size, with max size = 4GB).

Starting with Ubuntu 19.10, persistent partitions can be added to UNetbootin and Rufus and also to cloned drives.

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

If you use a casper-rw persistent partition on the same drive you're booting from with anything but (the yet to be released) Ubuntu 19.10, you're going to be screwed because of Ubuntu/casper bug #1489855. And I'm afraid that, since Mint is a derivative of Ubuntu, it suffers from the same casper bug. At this stage, I'm not aware of any distro having backported the fix for #1489855 into an updated release.

So here's what I would recommend:

  • Download the latest daily-live of Ubuntu 19.10 and use that with Rufus 3.8 or later. It should work just fine for persistence (source: I am the developer of Rufus, and I have tested it fairly extensively to make sure that it does work).
  • Use Debian or a Debian derivative that doesn't use casper-rw for persistence. For instance, there again, Debian Live 10.x should work just fine for persistence with Rufus 3.8 or later.
  • Wait until the Mint distro maintainers pick the casper fix and produce a release that is not plagued by bug #1489855 and can therefore properly support persistent partitions.

I spent a lot of time ensuring that Rufus can automate the hard work for you (again, provided that the distro you use isn't plagued with a major bug with regards to persistent partition support), and you indicated that you tested Rufus. So you might as well let it sort your issue for you, by using it with an ISO that actually has a chance to work...

Akeo
  • 1,610
1

I am new to Linux and attempted to set up a live usb with perstence on Win 10. Here's my journey.

Tried various usb creators but found the only one to work was Linux Live USB Creator (LiLi).

Using Mint Cinnamon Tricia 19.3 Went through the setup procedure with LiLi and finalised the installation.

Booted from the usb pendrive and everything worked as it should including persistence.

Update manager needed updating, did that and refreshed the repositries. Updated everything and after reboot had a boot failure. (Doh!)

Went through the whole procedure again but this time when updating the software, I deselected anything to do with Kernel, Grub and Firmware.

Rebooted and everything worked fine.

So when updating DO NOT update the Kernel, Grub or Firmware. Otherwise you will have further work to do in terminal to get a recovery.

Hope this is helpful to Newbies like me.