The 128Gib/137GB USB BIOS bug!

Many BIOSes have a bug in their USB driver code when means that they cannot access sectors on a USB drive which are beyond 137GB (128GiB or 134000 MiB). This bug has been seen in AMI BIOSes (2006, 2009, 2010), ASUS P5Q PRO motherboards and Asus EeePC’s to name but a few! As this bug is in the USB BIOS code, it does not affect UEFI-booting or booting from an internal SATA/IDE/SCSI hard disk.

grub4dos (as used by E2B) uses the BIOS for file access on the USB drive (as does grub2 and syslinux) and so is affected by this BIOS bug. If you are booting from a USB drive which has a first partition of a greater size than 137GB, then you may find that some payload files (or even E2B) will refuse to run. E2B checks that the last sector of the last partition can be accessed by grub4dos and thus by the BIOS. Typically, you will see an E2B message like ‘ERROR: xxxxx.iso is not contiguous (or is corrupt or missing)!’ 

If you press a key, you may then see a grub4dos ‘Error 16: Inconsistent filesystem structure‘ message. This indicates that some part of the file could not be read (or was corrupt). If you are using a large USB drive for E2B, you should create the first partition to be less than 137GB and place all E2B and payload files in the first partition. Once you have booted to linux or Windows, the 137GB limitation will disappear because they load their own USB drivers and do not use the BIOS for USB disk access. 

WARNING: THIS BIOS MAY HAVE PROBLEMS ACCESSING SOME FILES ON THIS DRIVE! 

 E2B will usually give you this ‘BIOS BAD’ warning when it boots from such a buggy BIOS if your USB drive is greater than 137GB in size, because it tests to make sure it can access sectors at the end of the last partition. If you see this message as E2B boots, you can expect any file located on the USB drive which is beyond 137GB to be inaccessible and not load properly! If you want to suppress this message (so you have no idea if you have a bad BIOS!), add set CHECKBIOS= to the bottom of your \_ISO\MyE2B.cfg file. 

!BAT
# some lines here?
set CHECKBIOS=

Workaround – replace the BIOS USB driver

grub4dos can load it’s own USB 2.0 driver which is usually faster than the BIOS’s own driver and does not have the 128GiB bug. However, it only supports older USB 2.0 controllers.

Use the menu entry in the UTILITIES menu to install it.

If your device only has USB 3.0 ports and you have a USB 3 E2B drive, try connecting it using a USB 2 cable so that it is forced to use USB 2.0.

If the port is a USB 3 port or a modern USB 2.0 port however, then the grub4dos USB 2.0 driver probably will not detect the USB drive when installed. 🙁

Tip: Try holding down the SHIFT key just as E2B starts to boot – this will install the grub4dos USB 2.0 fast read/write driver which does not have the 128GiB bug.

Drive or Partition larger than 128GiB?

You can try to reduce the E2B partition by removing a few large payload files and defragging the USB drive using a Windows defrag tool. Then use the Windows Disk Manager or AOMEI Home Partition Master to reduce the size of the first partition to 137GB or less.  If the USB drive contains a second small partition, you can delete it and then create a new Primary second partition which you can use to store files on (for example, backup images, portable apps, etc.). This will work because once you have booted into Windows or Linux, there will be no problem in accessing the second partition which is beyond 137GB on the USB drive. Note however, that most Windows OS’s will only see the first partition on Removable types of  USB drive (Windows 10 1703+ should be OK).

Legacy booting to agFM

Note: If you also want to boot to the agFM Legacy menu system from the E2B grub4dos menu, then ensure that Ptn1+Ptn2 does not exceed 128GiB. The grub2 agFM files are located on Partition 2 and therefore should not be located beyond 128GiB in case you come across a ‘bad’ BIOS.

Multi-buy discount 10%

eBooks (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 (not AI generated!) 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.