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.
- See also Linux+Persistence (ext3/4) for how to make a persistence file under Windows or Linux.
- Ubuntu-based ISO files do not need a .mnu file if you use the .isopersist file extension.
- See this video for Android OS’s + persistence.
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.
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.
kernel /live/vmlinuz boot=live persistence components quiet splash label live-amd64-failsafe
kernel /live/vmlinuz-4.9.0-3-amd64 boot=live persistence components quiet splash label live-amd64-failsafe
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):
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 —.