Change the payload menu entry text using a .txt file (+ add hotkeys)
By default, E2B will list the file name of the payload file in the menu. For example, if you have payload files (.ISO, .bin, .img, etc.) in the Main menu or in the other folders, the actual filename+extension will be listed in the menu.
You can change the filename of the payload file to any name you like and use spaces in the file name.
You can suppress all the filename extensions from being shown in the menu, if you set EXTOFF=1 in the MyE2B.cfg file.
For simple linux ISOs and some other types of files, you can simply rename the ISO file to include whatever text you like.
For instance \_ISO\LINUX\Ubuntu 16.04 (64-bit).iso64 will be listed as 'Ubuntu 16.04 (64-bit)' in the Linux menu.
Note: The .iso64 extension just ensures that E2B will not list it on 32-bit systems.
Instead of the file name being listed in the menu, you can display any menu text and menu help text you like, by creating a .txt file.
The .txt file must have exactly the same filename as the payload file.
Make a .txt file by dragging-and-dropping the payload file onto the \_ISO\TXT_Maker.exe utility (see below).
you can use the \_ISO\docs\E2B Utilities\E2B TXT Maker.cmd file (you can copy the file to your Desktop first for convenience). You will be prompted to enter the menu text and help text. A new .txt file will be made automatically on the E2B drive in the same folder as your payload file.
However, you can specify a replacement menu entry and specify one or more lines of the help text that is shown under the menu area.
To change the menu entry and help text, make a .txt file of exactly the same file name as the payload file.
You can just make one using Windows Notepad or any text editor.
Without a .txt file, if you have an ISO file at \_ISO\MAINMENU\LinuxTails_x86_2012_11_02.iso, it will be displayed in the Main menu just as the filename+extension:
However, if you also specify an alternative title in a .txt file of the same name and in the same folder, then that title will be used instead (note the line of text in the .txt file must start with lowercase grub4dos command title), e.g.
where \_ISO\MAINMENU\LinuxTails_x86_2012_11_02.txt could contain the following text :
title ^T Tails 2 Nov 2012 (32-bit) [T]\n Press ENTER to launch the GUI once it has booted\nPassword is toor
A hotkey of T has been defined for this entry (hotkeys are always preceded by a ^ symbol).
If you don't want a hotkey or if you use a GFXBoot Menu, omit the ^T characters. See below for more details about hotkeys.
You must use .txt files which exactly match the payload filename (e.g. if your file is linux.i386.iso, then create a file called linux.i386.txt).
The .txt file must be in the same folder that the payload file is in.
Except for the \_ISO\AUTO folder and \_ISO\WINDOWS\xxx folders, .txt files will only work in the menu folders directly under \_ISO.
.txt files have no effect if they are present in sub-folders below the \_ISO\xxxx menu folders because payload files are not enumerated if they are more than one level below \_ISO\xxxx (except for \_ISO\Auto and \_ISO\WINDOWS\xxxx folders).
Use only a single line of text (or one line followed by a blank line) in a .txt file. Only the first line will be used (but .txt files under \_ISO\WINDOWS\ can have multiple lines).
Text that follows \n will appear as help text at the bottom of the menu list when the item is selected. Any more \n's on the line (max. 4) will start a new line of help text. Use just \n after the title text to suppress the standard grub4dos default help text (which may not be aligned correctly). So if you don't want any menu entry help text under the menu when you select the menu entry, then to suppress the standard menu entry help message from grub4dos, just use \n after the title -
e.g. title ^T Tails 2 Nov 2012 (32-bit) [T]\n
- or - title Tails 2 Nov 2012 (32-bit) \n
Note: the text in a .txt file must start with the lower-case word title (or iftitle) or you will see errors reported by E2B as it boots.
Tips: Save the .txt file as UTF-8 using NotePad and any special characters such as ü will be displayed correctly.
Make a .txt file by dragging-and-dropping the payload file onto the Windows \_ISO\TXT_Maker.exe utility...
Click on Save .txt file to write the new .txt file.
Note that if you delete the payload file (e.g. linux.iso) you do not need to delete the .txt file - it will just be ignored if the corresponding payload file of the same file name is missing.
From E2B v1.67+, you can also use $HOME$ (the folder path of the .txt file) and $NAME$ (the filename, without extension, of the .txt file) in .txt files - e.g.
title Boot to $NAME$ \n Boot $HOME$/$NAME$.ISO
For a Ubuntu1401.txt file in the MAINMENU folder, the menu entry will appear as 'Boot to Ubuntu1401'.
Checking for 64-bit or 32-bit CPUs
In E2B 1.62+ you can add '32' or '64' to a file extension (e.g. Ubuntu.iso64 would only appear in the menu if the system contained a 64-bit CPU). For example, you could have both Ubuntu.iso64 and Ubuntu.iso32 payload files so that on a 32-bit system, it would only list the 32-bit ISO and on a 64-bit system, it would only list the 64-bit ISO.
You can also add a 'pwd' suffix, e.g. Ubuntu.pwd64 so that the E2B password is required before it can be run.
However, if you use a .txt file (Ubuntu.txt) then the special 64\32\pwd suffixes will not work and your Ubuntu.iso64 file will still be listed on 32-bit systems.
To only list the file on a 64-bit system, you would need this .txt file
iftitle [checkrange 2,3 is64bit] Ubuntu\n Run Ubuntu on a 64-bit system
To only list an iso on a 32-bit system, you would need this .txt file
iftitle [checkrange 0,1 is64bit] Linux32\n Run 32-bit linux
You must use a .mnu file if you want extra features like password protection on the file, as the 'pwd' suffix will not work if you use a .txt file. See Password_Protect_64_32.mnu in \_ISO\docs\Sample mnu files for an example.
Another way to make a .txt file or .mnu file, is to use the .cmd batch files in the \_ISO\docs\E2B Utilities folder.
Just drag-and-drop your payload file onto the E2B TXT Maker.cmd or E2B MNU Maker.cmd files and it will make the file for you!
MNU Maker.cmd in action!
As soon as the user presses a hotkey (e.g. presses the T key), the menu entry with a T hotkey assigned will immediately run (no need to press the Enter key).
Avoid using SHIFT+ P, C, E or B for hotkeys as these are used by grub4dos for password entry and editing, etc. You can use Ctrl+B or Alt+C, etc. instead.
When you use a title command (e.g. in .mnu and .txt files), you can also specify a hotkey, e.g.
title ^Ctrl+T Tails linux ISO [Ctrl+T]\nPress ctrl+T to boot to Tails
or iftitle [if exist $HOME$/Tails.iso] ^Ctrl+T Tails linux ISO [Ctrl+T]\nPress Ctrl+T to boot to Tails
The menu entry will be displayed as: Tails linux ISO [Ctrl+T]
You use the up-arrow symbol ^ to specify a non-displayed hotkey.
Alternatively, you can use square brackets at the beginning of the title to define a hotkey - in which case the square brackets and the hotkey character(s) will be displayed in the menu, e.g.
title [T] Tails linux ISO\nPress T to boot to Tails
Will be displayed in the menu as:
[T] Tails linux ISO
You can use numbers (best avoided as menu items can be selected by entering their number too!) or letters for a hotkey, as well as F1, F2, etc and Ctrl+F1 (e.g. ^Ctrl+F1). Hotkeys are not case sensitive, you can't have both ^t and ^T, but you can have ^t and ^SHIFT+t (SHIFT+t is not the same as T with caps-lock on).
Because grub4dos uses SHIFT+e,p or c for menu editing, etc., I would avoid using SHIFT+ for hotkeys. Also, E2B uses CTRL+ for menu selection hotkeys. I recommend using ALT+ for your own menu hotkeys.
You can also use iftitle - e.g. iftitle [if exist /_ISO/MAINMENU/fred.iso] [F] Run fred.iso \n This runs fred.iso when you press F
Note for older versions pre v1.60 only : GFXBoot Menus do not understand this hotkey notation (and may even cause GFXBoot to crash!), so if you are using a GFXBoot Menu, you must copy the ZZGFXSubMenuxxxx.mnu files from the \_ISO\docs\ZZGFXSubMenu Files folder to the \_ISO\MAINMENU folder (you can delete the \_ISO\MAINMENU\ZZSubMenuxxxx.mnu files if you are only using GFXMenu as they will not be used).
Note: Not all key combinations can be used as the keyboard does not generate a scan code for certain combinations (e.g. Ctrl+3). See here for a list.
Avoid using number-pad keys or other special keys which may not be available on netbooks with small keyboards or on foreign/non-standard keyboards.
Tip: Make a .txt file by dragging-and-dropping the payload file onto the \_ISO\TXT_Maker.exe utility.
Use the \_ISO\docs\E2B Utilities\E2B TXT Maker.cmd file (you can copy the file to your Desktop first for convenience). You will be prompted to enter the menu text and help text. A new .txt file will be made automatically on the E2B drive in the same folder as your payload file.
You can hide any payload file by using a special .txt file, so that the payload file is not added to the menus unless the user enters a password to enable them to be listed. See this page for details.