[Tutorial] Live usb with persistence over 4GB

Write tutorials for Linux Mint here
More tutorials on https://github.com/orgs/linuxmint/discu ... /tutorials and (archive) on https://community.linuxmint.com/tutorial
Forum rules
Don't add support questions to tutorials; start your own topic in the appropriate sub-forum instead. Before you post read forum rules
pbear
Level 16
Level 16
Posts: 6569
Joined: Wed Jun 21, 2017 12:25 pm
Location: San Francisco

Re: [Tutorial] Live usb with persistence over 4GB

Post by pbear »

This came up in a couple of threads recently, so I decided to give mkUSB a whirl. Having done it both ways, I'd say they're pretty similar in terms of difficulty. And both work. On the whole, though, I agree with Spearmint2 that mkUSB is a better choice. Was developed by senior Ubuntu guru sudodus (Nio Wiklund) to do precisely this task and is now on version 12 ("dus"). Also, unlike MultiSystem, mkUSB can be installed to a live session, making this the only feasible method of which I'm aware to create a persistent Linux drive greater than 4 GB with a Windows machine.

Anyhoo, Linux is all about choice. As this is a tutorial, I thought it would be helpful to jot down the steps. Here is the path I found works best.

1. Install app. There are several options, but this is adequate for a single user looking for the current version:

Code: Select all

sudo add-apt-repository ppa:mkusb/ppa
sudo apt-get update
sudo apt-get install mkusb usb-pack-efi
2. Install to USB. Start app from Menu: System Tools (or type mkusb in Terminal), then select option “d” (for 12). Enter sudo password. Acknowledge overwrite warning. Select install, then ‘Persistent live’. Navigate to select source ISO; select target drive from list; “Use defaults” for drive settings. Select % of remaining space for persistence (I use 95%). Read warnings. Double check installation target. Hit “Go”. Confirm proceed even though not installing Ubuntu. For a nice walkthrough with screenshots, see answer by user Harsh halfway down this askubuntu page, starting with “I would like to expand on the answer … “.

3. Cleanup. The reason I only use 95% of the remaining space for the persistent partition is that I want to leave room for wear leveling. Quit mkUSB, open GParted and delete the usbdata partition on the USB drive (space becomes unallocated). Also, sudodus doesn't mention anything about not mounting the persistent partition, but I follow Laurent85's advice and disable automount for an mkUSB persistent drive (for "how to" in Mate, see here).

That should work for most folks. For more information, see official website (same link as Spearmint2 gave above), especially the discussion of persistence, the Quick Start Manual, and an omnibus thread on the Ubuntu Forum. See also Linux Uprising, DebugPoint and How-To Geek.

BTW, a large persistent drive has useful applications, but I still think the better solution for most situations is full install to USB hard drive.
Last edited by pbear on Wed May 30, 2018 6:29 pm, edited 1 time in total.
tanguero

Re: [Tutorial] Live usb with persistence over 4GB

Post by tanguero »

Spearmint2 wrote: Mon Dec 04, 2017 4:55 pm I refer you back to my post. The newer 64 bit versions won't do persistent partitions anymore, not with the programs used to create such before, only a casper-rw persistent file in the same FAT32 partition as the isofs is located.
viewtopic.php?f=42&t=229086&sid=766b8f2 ... d#p1245355
Still true for LM 19.2 owing to the casper bug documented at https://bugs.launchpad.net/ubuntu/+sour ... ug/1489855

However, I discovered emperically that the problem only manifests itself if the USB is formatted as FAT32 (where, as Spearmint2 says, you cannot use a persistent partition, just a persistent file in the same partition with its 4 GB limit.

If the USB is formatted as NTFS, the persistent partition DOES work (notwithstanding that the original bug report doesn't mention FAT32 vs. NTFS as being a factor).
pbear
Level 16
Level 16
Posts: 6569
Joined: Wed Jun 21, 2017 12:25 pm
Location: San Francisco

Re: [Tutorial] Live usb with persistence over 4GB

Post by pbear »

The bug is well known. Both methods described in this tutorial work notwithstanding. Only place I've run into the Fat32 vs NTFS distinction is PenDrive's UUI (for Windows), where the latter works with a casper-rw partition in BIOS (but not UEFI). On the bright side, going forward, the bug reportedly was fixed with Ubuntu 19.10, so version 20.04 should be okay and that will be the foundation for LM20.
tanguero

Re: [Tutorial] Live usb with persistence over 4GB

Post by tanguero »

pbear wrote: Wed Apr 01, 2020 9:32 am The bug is well known. Both methods described in this tutorial work notwithstanding. Only place I've run into the Fat32 vs NTFS distinction is PenDrive's UUI (for Windows), where the latter works with a casper-rw partition in BIOS (but not UEFI). On the bright side, going forward, the bug reportedly was fixed with Ubuntu 19.10, so version 20.04 should be okay and that will be the foundation for LM20.
Using Rufus on Win 7 Pro, with FAT32 filesystem creation of the 64-bit Linux Mint 19.2 USB definitely did not work. The live USB created fine, but on booting (Legacy) I got the message "mounting /cow on root failed: Invalid argument" message, and researching led me to finding out about the above-mentioned (not well-known to me!) bug and its workarounds.

And in fact, repeating the installation via Rufus using NTFS absolutely did work just fine. So I definitely have this as another example of FAT32 vs. NTFS distinction related to the bug, at least in Legacy BIOS.

I had seen that it had been fixed in Ubuntu 19.10, but didn't know the correlation to Mint versions, so thanks for that info!
pbear
Level 16
Level 16
Posts: 6569
Joined: Wed Jun 21, 2017 12:25 pm
Location: San Francisco

Re: [Tutorial] Live usb with persistence over 4GB

Post by pbear »

So, you assumed the methods described in the tutorial don't work because some other method doesn't?
You're new, so I'll pass on further comment.

As for Rufus, it's discussed on the site's FAQ.
tanguero

Re: [Tutorial] Live usb with persistence over 4GB

Post by tanguero »

Actually, I shared my experience with what worked for me and what didn't, which is correct (and indeed much more responsive to the thread title than your last sulky comment).

Not sure why you went off on a tangent and got all defensive over what is ultimately your own mistaken and pretty bizarre inference that "the methods described in the tutorial don't work" (I made no such reference and besides, it's not even your post).
pbear wrote: Wed Apr 01, 2020 6:11 pm You're new, so I'll pass on further comment.
Well, "Level 11" (ooh ...) users can learn things from "Level 1"' users too. In this case, that the purpose of a forum is to share information and help other users, not to be condescending (especially when ... umm, never mind ...). Maybe Linux Mint, to which indeed I am new, is not as user-friendly as it's reputed to be after all.
pbear
Level 16
Level 16
Posts: 6569
Joined: Wed Jun 21, 2017 12:25 pm
Location: San Francisco

Re: [Tutorial] Live usb with persistence over 4GB

Post by pbear »

Yes, I know. You figured out something and want to share it with the world. I'm pointing out to anyone who comes upon the tutorial that this already had been figured out. Moreover, once Ubuntu 20.04 is released (and, later, LM20), Rufus can be added to the list of solutions.

Have a nice day.
User avatar
Spearmint2
Level 16
Level 16
Posts: 6900
Joined: Sat May 04, 2013 1:41 pm
Location: Maryland, USA

Re: [Tutorial] Live usb with persistence over 4GB

Post by Spearmint2 »

I ran into a similar problem between FAT32 and NTFS recently, since my wife needed her laptop upgraded from W7 to W10 for using their secure server's VPN software from her government office which wouldn't install on W7. I downloaded the 5.4 GB W10 ISO, and kept getting some "File Split Error" when trying with Archive Manager to just copy the files onto a USB flashdrive out of the ISO. The flashdrive was FAT32. On a hunch I formatted the USB flashdrive to NTFS, and then Archive Manager copied the files just fine onto the flashdrive. Only then was I able to upgrade her W7 to W10, while keeping her Office 2013 on it during install, for her "work at home" requirement during this coronavirus situation.
All things go better with Mint. Mint julep, mint jelly, mint gum, candy mints, pillow mints, peppermint, chocolate mints, spearmint,....
User avatar
Peter Linu
Level 7
Level 7
Posts: 1869
Joined: Sun Nov 11, 2018 8:24 pm
Location: Sinny, Straya

Re: [Tutorial] Live usb with persistence over 4GB

Post by Peter Linu »

Hi Laurent,
Will this tutorial work with Cinnamon 20.3? or
Is there a superior way to do persistence these days?
Cinnamon 21.3 Thinkcentre M920Q + 2 Thinkpad T440p (modded) + Lenovo Y50-70 (all have VBs) + 2 PC NAS drives w XFCE21.2 + Q4OS-32bit on ASUS Atom (2011) + Asus UX305F-64bit
Post Reply

Return to “Tutorials”