Change the order of the menu entries
Sort override prefix (_*_)
Using E2B v1.A9 or later versions, you can change the menu order if the file or folder name starts with _ (underscore) as the first character followed by any number of characters and then another _.
E2B will remove the leading _ character and then sort the files according to the 2nd and all following characters. If a second _ exists in the filename, only the characters after the second _ will be displayed, otherwise all characters after the first _ will be displayed.
In this way, you can change the sort order of any item in the menu.
The file will be listed in the menu without the _*_ prefix.
will be look like this in the Main Menu:
Set default menu entry and timeout
Note that _$$$0_ will be listed first (even before E2B's $$$SetDefaultMenu.mnu file because $$$0 comes before $$$S).
The _ xxxx _ sort prefix also works with folders and .mnu files as well as payload files.
You can use _000_ to _999_ as prefixes.
WARNING: Do not use four $ symbols, ! # " or space at the start of the filename (e.g. do not use _$$$$ or _!) because this may stop the special $$$$CONFIG folder from working correctly.
I suggest using:
- _$$$000_ to _$$$999_ for early menu items
- _000_ to _999_ for mid-menu items
- _ZZZZ000_ to _ZZZZ999_ for the last menu items
- _100_Ubuntu v14.1 (x64).iso
- _100_Ubuntu v14.1 (x64).txt
More on alphabetical sorting
The order that ISO, other payload files and .mnu files are listed in, is determined by E2B alphabetically sorting the payload and .mnu files and folders (not case-sensitive, but note that 10a.iso will be listed before 9a.iso because 1 comes before 9 as an ASCII value - instead use 09a.iso and 10a.iso).
For example: all you need to do is rename your payload and .mnu files, eg. aaz_fred.iso, aca_doris.iso, aea_debian.iso, etc..
Sort order prefixes, e.g. _234_Ubuntu 13.2 64-bit.isodef, can be used and the menu entry will be seen as Ubuntu 13.2 64-bit but it will be ordered as if it had the filename of 234_Ubuntu 13.2 64-bit.isodef (E2B v1.A9+).
You can also add a .txt file which has the same file name as the payload file, to present a nicer menu entry and also define your own menu entry help text at the bottom of the menu area when the file is selected in the menu (e.g. aaz_fred.iso + aaz_fred.txt).
The .mnu files will be listed depending on the name of the .mnu file itself (not the payload file or title which is used inside the .mnu file). If you have 'Ubuntu.mnu' for instance, it will therefore be listed after the 'PassPass.iso' (say). To change the order, simply rename ubuntu.mnu to say M_ubuntu.mnu.
Note that folders will also be searched alphabetically. If you have:
the MENU entry order will be:
Note that the menu entry for PassPass will be listed after the menu entry for Ubuntu because Ubuntu.mnu alphabetically precedes \Utility. If you want PassPass to be listed before Ubuntu, rename Ubuntu.mnu to ZUbuntu.mnu.
Tip: If you press the SPACE key during file enumeration, E2B will pause at the end of enumeration, to allow you to see the order it has enumerated the files and folders in (v1.72+).
Now you can easily see the order that the folders and files are enumerated in.
Now change the name of ZZSubMenuDos.mnu and wattOS-R8-Microwatt.iso...
If you want the $wattOS-R8-Microwatt.iso menu entry to be listed as 'Microswatt OS R8' then create a .txt file:
title Microswatt OS R8\n WattOS Micro R8
or simply rename the ISO as _000_Microswatt OS R8.isodef (E2B v1.A9+).
Re-order the default E2B menu entries
The E2B default menu entries such as 'Set default menu entry and timeout', 'Help [F1]', 'Boot to first HDD [F7]', etc. must first be disabled by using the NOxxxxx variables in your MyE2B.cfg file (e.g. set NOF1=1).
Then you can create new .mnu files for each of the menu entries. Some example .mnu files can be found in the \_ISO\docs\Sample Mnu Files\E2B Menus folder, e.g. $$F01_Help_Menu_F1.mnu.
The .mnu files are alphabetically sorted, so simply change the name of the .mnu file to change the menu order.
A blank menu line can be inserted by adding a blank .mnu file - e.g. A_BlankMenuEntry.mnu.
Each menu folder must contain a copy of each .mnu file if you want it in that menu or sub-menu.
You may find it useful to define Global Hotkeys instead of adding menu entries into each menu.
Another alternative is to use a sort override prefix character sequence with your files or folders (see top of page - E2B v1.A9+).
See here for more details.
.mnu files are ignored if you put them in the AUTO folder (so they won't work!).
Also, all payload files in and under the AUTO folder are enumerated and added to the DIRECT BOOT menu. So you can have multiple folders under \_ISO\AUTO,
If you have a lot of ISO files, and you don't want to change the filenames but you want to change their order in the menu, then put them in sub-folders under \_ISO\AUTO with a .txt file for each one, e.g.:
Note: These will be listed in the DIRECT BOOT sub-Menu - using folders like this for payload files, only works for the special AUTO folder. For the other menu folders (ANTIVIRUS, BACKUP, etc.) you will need to use a .mnu file or place the payload+.txt file in the main folder.
If you later want to add an entry in between these two, create a \_ISO\AUTO\A1\ folder. The entries will be listed in alphabetical order of both the files and folders.
Since you cannot add .mnu files to the AUTO folder, use Global Hotkeys instead if you want to disable the E2B generated menu entries. For example, you could add a global hotkey for F8 to return to the Main menu.
Use of .mnu files
If you do not want to change the ISO filenames but want to change their order in the Main menu (or one of the other sub-menus), then you will need to use .mnu files for each one and place them all in a sub-folder - e.g. \_ISO\MAINMENU\MNU.
The .mnu files should be of the following format:
e.g. \_ISO\MAINMENU\MNU\AAA_Ubuntu64.mnu contents:
title Ubuntu ISO\n Help text
You can also change the name of the sub-menu folder or create new 3rd level folders. See my blog here for details.
Sub-Menus listed in the Main Menu
The sub-menus entries (for ANTIVIRUS, BACKUP, etc.) are defined in the \_ISO\MAINMENU\ZZSubMenuAll.mnu file.
As this begins with 'ZZ' the sub-menu entries will be listed at the end of all other menu items in the Main menu. If you want the sub-menu entries listed first in the Main menu, rename it to $$ZZSubMenuAll.mnu.
Note: If you ever update your E2B USB drive with a later version of E2B, you will need to delete the new \_ISO\MAINMENU\ZZSubMenuAll.mnu file again.
Alternatively, start the name of all your payload and .mnu files with 'ZZZ' so that they are listed below the sub-menus or use a sort prefix override of _ZZZ_ (see top of page).