[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
Laurent85
Level 17
Level 17
Posts: 7081
Joined: Tue May 26, 2015 10:11 am

[Tutorial] Live usb with persistence over 4GB

Post by Laurent85 »

Thanks to phd21 who suggested Multisystem as a working alternative.

Follow this tutorial to create a Live usb flash drive with persistence on a separate partition, allowing persistence over the 4GB FAT32 file size limit.

Benefits of persistence and separate partition over full installation:
  • persistence not limited to 4GB (on par with full installation)
  • compressed Live image, the gain is around 2,6GB disk space, allowing the use of a 8GiB usb flash drive
  • non persistent Live session still available, can be handy in some situations
  • read only base image, persistence can be reset without reinstalling, boot a Live session to backup your /home data and personal settings, then reformat casper-rw.
Install Multisystem:

Code: Select all

sudo apt-add-repository 'deb http://liveusb.info/multisystem/depot all main'
wget -q -O - http://liveusb.info/multisystem/depot/multisystem.asc | sudo apt-key add -
apt update
apt install multisystem
Usb flash drive partitionning, using gparted create:
  • a 2GB FAT32 partition for Multisystem and Linux Mint iso image. Multisystem can offer to boot any iso image, so you are free to decide a larger FAT32 partition to install more iso images.
  • an ext2 partition labelled casper-rw lowercase for persistence. ext2 filesystem is fast and has lower workload over ext4, so should be sufficient for such usage. You can format to ext4 if you prefer.
img1.png
Create Live usb with persistence:
  • insert the usb flash drive, Linux Mint should mount available partitions automatically. If you configured Linux Mint to handle removeable drives differently then mount the FAT32 partition (click on said partition).
  • launch Multisystem and select usb flash drive partition to use. On first launch Multisystem will initialize the partition, follow the steps suggested regarding the label and grub.
  • from main screen install Linux Mint iso image
  • click the eye icon to make appear advanced options
  • left click linuxmint-18-cinnamon-64bit.iso, then press the pen icon to edit boot options.
    img2.png
    Left click iso image entry and enter option persistent, press Backup button to save boot options.
    img3.png
    Note that for an unknown reason when returning to boot options persistent does not appear but was properly saved.

    You can check if necessary:
    select Menus tab > GRUB settings > grub.cfg > search for word persistent
    Should appear line starting with linux (loop)/casper/vmlinuz persistent...
Done.

Tips:
To launch a Live session from flash drive, on startup from Multisystem screen edit Linux Mint entry and remove persistent parameter.

Nemo automatically mounts casper-rw partition. When persistence in use, casper-rw should not be considered as a removeable media, hence not mounted as is. You can change this behavior in Nemo Preferences > Behavior > unselect Automatically mount removable media.

Use Multisystem to create multi boot usb flash drives.

Multisystem also offers to enable persistence by creating a casper-rw file container up to 4GB on the FAT32 partition.
Last edited by Laurent85 on Thu Nov 02, 2017 5:50 am, edited 1 time in total.
Image
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 »

persistent partitions quit working after 17.2 unless someone fixes a bug in the newest casper which is in 17.3, where you can ONLY use a persistent file and limited to 4GB.
All things go better with Mint. Mint julep, mint jelly, mint gum, candy mints, pillow mints, peppermint, chocolate mints, spearmint,....
phd21
Level 20
Level 20
Posts: 10103
Joined: Thu Jan 09, 2014 9:42 pm
Location: Florida

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

Post by phd21 »

Hi Everyone, "Laurent85", and "Spearmint2",

Nice tutorial "Laurent85".

I have been making "Persistent" USB flash drive sticks that work well for years in Linux Mint 17.3 and now in Linux Mint 18.1. In fact just a little while ago I created a bootable USB flash drive stick with Linux Mint Cinnamon 18.2 (64-bit) using MultiSystem in Linux Mint 18.1 KDE on a 16gb USB flash drive stick, see screenshot below. In fact, I am running on that right now while writing this reply. Even after installing all the Linux Mint updates, and installing a whole bunch of stuff, I still have 10gb of space left.

FYI: Make sure you have a good USB flash drive stick, check it for errors. I had a lot of trouble recently testing USB sticks because my 8gb USB flash drive stick that I use for testing was wearing out, actually wore out after 3-4 years, and I did not realize it until today.

I have been using "MultiSystem" for most of them, but "Unetbootin" is easy to use and works well for creating "Persistent" USB flash drive sticks with up to 4gb (4000mb) of persistent space. Obviously, I have also been using MultiSystem for creating USB flash drive sticks with over 4gb of "persistent" space.
phd21 wrote: Another post on this...
http://forums.linuxmint.com/viewtopic.p ... 7&t=211217

Re: More than 4gb persistence [SOLVED] - The last reply has the information on how to create this.
viewtopic.php?f=46&t=219126&hilit=multisystem
Hope this helps ...
USB_Stick_with_Persistence_LinuxMint_Cinnamon18-2_1.jpg
USB_Stick_with_Persistence_LinuxMint_Cinnamon18-2_3sm.jpg
Phd21: Mint 20 Cinnamon & xKDE (Mint Xfce + Kubuntu KDE) & KDE Neon 64-bit (new based on Ubuntu 20.04) Awesome OS's, Dell Inspiron I5 7000 (7573) 2 in 1 touch screen, Dell OptiPlex 780 Core2Duo E8400 3GHz,4gb Ram, Intel 4 Graphics.
bobk1948

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

Post by bobk1948 »

I tried this tutorial, followed the steps as carefully as possible, and was able to produce a bootable, persistent USB 8 Gbyte medium for Linux Mint 18.1. I also tried to use a 1TB USB-mounted hard disk, but it wouldn't work on that. I will try doing it on various other USB thumbdrives.
Thanks very much for posting this!
User avatar
pcfan5
Level 5
Level 5
Posts: 563
Joined: Tue Sep 06, 2016 10:57 am
Location: Argentina

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

Post by pcfan5 »

Hi there excellent tutorial! :) - I was able to create casper-rw partition and a boot partition with two linuxmint versions (mate and cinnamon) ,

I see the casper-rw partition, Is it possible to save files in it while running USBlive? , I am not able to , I got a message /media/mnt/casper-rw/untitle.odt does not exst, while trying to save a writter document unde USBlive? :?:

I am able to see casper-rw unit in "Caja" for instance. inside of it there are two folder "work" and "upper" , and a file called "format" is this ok? :?:

Regards
Laurent85
Level 17
Level 17
Posts: 7081
Joined: Tue May 26, 2015 10:11 am

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

Post by Laurent85 »

pcfan5 wrote: I see the casper-rw partition, Is it possible to save files in it while running USBlive? , I am not able to , I got a message /media/mnt/casper-rw/untitle.odt does not exst, while trying to save a writter document unde USBlive? :?:
The casper-rw partition is managed by LM for persistence. You don't need to care about, just save your documents in your home directory as you normally do using a standard installation.
I am able to see casper-rw unit in "Caja" for instance. inside of it there are two folder "work" and "upper" , and a file called "format" is this ok? :?:
Quoting my tutorial comment :
Nemo automatically mounts casper-rw partition. When persistence in use, casper-rw should not be considered as a removeable media, hence not mounted as is. You can change this behavior in Nemo Preferences > Behavior > unselect Automatically mount removable media.
Don't try to directly write to casper-rw partition, that would break persistence.
Image
User avatar
pcfan5
Level 5
Level 5
Posts: 563
Joined: Tue Sep 06, 2016 10:57 am
Location: Argentina

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

Post by pcfan5 »

thank you very much, I was reading an just learning the same thing you are telling me !! thank you very much :D

I haven't found the option Preferences > Behavior > unselect Automatically mount in "caja".

I was also wondering ," Do I have to do Left click iso image entry and enter option persistent, press Backup button to save boot options". , in all the ISO images?

Just a quick one In some tutorials they say it is necesary to erase a "casper" file , is it true? here viewtopic.php?f=46&t=219126&hilit=multisystem they say "

This is my first time with persistence partition. Greetings.
Laurent85
Level 17
Level 17
Posts: 7081
Joined: Tue May 26, 2015 10:11 am

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

Post by Laurent85 »

pcfan5 wrote: I was also wondering ," Do I have to do Left click iso image entry and enter option persistent, press Backup button to save boot options". , in all the ISO images?
I would not do that. Persistence is specific to the iso image it was setup.
Just a quick one In some tutorials they say it is necesary to erase a "casper" file , is it true? here viewtopic.php?f=46&t=219126&hilit=multisystem they say "
Yes. Either persistence uses a casper-rw file either persistence uses a casper-rw partition, not both. So remove casper-rw file if it still exists on your usb stick.
Image
User avatar
pcfan5
Level 5
Level 5
Posts: 563
Joined: Tue Sep 06, 2016 10:57 am
Location: Argentina

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

Post by pcfan5 »

Laurent85 wrote:...
Yes. Either persistence uses a casper-rw file either persistence uses a casper-rw partition, not both. So remove casper-rw file if it still exists on your usb stick.
Thank you You are very kind. I started the procedure again,searched for the casper file in both partitions (multiboot and casper-rw) but didn't find it.

I am a bit slow , now I understand casper as the ghost. :wink:
User avatar
pcfan5
Level 5
Level 5
Posts: 563
Joined: Tue Sep 06, 2016 10:57 am
Location: Argentina

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

Post by pcfan5 »

I succeded!!! didn't find the casper file but everything is working ok!! :mrgreen: I am under linux mint 18.2 MATE
User avatar
pcfan5
Level 5
Level 5
Posts: 563
Joined: Tue Sep 06, 2016 10:57 am
Location: Argentina

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

Post by pcfan5 »

Hi guys I have a doubt and I created another post to ask for help here viewtopic.php?f=46&t=258705 , just to avoid mixing topics in this tutorial.
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 »

pcfan5 wrote:Hi guys I have a doubt and I created another post to ask for help here viewtopic.php?f=46&t=258705 , just to avoid mixing topics in this tutorial.
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
All things go better with Mint. Mint julep, mint jelly, mint gum, candy mints, pillow mints, peppermint, chocolate mints, spearmint,....
User avatar
pcfan5
Level 5
Level 5
Posts: 563
Joined: Tue Sep 06, 2016 10:57 am
Location: Argentina

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

Post by pcfan5 »

Spearmint2 wrote:
pcfan5 wrote:Hi guys I have a doubt and I created another post to ask for help here viewtopic.php?f=46&t=258705 , just to avoid mixing topics in this tutorial.
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
Hi there! I haven't update my Multisystem versión, and I am under MATE18.2, I was able to create the casper-rw partition and to make two of ISO persistan without trouble , however I wasn't able to do it with a 3rd. Would you please tell me which is the newer version of Multisystem.
PS: my new post is regarding of how to undone a persistan. :wink:
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 »

Hi there! I haven't update my Multisystem versión, and I am under MATE18.2, I was able to create the casper-rw partition and to make two of ISO persistan without trouble , however I wasn't able to do it with a 3rd. Would you please tell me which is the newer version of Multisystem.
PS: my new post is regarding of how to undone a persistan. :wink:
I'm not that person. This week I installed the Multisystem, tried to create persistent partition several times on flashdrives and failed. I've given up on it for now. I don't know why or if they HAD to change the way casper works so that USB Startup Creator doesn't work for persistent partitions anymore with the newer 64 bit systems. I'm hoping they change it back to the way it worked. I wasn't too impressed with the Multisystem, and didn't consider it very intuitive either.
All things go better with Mint. Mint julep, mint jelly, mint gum, candy mints, pillow mints, peppermint, chocolate mints, spearmint,....
Laurent85
Level 17
Level 17
Posts: 7081
Joined: Tue May 26, 2015 10:11 am

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

Post by Laurent85 »

Just tried to create a new usb stick with persistence over 4GB following my tutorial and it worked as expected.

Also tried to add persistence (less than 4GB) to LM 18.3 iso using buit in option of Multisystem, also works.
Image
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 »

I've not tried this until now, as I find full install to USB drive much more useful for my purposes. Decided to give a whirl out of curiosity. The method described worked for me (and was easy to follow). Set up a 32 GB flash drive with a 27 GB casper-rw partition (remainder is the OS plus a generous unallocated portion, which I read somewhere helps with wear leveling). Tested persistence by copying in 8 GB of files (docs and music), which based on random testing seems to have worked fine. Also, after several reboots, retains settings and the handful of apps I've installed.

As for the MATE automount problem, pcfan5 is right. Unlike Cinnamon, Xfce and KDE, Caja doesn't have a setting for turning it off. Manually ejecting the casper-rw partition immediately after boot seemed to work. Digging in the archive, though, turned up an elegant solution by Termy in this thread. Simply enter in Terminal gsettings set org.mate.media-handling automount false. Don't know why it works, but it does.
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 »

Ah, I use MATE. I may give it another try later. I was doing it late night and maybe missed something in the doing, although tried it twice, then went to bed.
All things go better with Mint. Mint julep, mint jelly, mint gum, candy mints, pillow mints, peppermint, chocolate mints, spearmint,....
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 »

All things go better with Mint. Mint julep, mint jelly, mint gum, candy mints, pillow mints, peppermint, chocolate mints, spearmint,....
User avatar
AndyMH
Level 21
Level 21
Posts: 13578
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

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

Post by AndyMH »

I use MKUSB as well, works for me
Thinkcentre M720Q - LM21.3 cinnamon, 4 x T430 - LM21.3 cinnamon, Homebrew desktop i5-8400+GTX1080 Cinnamon 19.0
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 »

AndyMH wrote:I use MKUSB as well, works for me
Besides making 64 bit distro persistent, what I also liked is the ISO is there without needing extra room for a small persistent file that could then be erased when casper-rw partition was created. In past using USB Startup Creator, I had to wasted at least 1GB of room in the ISO containing partition on casper-rw, since that's the smallest it would allow for it. Unetbootin would let you make a small 10 MB file for it. This MKUSB doesn't use anymore than the ISO size needs. I was able to use 32 bit OS to create the 64 bit LIVE Persistent USB flashdrive.
All things go better with Mint. Mint julep, mint jelly, mint gum, candy mints, pillow mints, peppermint, chocolate mints, spearmint,....
Post Reply

Return to “Tutorials”