Speeding up E2B

Speeding up E2B

E2B enumerates the files and folders under the \_ISO\MAINMENU and \_ISO\WINDOWS folders on the E2B USB drive every time you boot from it – this can take time, especially on slow USB drives or with slow BIOSes.

E2B v2.16 and later supports the QMENU variable (Quick Menu). If you set QMENU=1 in your \_ISO\MyE2B.cfg file then it will speed up E2B menu enumeration.

set QMENU=1
  • The ISO volume information that is normally displayed for each ISO at the bottom of the menu will not be seen.
  • No warning will be given if a payload file is non-contiguous (you will not be warned until you try to run it!)

You can also set NOSORT=1 and the menus will not be alphanumerically sorted (so the menu entries may be in any order). This is not as effective as using QMENU but both QMENU and NOSORT can be used together.

Tip 1. If you press the key (SHIFT+1) during file enumeration of the MAINMENU folder (press F8 in the Main menu and then quickly press SHIFT+1), E2B will pause and show you how long each stage took. You can then see which stages are taking a long time.

Tip 2. If you hold down the SHIFT key just as E2B starts to boot, it will load a fast USB 2.0 driver. This can often drastically improve the load speed on older systems.

Always buy a fast USB 3.0 drive even if you only have USB 2.0 ports. Cheap ‘no-name’ USB 2.0 flash drives will always keep you waiting – get a fast USB 3.0 drive – you’re worth it! 

99% of the time, slow performance is caused by slow file access times from the USB drive. However, this is usually because of a slow USB drive and/or a poorly-written USB driver within the BIOS. There is a ‘Measure BIOS USB Performance‘ menu entry in the Utilities Menu which will allow you to compare the BIOS USB driver performance of different systems – you may be surprised by the results if you compare different system BIOSes!

Sometimes, selecting the ‘Install fast Grub4dos USB 2.0 drive‘ option in the Utilities Menu can dramatically increase performance by replacing the BIOS USB driver with grub4dos’s own, much-faster, USB driver (USB 2.0 only – limited USB controller support). You can configure the MyE2B.cfg file to always load this driver by default (but it may cause problems on some systems). 

Tip: Hold down the SHIFT key just as E2B starts to boot to install the grub4dos USB 2.0 driver.

Here are some other ways to speed up the E2B menu system…

1. Reduce the number of files in the MAINMENU folder

When E2B boots, it enumerates all the files in the \_ISO\MAINMENU folder and any files in sub-folders under that. The more files there are, the longer it will take to get to the Main Menu. You can move files to the other menu folders to improve the initial boot time. If you really want to keep a lot of files under the MAINMENU folder, then use set QMENU=1 (see above) or consider using FASTLOAD…

2. FASTLOAD (the Main menu is cached after the first boot)

If you have lots of payload files in the MAINMENU folder and lots of payload files in the WINDOWS\xxxx folders, then enable FASTLOAD. To enable FASTLOAD Main menu caching, just copy the file \_ISO\docs\FASTLOAD\FASTLOAD.YES to the root folder on the USB drive: \FASTLOAD.YES 

If you have lots of files in the \_ISO\MAINMENU folder, this will cause the Main menu to be cached for a much quicker boot the next time you reboot. 

IMPORTANT: Remember to press F8 after you add a new file!

When Easy2Boot is in FASTLOAD mode, and if you then change the contents of the USB drive you will need to use the ‘Rebuild Main Menu (F8)’ menu entry in the Main menu to update the cached copy of the Main menu so that the Main menu will be updated with the new contents. See my blog for more details here

How FASTLOAD works

The main menu is normally constructed using system memory when E2B enumerates (detects) all the files under the \_ISO\MAINMENU folder – this can take some time if you have lots of files and a slow BIOS or slow USB drive. If FASTLOAD is enabled, the newly built Main menu is copied (cached) to the FASTLOAD.MNU file on the E2B USB drive. On the next boot, if \FASTLOAD.YES is present, the FASTLOAD.MNU file will be loaded as the main menu, instead of Easy2Boot having to re-enumerate all the payload files again. 

How it actually works: 

  • If \FASTLOAD.YES contains the word ‘REFRESH’ then Easy2Boot will build a new menu in memory and write it to the FASTLOAD.MNU file and then remove the word REFRESH from the FASTLOAD.YES file so that on the next boot, Easy2Boot will use the contents of the file FASTLOAD.MNU file as the Main menu. 
  • When you choose the REFRESH (F8) menu option, E2B writes the word ‘REFRESH’ to the \FASTLOAD.YES file and re-runs menu.lst to restart Easy2Boot and generate a new Main menu.
  • The ‘Enable\disable FASTLOAD’ menu entry can be suppressed using ‘set NOFLDMNU=1’ in your \_ISO\MyE2B.cfg file
  • The ‘CACHED MENU (FASTLOAD)’ status line in the Main Menu can be suppressed using ‘set NOFLDST=1’ in your \_ISO\MyE2B.cfg file (E2B v1.A0+)
  • See \_ISO\docs\Sample mnu Files\E2B Menu\Fastload.mnu for instructions on how to change the order or appearance of the FASTLOAD menu entry.

Tip: If you look at the cached file \_ISO\e2b\grub\FASTLOAD.MNU, after enabling FASTLOAD, you can see a cached copy of the Main menu. 

WARNING: FASTLOAD does not work correctly using \QEMU_MENU_TEST (run as admin).cmd !!!! 
                   To test the menu system, use RMPrepUSB – F11 for QEMU, or VirtualBox+VMUB, or use a real system – see here.

3. Use text-mode (no graphics, wallpaper or fonts loaded)

To use a text-mode menu that uses the BIOS font, use set GFX=NONE in your MyE2B.cfg file. 

Copy the TextMinimal MyE2B.cfg file from the \_ISO\docs\Templates folder to the \_ISO folder.

Note that fonts and non-English characters are not supported in text mode. Use English characters only.

Also, the E2B_Editor does not work correctly if you use it to edit a text-mode MyE2B.cfg file containing GFX=NONE – the E2B_Editor only works with graphics-mode menus.

4. Use a FAT32 E2B drive

If you have a very slow USB drive or very slow BIOS, consider formatting the E2B USB drive’s first partition as FAT32 rather than NTFS. All the payload files will need to be smaller than 4GB, but it will speed up booting and file enumeration because grub4dos is x2 faster on FAT32 USB drives.  FAT32 has some limitations however if using >4GB files and Switch_E2B.exe only works fully on NTFS drives. 

5. Use a compressed background .bmp file or a small .jpg file

Loading a large bmp or jpg file can take time when using a graphical menu system.

You can specify your own wallpaper .bmp file using the \_ISO\MyE2B.cfg file. 

You can use the LZMA tool (\_ISO\docs\E2B Utilities\LZMA) to compress the bitmap file so that it loads faster.

Tip: Use only a few colours in your bitmap so it will compress well.
The smaller the file, the quicker it will load.

E2B can also use non-progressive .jpg files as a background file – these often tend to be smaller than .bmp.gz files and will load faster.

It is not worth compressing .jpg files because they are already compressed. 

Note: grub4dos version 0.4.5c (old versions of E2B) does not support jpg files. 

Use graphics mode but don’t load any wallpaper

You can define a single colour for the menu background instead of using a picture file by specifying an RRGGBB colour value in the \_ISO\MyE2B.cfg file, for example:

set MYWBMP=0xff0033 

5. Don’t load a font file on start-up if using a graphics mode

If you do not need to use non-ASCII special characters, e.g. Ü, in your filenames or .mnu and .txt files, then there is no need to load the large unifont.hex.gz 1MB font file on startup in a graphics mode.  To suppress this, edit your \_ISO\MyE2B.cfg file and add a NOUNIFONT=1 setting: 

set NOUNIFONT=1

Only the BIOS font of the PC will be used.

Fonts are not loaded if a text mode configuration file is used.

Other tweaks

The following tweaks will have a smaller affect on menu load speed… 

Suppress searching for a ‘Helper’ USB Flash drive (E2B Removable drives only)

E2B searches for a USB ‘Helper’ Flash drive on startup and when the Windows menu is loaded. 

If your E2B USB drive is a Removable USB Flash drive (as listed by RMPrepUSB) then you can suppress this search as a Helper USB drive is not needed. 

In your \_ISO\MyE2B.cfg file add:

set NOHELPER=1  ;; #Only use if E2B USB drive is a Removable drive

This setting is usually added into the MyE2B.cfg file for you when the E2B USB drive is made using Make_E2B.exe.

Delete surplus xml files

You can delete surplus .xml files and .key from the \_ISO\WINDOWS\xxxx sub-folders. 

Do NOT delete the \AutoUnattend.xml and \Unattend.xml files in the root of the E2B USB drive (you can set the Hidden attribute on these two files if you wish to hide them in Explorer).

Organise your payload files

Keep the number of files in the \_ISO folder to a minimum (don’t use it for non-essential files). Conside moving some payload files to your own new menu folders if there are already a lot of files in the standard menu folders. 

Compress files

It may make a small difference if you compress some of the larger files (use 7zip .gzip compression or better yet, lzma by using \_ISO\docs\E2B Utilities\LZMA\LZMA_Encode.cmd). Try compressing the menu.lst, E2B.cfg and all .g4b files in the \_ISO\e2b\grub folder. Don’t compress payload files! Keep the filename of the compressed file the same (with the same file extension). This also can help to make the E2B drive more secure. In practice, the speed benefit will be very slight and this is only worth doing on large files or if you want to ‘hide’ the plain text from prying eyes. Note: E2B Update will replace these files with the uncompressed version.

If you use a large \_ISO\MyE2B.cfg file, delete all comment lines (starting with # or ###) as they are ignored by E2B anyway (the benefit will be very small though!).

New! Ventoy for Easy2Boot v1.0.97 now released!

 

eBooks available (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 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.