2

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.

6
  • 1
    1. Can you boot the computer from a live-only USB pendrive (made by a tool you mention? A persistent live USB pendrive made by mkusb should boot with the same settings in your UEFI/BIOS menus; 2.You need not tweak Ubuntu or Mint in the USB pendrive except if you have some HP computers, which are not willing to boot from grub with a GUID partition table (gpt). If that is the case, select MSDOS partition table, in one of the windows of mkusb; 3. Have you checked with md5sum that the iso file is correct (no error during the download)? 4. Which versions of Ubuntu and Mint are you trying? – sudodus Sep 22 '19 at 15:53
  • 1
    Do not choose a partition for booting, but the drive or simply USB, whatever can be selected in your UEFI/BIOS system. See also this link – sudodus Sep 22 '19 at 15:57
  • 1
    I have never had to modify a mkusb Persistent install to make it work. A UNetbootin or Rufus install can be made Persistent with partitions as shown thus: ubuntuforums.org/… . A Persistece file, (4GB max), can be added to Rufus or UNetbootin thus: askubuntu.com/questions/1126145/… . Have you considered a Full install to USB? – C.S.Cameron Sep 22 '19 at 16:42
  • @sudodus: Yes boot to live is working. I want to boot it on an Alfawise T1 mini pc. Maybe the GPT could be a problem for the mashine. I tested the same pendrive in my normal pc and i got the "good" grub menu with persistent menu item but the boot was not working after that. I will try the MSDOS partition table in mkusb thanks for idea.I haven't chacked the md5sum yet. I tried the newest version from ubuntu and mint as well. – user998456 Sep 22 '19 at 18:42
  • @C.S.Camero: Yes i tried full install (only with MINT ) as well. I booted the mashine from another usb. It took ca 10 hours. I installed that from an USB2 pendrive to a USB3 kingston. The boot was not working (it changed the boot sector on the main ssd which i can't remove from the mashine so i gave it up for a while) – user998456 Sep 22 '19 at 18:48
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...

12
  • A partition for persistence works when the system is created by mkusb with all current Ubuntu and Linux Mint versions. The news are that it will be much easier with 19.10; it will work with most boot structures and tools to create USB boot drives, even cloned drives, where you can create a partition for persistene 'behind' the cloned data. See this link. – sudodus Sep 23 '19 at 5:56
  • 1
    @sudodus, did you read what I wrote above? Rufus can already create live drives with a persistent partition if you use Debian 10 or Ubuntu 19.10. There's no need to release a new version for that, it's already there. – Akeo Sep 23 '19 at 11:29
  • Also, whatever workaround mkusb might use to set up persistence (I can guarantee that if it works, then they aren't following the standard expected method of creating a casper-rw ext partition and adding persistence to the kernel options, because if they were doing that, they would absolutely run into the casper issue), that doesn't invalidate that bug #1489855 is very real and currently affects all Ubuntu derivatives. This is a major bug that must be fixed by Linux distros and that utilities that create live USBs with persistence should not have to work around. – Akeo Sep 23 '19 at 11:32
  • 'Rufus can already create live drives with a persistent partition': When I get my Windows computer unpacked after moving to a new city, I intend to test Rufus and persistence with 19.10 :-) – sudodus Sep 23 '19 at 12:14
  • I have seen more threads, where I think users are tempted to use Rufus to create a persistent live drive from versions of Ubuntu, where it does not work because of that major bug. Please consider adding a warning about it or some logic, that will allow it only for versions of Ubuntu, Debian ... and derivatives, where we can expect it to work (Ubuntu 19.10+ and Debian 10+). I think this would be good both for Rufus and for the affected linux distros/versions. – sudodus Sep 24 '19 at 11:10
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.

1
  • 1
    +1. Starting with Ubuntu 19.10, persistent partitions can be added to UNetbootin and Rufus and also to cloned drives (e.g. by Start up Disk Creator) – sudodus Sep 25 '19 at 9:51
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.

2
  • I had already formatted the pendrive to Fat32. – Alex Watson Jan 27 '20 at 11:59
  • If you have a big USB pendrive it is an advantage to have a partition for persistence instead of a file for persistence because the file size (in FAT32) is limited to 4 Gibibytes. If I understand correctly, Mint 19.x cannot use the new sinpler method to use a partition for persistence, and then mkusb is a good choice, but it means that you have to run Ubuntu or Debian or a Linux distro derived from them. For example, you can install mkusb into your current USB pendrive and use it to create a persistent live system with a big partition for persistence in another USB pendrive. – sudodus Jan 27 '20 at 12:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.