
About .mnu files
Comment lines
title and iftitle
Writing .mnu fles
Tip: To make a simple .mnu file from a 'payload' file (e.g. an ISO), drag-and-drop the payload file onto the
"\_ISO\docs\E2B Utilities\E2B MNU Maker.cmd" file.
For those payload files which do not work correctly when simply placed in an E2B menu folder (even with a renamed file extension) or if they have special requirements, such as they need to use a persistent filesystem to store changes, you will need to use a special grub4dos menu file for them. For Easy2Boot these extra files have the .mnu file extension and they contain a grub4dos menu that has been specially written for a particular ISO or payload file.
Note: If a .mnu file is placed at level 2 (e.g. \_ISO\LINUX) and the .iso file is also placed in the same level 2 folder - there will be TWO menu entries in the E2B sub-menu - one for the .iso file and one for the .mnu file. To avoid this, place both files at the 3rd level or deeper (e.g. \_ISO\LINUX\MNU) and you will only see the .mnu menu entry.
For example, for a linux ISO that requires a .mnu file, you could add the payload file (e.g. ISO file) and it's matching .mnu file to the \_ISO\LINUX\Linux folder (note that the correct sub-folder may need to be created to match the one specified in the .mnu file, so you may need to make a new 'Linux' folder - also note that Linux is case sensitive so use the correct case for any linux parameters which are in the .mnu file). Some new .mnu files can be downloaded from the Easy2Boot Download page but most are in the \_ISO\docs\sample mnu files folder contained in the E2B download. Once added, the .mnu file entry will be listed in the sub-menu once it has been selected from the Main menu.
Note that a .mnu file will work in any standard menu folder (e.g. \_ISO\MAINMENU or \_ISO\DOS or \_ISO\ANTVIRUS) or any sub-folder of any name under these folders - the names of the 3rd level folders (e.g. MNU) have no special significance - any name can be used because E2B searches all sub-folders for all .mnu files.
.mnu files do not work in the \_ISO\AUTO folder (or below) and do not work in any \_ISO\WINDOWS folder or sub-folder.
Instructions on how to use each .mnu file are included as text comments inside each sample .mnu file - please read the instructions in each .mnu file. You may also need to edit the .mnu file if you are using a slightly different version of the ISO so that the ISO filenames are correct. If your language uses special non-ASCII characters, save the .mnu file in UTF-8 format.
Tip: If you want to have two menu entries to run the same linux ISO, e.g. one with and one without persistence, place both the .iso file and the .mnu file at the 2nd level (e.g. \_ISO\LINUX).
IMPORTANT: Use forward-slash / instead of \ for folder paths in a .mnu file - grub4dos is like linux and uses / instead of \.
Beware of filenames with spaces!
When a path or filename contains a space, you must precede each space character with \ (backslash) - example for "Ubuntu Boot CD 2014.iso" use:
Ubuntu\ Boot\ CD\ 2014.iso
I tend to avoid spaces in payload filenames when using .mnu file for this reason!
%MFOLDER%, $NAME$ and $HOME$ Keywords
When specifying a path in .mnu file, you can use the %MFOLDER% variable which will be set to the parent's menu folder (e.g. \_ISO\MAINMENU) or you can use $HOME$ which will be set to the .mnu path.
For example, the following are all equivalent if the .mnu file is located in the \_ISO\LINUX\Linux folder:
- /_ISO/LINUX/Linux/Ubuntu.iso
- %MFOLDER%/Linux/Ubuntu.iso
- $HOME$/Ubuntu.iso
I recommend you use $HOME$ whenever possible.
If the file name contains spaces such as Ubuntu x86.iso, then precede each space with a \ character - e.g. $HOME$/Ubuntu\ x86.iso
$NAME$ is the filename (without extension) of the .mnu or .txt file that it is used in. The filename can contain spaces. (v1.67+)
e.g. You have two files with identical filenames (.mnu and .iso):
- \_ISO\MAINMENU\MNU\Ubuntu.iso
- \_ISO\MAINMENU\MNU\Ubuntu.mnu
iftitle [if exist $HOME$/$NAME$.ISO] Ubuntu \n Boot from $NAME$.ISO
set ISO=$HOME$/$NAME$.ISO
(more grub4dos lines here)...
boot
You should name the payload file exactly the same as the .mnu file and so you do not need to modify the text inside the .mnu file. You can then copy or move both files to any standard menu folder or download a later version of the ISO and simply rename the .mnu file.
Note that because we use iftitle, if you delete the Ubuntu.iso file, then the menu entry will not appear in the menu. If you add Ubuntu.iso back again, then it will be listed in the menu again.
Tip: /%grub%/ is used as the path to the \_ISO\e2b\grub folder, which is where most grub4dos batch files and utilities are located.
Tip: if a .mnu menu entry is not automatically numbered by grub4dos and you cannot select it with the UP/DOWN cursor keys (but can select it using RIGHT/LEFT cursor keys), simply add 'boot' as the last line of the menu.
Using iftitle in .mnu files
The expression inside the square brackets [expr] must equate to TRUE for the menu to be displayed.
Any variable inside the square brackets must already exist.
All menu entries with iftitle statements are evaluated first by grub4dos, after that, each menu entry is listed in the menu.
You can use iftitle in .mnu and .txt files.
For instance, suppose we only want to display an Ubuntu 64-bit ISO if the system's CPU is a 64-bit CPU
We could place the following line in our \_ISO\MyE2B.cfg file (which is executed at an early stage):
checkrange 2,3 is64bit && set BIT64=1
This will set the variable BIT64 to the value of 1 if the CPU is a 64-bit CPU.
Now we can use the BIT64 variable in a .mnu or .txt file:
iftitle [if exist BIT64] Ubuntu x64\n
/%grub%/qrun.g4b $HOME%/Ubuntu64.iso
boot
To use a variable it must be enlosed in % signs, so we could instead write:
iftitle [if "%BIT64%"=="1"] Ubuntu x64\n
/%grub%/qrun.g4b $HOME%/Ubuntu64.iso
boot
Note that we enclose the BIT64 variable in double-quotes (") - this is because if BIT64 was not defined, if %BIT64%==1 would resolve to if ==1 which is an invalid expression and cause an error. So by using "%BIT64%" the expression resolves to if ""=="1" which has correct syntax. We could also use if exist BIT64 to test for the existence of the BIT64 variable.
The \_ISO\Sample_MyE2B.cfg file contains examples of other variables you can use, e.g. MYMEMMB for the size of memory in MB, or MYDISKGB for the size of the USB boot disk in GB, GB4 if there is more than 4GB of memory, etc.
$$STRxxxx Keywords
If you see these $$STR Keywords used in an E2B .mnu file or .txt file, they will be replaced by the equivalent text from a STRINGS.txt language file (e.g. using text inside the \_ISO\e2b\grub\ENG\STRINGS.txt file if English is the selected language).
If you are creating your own .mnu or .txt files, just substitute ordinary text in-place of the Keywords
e.g.
iftitle [if "%GFX%"==""] $$STRm005
can be changed to:
iftitle [if "%GFX%"==""] This is the menu entry\nThis is the help text below the menu box
Note: Hotkeys do not work in a GFX Boot menu, so often there will be two almost identical menu entries in an E2B .mnu file, one with a hotkey and one without a hotkey in the 'iftitle' line.. The [if "%GFX%"==""] portion means 'if a GFX boot menu is not being used' - so the menu entry will not be displayed if the user has configured E2B to load a GFX Boot 'message' menu file instead of an ordinary wallpaper bitmap file. You can omit this portion and just use title This is a menu entry\n Help text if you don't want to check for GFX Boot menus.
Note that because hotkeys don't work in GFX Boot menus, do not define a hotkey in your .mnu or .txt files if you want to use GFX Boot menus.
Add a non-persistent menu entry to a persistent .mnu file
title Boot directly from linux myiso.iso\nHERE IS MY HELP TEXT
/%grub%/QRUN.g4b $HOME$/myiso.iso
boot
If you want to be able to delete the large .ISO file, but leave the .mnu file on the USB drive in case you want to restore it later, you will need to use iftitle so that the menu entry is only seen when the .iso file is present:
iftitle [if exist $HOME$/myiso.iso] Boot directly from myiso.iso\nHERE IS MY HELP TEXT
/%grub%/QRUN.g4b $HOME$/myiso.iso
boot
QRUN.g4b is the grub4dos batch file which is responsible for booting a payload file according to it's file extension.
If you want a menu entry to run a payload which is in a different folder, then specify the complete path, e.g.
.mnu file = \_ISO\MAINMENU\MyIso.mnu so we get an entry in the Main Menu:
iftitle [if exist/_ISO/WIN/myiso.iso] Boot directly from myiso.iso\nRun an ISO in a different folder
/%grub%/QRUN.g4b /_ISO/WIN/myiso.iso
boot
Override the file extension
Normally, the file extension of a file determines how E2B will run it. There may be some circumstances where you want to have the same .ISO file (for example) but run it in two different ways. For instance, if your USB drive is a Zalman or IODD drive and you need to keep the .iso file extension on all files so that the drive can find them.
To do this create a .mnu file with the following format
fred.mnu
title HERE IS MY TITLE\nHERE IS MY HELP TEXT
/%grub%/QRUN.g4b FORCE.isoPE $HOME$/myiso.iso
boot
This will run MYISO.ISO as if it had a file extension of .ISOPE.
Here is another example of how to run the same .imgPTN file in two different ways - (place the .mnu file and the .imgPTN file in a MNU 3rd-level sub-folder)
clonezilla.mnu
Auto-run .imgPTN files
Normally, when you select a .imgPTN file (of any type), E2B will display some information about the file and then prompt the user to ask if it is OK to switch partitions. This can be suppressed for .imgPTN files by adding "AUTO" to the file extension, e.g. .imgPTNAUTO, however we can also use the AUTOCSM variable in a .mnu file as follows:
clonezilla_auto.mnu
If you don't want the clonezilla .imgPTNLBA23 file to be listed in the menu as well as the .mnu file entry, place both the image file and the .mnu in a subfolder (e.g. move it from \_ISO\BACKUP to \_ISO\BACKUP\MNU or \_ISO\BACKUP\ANYNAME).
Tip: If you add 'set AUTOCSM=1' to your \_ISO\MyE2B.cfg file, then the .imgPTN user prompt text will be suppressed for all .imgPTN-family files.
Calling other bootloaders from a .mnu file
If you are using a .mnu file, you may need to 'tidy up' the BIOS environment before you load your new payload.
In particular, if your menu has an animation, you should use these lines as the first lines in your menu:
E2B already does this for you in most cases, but not if you use your own .mnu file.
If you are booting to another payload which uses the BIOS (e.g. DOS, grub4dos, syslinux, grub2 MBR, etc.) you may need to add these lines to prevent strange memory corruption issues.
Recommended for Easy2Boot (fastest flash drive!)
SanDisk Extreme SDCZ880-128G-G46
- Home
- Start & Intro
- Quick Setup Guide >>>
- DOWNLOADS >>>
- YouTube videos
- Tutorials and How To's
-
Make a USB Drive >>>
- Make a multi-partition E2B USB drive using RMPrepUSB
- Use an existing USB HDD for E2B
- Use LINUX to make an E2B drive + defrag
- How to Update E2B
- How to make a WINHELPER USB Flash Drive (fix 'Required DVD drive driver is missing')
- Multiple partitions on a USB Flash drive
- Using other partitions or drives
- Backup/Restore/Copy (clone) any E2B USB drive
- Make and burn an E2B DVD
- Using E2B with a Zalman/IODD
- Add E2B to your own grub4dos USB drive
- How to remove E2B
- E2B Menu System
- UEFI booting from E2B
-
How to add Payload Files and Use E2B >>>
- Make files CONTIGUOUS
- File Extensions recognised by E2B
- UEFI+MBR and how to make .imgPTN files
- MakePartImage and how to change the CSM Menu
- UEFI-Multiboot and rEFInd
- Using SWITCH_E2B with .imgPTN files
- Using the \_ISO\AUTO folder
-
WINDOWS payloads >>
- E2B USB HDD - Installing Windows with a 'WinHelper' drive
- Windows XP Install ISOs
- Install XP 32-bit + disk drivers (DPMS)
- Windows XP 64-bit
- Install XP using WinPE (one step process)
- Add XP Install ISOs using WinSetupFromUSB
- Windows Vista/7 Install ISOs
- UEFI boot from Windows 7 Install ISOs
- Windows 8/10 Install ISOs
- Unattended Installs
- XMLtoE2B.exe (Unattend.XML files)
- Adding >4GB Windows Install ISOs using .imgPTN files
- Automating Windows Installs from .imgPTN files
- Split_WinISO
- Add Windows ISOs to partition 2
- Windows AIO ISOs
- WindowsToGo
- WinNTSetup
- WinLite10 XML files
- SDI_CHOCO (install drivers, apps and updates) >>
- .VHD and .WIM files
- PassPass (bypass the Windows Password)
- Hack Windows Account Passwords (UtilMan.exe)
- Windows 2000
- Windows 98
- Multipoint Server
- Add the latest XP drivers (DPMS)
- Add a Windows Install menu entry
- LINUX payloads >>
- MSDart ERD ISOs
- WinBuilder, Medicat, Gandalf and WinPE ISOs
- Hirens/Strelec/DLC/F4 ISOs
- DOS (MS-DOS and FreeDOS)
- HAIKU
- MAC OS X
- FreeBSD
- MOVE_IMGPTN
- List of tested ISOs\payloads (with instructions)
-
Configure E2B >>>
- Menu settings (quick reference)
- E2B Menu Demo
- E2B_Editor
- E2B files and folders explained
- MyE2B.cfg - E2B configuration file >>
- Change the payload menu entries and help text using a .txt file
- Change the order of the menu entries
- Change the background wallpaper
- Different background wallpaper for each menu
- Default Menu and Timeout
- Change the Language, Headings, Menu and text
- Changing the default E2B menu entry order
- 'Change File Extension' prompt (Auto-Suggest)
- Change the Keyboard Layout
- About .mnu files
- Sample .mnu files
- PimpMyDrive.cmd
- Reduce the E2B messages
- Add a new Sub-Menu folder
- Stamps, Animation and Tunes
- Draw lines and boxes on the screen
- Write text/time/date to the menu screen
- Global Hotkeys
- Themes (Skins)
- Fonts
- Speeding up E2B (inc. FASTLOAD)
- One Single Menu
- The E2B F1 Help menu
- Add your own Help Menu
- Add Help text files (.help)
- Add Windows Install ISOs to the Main Menu
- Change the Windows Install Menu
- Passwords and Security
- Hide Payloads and Menu Entries
- Guest Mode
- GFX Boot Menus
- Dual Booting
- Change the CSM .imgPTN Menu
- Configure Clover
- Right-to-Left Languages
- Create new language files
- How to modify LOADISO.CMD (Repair message)
- Count number of boots
- UEFI - useful things know!
-
FAQ, Info, TroubleShooting, QEMU and Virtual Machines >>>
- 'File Not Contiguous' and 'Too Many Fragments' Errors
- 137GB 'BAD BIOS' bug
- TroubleShooting E2B
- E2B Error Messages
- Grub4dos Error Numbers
- Common problems with payload files
- Repair a corrupt E2B drive
- Known Issues and Bugs
- Slow and buggy BIOSes
- How E2B Works
- QEMU and Virtual Machines >>
- Using VBOX with a WinHelper USB drive
- Debugging E2B
- CONTIG.ISO
- ISOBOOT
- WIMBOOT (iPXE)
- grub4dos
- Useful resources
- Removable v. Fixed
- Gallery
- Guestbook
- Forum
- Blog
- a1ive grub2 File Manager (MBR+UEFI)
- Add Ventoy
- Site Map
- eBooks
- Contact Me >>>
- Donate
- Licensing
- Privacy policy (GDPR)
- Bespoke design service
- Grub2 Menu System (UEFI_GRUB2_PTN2)