Linux + Persistence using .MNU files

Some linux ISOs can be run from an E2B USB drive with persistence. This means that most changes you make or files that you save whilst running Linux, will be remembered the next time that you boot the same ISO from the same E2B USB drive using the same persistence file. 

To support persistence, most live Linux distributions require a persistent filesystem to be made and they need to be told to use the persistence file or persistence partition to save any changes.  

Set up persistence using a .mnu file

Here is a typical example of a procedure for adding a Linux ISO with persistence to you E2B USB drive by using a .mnu file: 

1. Find a suitable .mnu file in the \_ISO\docs\Sample mnu Files folder – don’t worry if the version number of your ISO does not exactly match.

2. Open the .mnu file in Notepad and follow the instructions – typically you will need to create an ext2 or ext3 file using the RMPrepUSB v2.1.732+Create Ext2/3/4 FS button or use  \_ISO\docs\Make_Ext\Make_Ext.exe (tip: ext3 is much less prone to corruption than ext2).

3. Copy the .mnu fle and the Linux ISO file to a folder on your E2B USB drive – e.g. \_ISO\MAINMENU\MNU or \_ISO\LINUX\MNU

4. Edit the .mnu file and make sure the name of the ISO filename exactly matches the one you are using.

5. Use RMPrepUSB to create an ext file in the root of the USB drive.

Typically, for the ext image file, you will use a filename such as Ubuntu1310-rw and a Volume name of casper-rw (RMPrepUSB – Create ext2/3/4 FS will prompt you for both the filename and the Volume name and ext type).

You can use any filename you like (avoid using spaces in the filename), but always keep the volumename the same as the one specified in the .mnu file instructions (usually it is casper-rw). As the .mnu file will specify the file name of the ext file – if you use a different name then you must also change the name in the .mnu file – see text below, or \_ISO\docs\Make_Ext\Make_Ext.exe (E2B v1.A3+) to make a persistence file. 

# Make a ext3 file using RMPrepUSB in the root of the drive (i.e. File Name=mint-rw  Volume Name=casper-rw)
# Place this .mnu file and the ISO in either \_ISO\MainMenu\MNU or \_ISO\Linux\MNU
# This menu will work even on an NTFS USB boot drive
# IMPORTANT: you MUST run WinContig (Ctrl+F2) before booting E2B. 
iftitle [if exist $HOME$/linuxmint-17-mate-32bit-v2.iso] Mint\n Boot using .mnu file with persistence
set ISO=linuxmint-17-mate-32bit-v2.iso
set PER=/mint-rw
(more lines here)... 

Note: A FAT32 filesystem cannot contain files larger than 4GB. 

  • Kali Linux and some other Debian-based ISOs require an ext3 file with a volume label of ‘persistence’ and a special ‘persistence.conf’ file to be created – see the instructions inside the .mnu file for details. 

Newer versions of linux will support ext3 and ext4. I recommend ext3 because it is also compatible with grub4dos but much less prone to corruption than ext2. 

Here is an example of the files required for Ubuntu 13.10 if using a .mnu file: 

  • \_ISO\MAINMENU\MNU\ubuntu-13.10-desktop-i386.iso     – payload file
  • \_ISO\MAINMENU\MNU\ubuntu-13.10-desktop-i386.mnu   – .mnu file (ubuntu-13.04-dektop-i386.mnu used as a template)
  • \Ubuntu1310-rw                                                                        – ext2/3/4 filesystem image file, volume name=casper-rw  

The MNU folder name can be changed to any name or you can make a new subfolder with a different folder name – e.g. \_ISO\MAINMENU\$$Ubuntu or \_ISO\MAINMENU\MNU\$$Ubuntu will work. This will cause the menu order to change (menu entries are listed alphabetically in E2B menus).

  • The .mnu filename does not have to match the .ISO file name – .mnu files can be any name,
  • Subfolders like \_ISO\\MAINMENU\MNU can be any name. You can have lots of subfolders if you wish.
  • If you put the .iso file and the .mnu file in a 2nd-level menu folder (e.g. \_ISO\LINUX) then BOTH menu entries will be listed in the menu – one will just boot the ISO, the other one (.mnu file) will boot the ISO with persistence.
  • If you put the files at the 3rd-level folder (e.g. \_ISO\LINUX\FRED) then only the .mnu (persistence) entry will be listed in the menu.
  • If you want to change the menu entry listed for the .iso file, create a matching .txt file.

Persistence files

E2B v2.14+ contains a .zip file called \_ISO\docs\Linux Persistence Files\blank_persistent_image.dat_files.zip. Use 7Zip or other program to find a suitable .dat file which can then be extracted and renamed as required.

You must use the correct type for each Linux type.

Linux typeExample ISOLabel.dat fileNotes
Arch Linuxarchlinux-2021.03.01-x86_64.isovtoycow*vtoycow.datArch/ArchMan/ArchBang/ArchLabs/BlackArch… are also supported.
Ubuntuubuntu-20.04-desktop-amd64.isocasper-rw*casper.dat
MX LinuxMX-19.1_x64.isoMX-Persist*MX-Persist.dat
LinuxMintlinuxmint-19.3-xfce-64bit.isocasper-rw*casper.dat
elementary OSelementaryos-5.1-stable.20200405.isocasper-rw*casper.dat
ZorinZorin-OS-15.1-Core-64-bit-r2.isocasper-rw*casper.dat
Kaspersky Rescue Diskkrd18.isocasper-rw*casper.dat
Kali/Debiankali-linux-2020.2-live-amd64.isopersistence*persistence.datNeeds the -c persistence.conf option and must specify the Persistence boot option.
CloneZillaclonezilla-live-20200703-focal-amd64.isopersistence*persistence.datNeeds -c persistence.conf option
FedoraFedora-Workstation-Live-x86_64-33-1.2.isovtoycow*vtoycow.datNeed to add selinux=0 as a boot option

e.g. for a Debian iso you would use any of the .dat files ending in persistence.dat.
for an Ubuntu-based iso you would use any of the .dat files ending in casper.dat.

Files are pre-formatted as ext4 or xfs in sizes of 256MB, 512MB, 1GB, 2GB or 4GB.

e.g. persistence_ext4_2GB_casper-rw.dat can be used as a persistence file for Ubuntu and renamed as directed in the .mnu file – e.g. \Ubuntu1310-rw .

Errors when booting ISO using .mnu file?

The sample .mnu files are written for specific linux versions. It is often the case that the linux developers will change the name of the ‘kernel’ file and the ‘initrd’ file for no apparent good reason! This means that the files that are specified in the .mnu file may no longer exist. e.g.  

#debian-live-8.1.0-amd64-mate-desktop.iso
kernel /live/vmlinuz boot=live persistence components quiet splash label live-amd64-failsafe
initrd /live/initrd.img

#debian-live-9.1.0-amd64-gnome.iso
kernel /live/vmlinuz-4.9.0-3-amd64 boot=live persistence components quiet splash label live-amd64-failsafe
initrd /live/initrd.img-4.9.0-3-amd64

You should look at the files inside the .iso file (open iso with 7Zip) – often there will be \isolinux\*.cfg files or \grub\boot\*.cfg files which contain the ISO menu entries, e.g. the two filenames are shown in bold (look for the string ‘initrd’ inside the .cfg file):

linux /live/vmlinuz-4.9.0-3-amd64
APPEND initrd=/live/initrd.img-4.9.0-3-amd64 boot=live components

Also, the Linux developers often change the extra parameters (e.g. ‘boot=live components’) when they release a new version, so you will also need to check for changes here too!

Note: if you see — or — in the kernel parameter list, then any parameter placed after those symbols will NOT be passed to the kernel. Be sure to add any extra kernel parameters before — or —.

Multi-buy discount 10%

eBooks (in PDF format)

Easy-to-read eBooks are available in PDF format (each eBook is over 100 pages) – rated 4.5/5 stars.
Learn the secrets of Legacy and UEFI USB booting and then make your perfect multiboot USB drive.
E2B eBook #1 includes instructions on how to remove the E2B 5-second start-up delay blue screen.

E2B is unique in that it uses partition images which allows you to directly boot from Secure Boot images (no need to disable Secure Boot or run MOK manager or modify your UEFI BIOS).

Most eBooks are over 100 pages long, contain original content (not AI generated!) and step-by-step exercises which are suitable for both the beginner or the more experienced user.
Customer reviews are located at bottom of each eBook product page and multi-buy discounts are available when you buy more than one eBook. Please also visit RMPrepUSB.com and the E2B Forum.
Subscribe to my blog for the latest news, tips, USB boot articles and free eBook updates.