How to fix a Windows boot issue

Scenario: Your Windows PC\notebook will no longer boot to Windows from it's internal hard disk\SSD.


Legacy or UEFI?

Windows can be booted it two very different ways: Legacy or UEFI.
To repair a Windows installation you must boot from the ISO or Recovery files in the same way that Windows was booted in.

Many systems can boot in both Legacy mode (sometimes called CSM or BIOS or MBR mode) and UEFI mode.

  • If your Windows internal system disk (usually the first disk) is a GPT-partitioned disk then your Windows system must have been booted via UEFI.
  • If your Windows internal system disk (usually the first disk) is NOT a GPT disk then your Windows system must have been booted via a Legacy BIOS boot.

You can check the partition type using one of these methods:

  1. In E2B - Utilities menu, use List BIOS Disks - a partition type of 0xEE shows the drive is has GPT partitions.
  2. In agFM - F3, the Windows disk will show 'gpt' type partitions - e.g. hd1,gpt1.
  3. In WinPE - DISKPART - LIST DISK, there will be an asterisk in the GPT column of GPT disks.
E2B Utilities Menu - List BIOS drives (hd0 is the E2B USB drive)
agFM F3 Menu showing GPT disk 1
Diskpart showing Disk 1 is a GPT disk (disk 0 is the E2B USb drive).

If your Windows disk is GPT you MUST EUFI-boot to the E2B USB drive (typically the agFM menu system will load).
If your Windows disk is Legacy (not GPT) you MUST Legacy\BIOS\CSM boot to the E2B USB drive (typically the E2B menu system will load).

Fixing the Windows system

Note: NEVER set the first boot device as the E2B USB drive - the BIOS boot menu should be set to boot from your internal Windows system drive. Always boot from the E2B USB drive using the BIOSes Boot Select pop-up menu (using a hotkey such as F8 or F12).

  1. Use the Microsoft Windows Install ISO
    a. Boot to E2B\agFM in the correct way - Legacy or UEFI (see above)
    b. Select and boot to the ISO
    d. Choose the Repair option - Startup Repair

If you have booted using E2B from a WinPE ISO, ensure the file has a '01' file extension - e.g. WinPE.iso01 or WinPE_.iso01.iso.
This ensures that the first internal hadr disk is recognised as the 'boot device' and not the E2B USB drive!

Important note: Always disconnect the E2B USB drive once you have booted to WinPE (which loads into RAM). This prevents the USB drive from accidentally being 'repaired'.

WinPE commands for a quick fix

Get to the Windows Command prompt and try these commands which operate on the 'boot drive'.

Note: Ensure you disconnect the E2B USB boot drive first in case it thinks the boot disk was your USB drive and installs Windows boot code/files onto it!

This assumes you have a standard Windows system (do not use if you have a dual-boot Linux/Windows system).

  • bootrec /fixmbr (will appear to be successfully even if you Legacy-boot to USB and use on a GPT\UEFI disk)
  • bootrec /fixboot (will appear to be successfully even if you Legacy-boot to USB and use on a GPT\UEFI disk)
  • bootrec /scanos (will appear to be successfully even if you Legacy-boot to USB and use on a GPT\UEFI disk)
  • bootrec /rebuildbcd

You can use Diskpart - List Vol to view the volumes and List Part to view the partitions.
Use SEL VOL or SEL PAR to select a partition. Use ASSIGN LETTER=V to assign it a drive letter if it does not have one.

For legacy booting:
bcdboot C:\Windows /s C:\ (Recreates the system partition files on C: with those copied from C:\Windows (change drive letters as appropriate).

For UEFI booting:
bcdboot C:\Windows /s V: /f UEFI (you must use Diskpart to assign the V drive letter to the 100MB EFI FAT32 Hidden partition)

For both Legacy and UEFI:
bcdboot C:\Windows /s V: /f ALL (where you have used Diskpart to assign the V drive letter to the 100MB EFI FAT32 Hidden partition)

To make a Legacy disk bootable, use:
bootsect /nt60 SYS /mbr (Rewrites boot code to the system partition and updates your master boot record with legacy boot code)
Note: Ensure you disconnect the E2B USB boot drive first in case it thinks the boot disk was your USB drive!

Master Boot Record - The first sector on the whole drive and contains a boot loader as well as information about partitions on the drive.
Volume Boot Record (aka Partition Boot Sector/System Partition in MS terminology) - The first sector on a partition containing information to load an operation system.

Quick fix commands for repairing Windows

You can try to fix any corrupted Windows files using:

sfc /scannow /offbootdir=D:\ /offwindir=D:\Windows

A separate DISM command can scan the Windows component store for corrupt files and automatically repair them:

DISM /Image:D:\ /Cleanup-Image /RestoreHealth

Back to Index

E2B USB drive is not listed by UEFI BIOS as a boot device

An E2B USB drive contains an MBR partition on the first sector of the USB drive.

The MBR (Master Boot Record) contains a partition table consisting of four 16-byte entries.

For UEFI-booting, a FAT partition is required, so one of the partitions should be FAT (FAT12/FAT16/FAT32).

The second partition on a typical E2B USB drive will contain a FAT32 partition with the UEFI boot files on it.

The boot file \EFI\BOOT\BOOTX64.EFI is required for UEFI64 booting (or BOOTIA32.EFI for UEFI32 systems).

The UEFI BIOS is more fussy than the old Legacy BIOS about the MBR partition table.

If one or more of the four entries in the partition table is not in ascending order or overlaps another partition entry then the UEFI BIOS will refuse to access the drive and the UEFI shell may ignore one or more of the partition on that drive.

To check the partitions:

  1. Legacy\MBR boot to the E2B USB drive (tip: you can use QEMU_MENU_TEST (run as admin).cmd under Windows if you don't have a BIOS system).
  2. Go to the grub4dos command line (e.g. SHIFT+P - enter password - SHIFT+C)
  3. On the grub4dos command line type checkptns (hd0) (default is hd0)
checkptns will warn you if the partitions are not in order

Also, on the grub4dos command line type graphicsmode 3 and press ENTER then type display_ptns (hd0) to view the table

Partitions of Type 0 are ignored by UEFI and Windows.

Note: A typical issue is that you have previously selected a .imgPTN file and it has added/replaced a new partition which is only suitable for Legacy\MBR booting.
In this case, Legacy/MBR boot to the E2B CSM menu and choose the Restore E2B menu option.

Alternatively, type RestoreMBR if you cannot restore the original E2B partitions after using a .imgPTN file.

If all else fails, you can use a disk editor to remove partitions (or use RMPrepUSB to view and edit the MBR).

Back to Index

UEFI: agFM/Ventoy Menu not loading or ISOs not running [on one particular system]

If you have checked the UEFI/BIOS settings and they appear to be correct for UEFI-booting, but when you try to UEFI-boot you find that the agFM menu does not appear or when you select an ISO it does not seem to boot (or the USB drive LED flashes for a while and system hangs), or other strange things occur with agFM or Ventoy, then I recommend you reset the BIOS settings.

Go to BIOS Setup menu and find the 'Exit' Menu, then choose the 'Load Default Settings' option (or similar) and any other 'default', reset or Factory settings options you can see.

Then save the changes and reboot back into the BIOS Setup menu and ensure the settings are correct for Legacy and UEFI booting.

USB Legacy: enabled
Fast Boot: disabled
Boot Mode: Legacy (CSM) - if you want Legacy booting
For Secure Boot, I suggest you clear the DBx keys (if possible), or Restore Factory Keys

Back to Index

E2B hangs when loading XP ISO (Step 1)

It has been reported that some systems hang just after loading the XP ISO into memory during Step 1 XP Install but that earlier versions of E2B do not have this issue.

Try making an E2B USB drive using E2B v1.B1 (you can just click on the 'Update E2B drive' button of v1.B1 to change to the earlier version).

If your system works with v1.B1 and not with v2 of E2B, please could you contact me as I would very much like to identify and fix the issue which I think is due to the version of grub4dos (\grldr) that is used. To test this, make a v1.B1 version of E2B and check that it works with your XP ISO. Then replace the \grldr file with the \grldr file from the latest version of E2B and see if XP fails to load. Also try answering 'N' for No when it asks you about loading the ISO into memory. Please also report the system make\model and the total RAM in the system. Thanks!

Back to Index

'Cannot find GRLDR' BIOS text message on legacy boot

If you are using an E2B USB drive larger than 128GiB and have updated it, the \grldr file may now be outside the 128GiB limit.

Some buggy BIOSes have a USB drive bug and cannot access sectors past 128GiB on a USB drive, that is why I strongly recommend the first partition (and second) are within 128GiB of the start of the disk.

The solution is to remake your USB drive using a smaller partition 1 (below 128GiB) and then copy all your payload files back on (or don't use systems with buggy BIOSes).

If Partition 1 is less than 128GiB then you may have a corrupt NTFS filesystem or the \grldr file may be missing. First fix the filesystem (e.g. using chkdsk U: /f where U: is E2B partition 1) and then copy all the files from the E2B download back onto the E2B USB drive (overwriting any existing files - your payload files and MyE2B.cfg file will not be changed).

Back to Index

When UEFI-booting using Virtual Box under Windows, the VM display switches to a very high resolution, how can I prevent this?

I use Virtual Box v5 + VMUB.

  1. UEFI-boot from the E2B USB drive to agFM
  2. Press F4 and then T to switch the menu system to textmode
  3. Now press F2 and select your ISO/payload file and boot from it.

If using Ventoy, try pressing F7 for text mode before selecting the ISO/payload file.

Back to Index

File not found - xx\xx\xx\DISKPART.SCR when running Make_E2B script

Please try E2B installer with E2B v2.10b Beta or later.

The bug in Make_E2B_USB_Drive.cmd occured if your %temp% environment variable contains one or more spaces.

Back to Index

E2B USB drive will not now UEFI-boot to agFM menu (but did before)

If your E2B USB drive was happily UEFI-booting to the agFM menu system before, but now your BIOS refuses to UEFI-boot to it (e.g. it does not offer any option to UEFI-boot to any partition), then the usual reason is that you have accidentally caused an extra partition entry to be added to the E2B partition table.

This can sometimes happen if you are using .cfg or .grubfm files which use the 'partnew' grub2 command and you have made a mistake in the menu code (perhaps not defined the filename of one of the files?).

The easiest way to fix it is to Legacy-boot to the E2B menu - if there is an extra partition added (usually partition 4) then E2B will warn you and allow you to delete it.

Most UEFI BIOSes require that the primary MBR partitions are in ascending order and do not overlap each other. If such an extra partition is added (with a non-zero type number), then the BIOS will ignore the whole disk!

Tip: You can use the Windows utility RMPrepUSB.exe to view the MBR partition table entries ( Drive Info - 0).

Back to Index

0xc000000f BSOD error

If you are UEFI-booting, try both the agFM and Ventoy for Easy2Boot menus.

Try these fixes in this order.

  • BIOS setting on PC may need to be set to UEFI: 'Boot other OS' instead of UEFI: 'Microsoft Windows'
  • Disable 'Secure Boot' in BIOS settings
  • If booting a .VHD, .VHDX or .WIM, make sure the filename has no spaces in it.
  • Convert the ISO to a .imgPTN23 file using MPI Tool Kit
  • If the .imgPTN file still gives same error and a BCD issue is indicated, use BootIce to examine and repair the BCD file

Back to Index

0xc000014c or 0xc0000178 BSOD errors when booting to Windows\WinPE - but only on some systems.

If you find that some systems give BSOD errors but other systems boot correctly when using the same USB drive, this is often an indication of a USB I/O communication problem (hardware issue) with the USB port.

Example: Lenovo IdeaPad 300 notebooks

Frequently, this can be due to signal integrity issues and occurs with high-speed USB 3 drives when connected to a USB 3 port.


1. Connect the USB 3 drive to a USB 2 port on the computer.

2. If no USB 2 port is available on the computer, then connect the USB 3 drive to the system using a USB 2 extension cable. This forces USB 2 data rates to be used.

Back to Index

How do I change the E2B background wallpaper?

  1. Place your 800x600 32-bit colour .jpg or .bmp file in the \_ISO folder of the E2B USB drive.
  2. Launch the \_ISO\E2B_Editor.exe program. This allows you to edit\create a \_ISO\MyE2B.cfg file which can specify the resolution and default wallpaper file.

The menu display mode is determined by the setting in the \_ISO\MyE2B.cfg file. Use 800x600 32-bit colour (or 1024x768 but may not work on older systems). Do not exceed 1024x768 or else grub4dos may crash!

.jpg files must be in standard non-progressive 100% format (use Microsoft Paint to re-save it).

agFM and Ventoy use different menu systems. agFM can use a simple background picture on a text-based menu. agFM and Ventoy can also use a grub2 theme.

Change the other E2B menu backgrounds

To change the background loaded by any E2B menu, you can place a .bmp or .jpg file in the \_ISO folder which has the same folder name as the menu folder.

For instance, if you copy over an 800x600 32-bit colour .jpg file \_ISO\MAINMENU.jpg, it will be loaded when the MAINMENU folder is displayed.

If you have a \_ISO\LINUX.bmp 800x600 32-bit colour file, it will be loaded when the LINUX folder is displayed.

If you have a \_ISO\UTILITIES_MEMTEST.jpg file, it will be loaded when the MEMORY TEST menu is loaded.

Tip: .jpg files will be smaller and quicker to load.

Back to Index

How do I change the order of items in a menu?

E2B will sort the files into alphabetical order.

The easiest way to change the order is by using a sort order prefix - e.g. _010_Ubuntu x86 64-bit.iso

E2B will automatically remove any _xxxxx_ prefix when it displays the filename in the menu.

The agFM and Ventoy menu systems will list the complete filename however.

Back to Index

How do I change the menu entry for a payload file?

In most cases you can simply rename the payload file - e.g. change blackarch-linux-full-2020.12.01-x86_64.iso to BlackArchLinux 2020.12.01.iso.

Avoid using filenames with special characters such as = & # $ which may cause problems with the E2B, agFM and Ventoy menu systems.

The other alternative is to create a new matching .txt file which has the same name as the payload file

  • blackarch-linux-full-2020.12.01-x86_64.iso
  • blackarch-linux-full-2020.12.01-x86_64.txt

A UTF-8 encoded text file saved using Windows NotePad if non-English characters are required.

A .txt file can be used to display a different menu title for the iso file of the same name. The contents of .txt file must be a single line - for example:

iftitle [checkrange 2,3 is64bit] ^Alt+B BlackArch Linux 2020.12.01 [Alt+B]\nThis is the x86 64-bit version\nof BlackArch Linux\nIt will only be displayed on systems\nwith a 64-bit CPU

You can use the .TXT file maker utility to help you make the file and you can define a hotkey and up to four lines of help text. You can use \E2B Launcher.exe to run the .TXT Maker utility.

Note:: Using ALT+ hotkeys can sometimes cause problems when booting Linux ISOs because the syslinux bootloader may detect that the ALT key is depressed!

You can see the E2B menu entry below, the ISO filename is no longer listed but the contents of the .txt file are used instead:

Back to Index

Windows ISO error: 'A media driver your computer needs is missing'

If you see a message asking for a 'DVD' or 'CD' then this means that Windows Setup cannot find the installation files.

Setup is looking for the very large install.wim or install.esd windows installation source file (usually in the \Sources folder) on all drives in the system. If it cannot find this file then you will see this message.

There are usually two reasons for this:

  1. Windows Pre-Installation Environment (WinPE) does not contain the necessary USB driver (e.g. USB 3 driver) and so cannot 'see' the E2B USB drive.
  2. If booting from an ISO file (using isowin) via E2B or agFM, the Windows Pre-installation start-up will usually load a special blue cmd shell box which will find and load the ISO file as a virtual DVD drive - e.g. Y:.
    Windows Setup will then find the install.wim/install.esd file on the new Y: drive. If you don't see the cmd window run (see below), then you may not have chosen the correct menu or file extension for the ISO, or your ISO is not compatible with that boot method.
A cmd window will usually run to load the ISO as a virtual DVD drive
Sometimes a small cmd window can be seen on start-up


  1. If booting using the Easy2Boot legacy menu, ensure you have the ISO in the correct \_ISO\WINDOWS\xxx folder. If booting using agFM, ensure you select the .isowin boot option which is for booting Windows ISOs.
  2. Try a different menu system, e.g. try agFM or 'Ventoy for Easy2Boot'.
  3. Try a USB 2 port instead of a USB 3 port (or connect the USB 3 drive to the computer using a USB 2 cable)
  4. Convert the ISO to a .imgPTN23 file using the MPI Tool Kit
  5. If the WinPE environment cannot 'see' the USB drive, then even a .imgPTN23 file will not work. You will need to modify your ISO by adding USB drivers into the boot.wim file.

Back to Index

Why am I prompted to select an XML file when installing Windows?

An XML file can contain various 'unattend' settings for the install such as the Windows Edition (Home/Pro/Ultimate, etc.), Country, Language, disk partitioning details, core components, etc.

The Home or Pro XML files provided by E2B contain generic Windows installation-only Product Keys which are used to force Windows Setup to install that particular Windows Edition.

Most Windows 10 ISOs actually contain multiple different editions of Windows (e.g. Basic/Core, Professional, Ultimate, etc.).

For instance, if you install Windows from a Windows 8.1 ISO, it will not allow you to continue unless you enter in a valid 25-character Product Key. By choosing the correct XML file, we can force Setup to skip this step because the XML file contains a generic Product Key (e.g. for Core or Professional).

Another example: You have a Dell PC which came pre-installed with Windows 10 Home and you have since upgraded it to Windows 10 Pro. Now you want to wipe the disk and re-install a fresh version of Windows 10 Pro - but every time you try, Setup keeps defaulting to installing Windows 10 Home because the UEFI firmware has the Dell Win10 Home Product Key embedded in it's firmware! So in this case, you can choose a Win 10 Pro XML file and then Setup will install Windows 10 Pro.

Another example: Some XML files contain all the settings to full automate the installation. Setup will automatically wipe, partition and format the target hard disk and then install a fresh copy of Windows onto it. It will then reboot and complete the OOBE setup, add a User Account (with password) and configure any other settings.

For more details see here or eBook #3.

Back to Index

How do I remove the rotating E2B icon and boiler plate from the menu?

These items are caused by entries in the \_ISO\MyE2B.cfg file.

You can play/remove the animation by pressing F2 when the E2B menu is displayed.

To remove the animation and boiler plate, edit the \_ISO\MyE2B.cfg file using Notepad and delete the STAMP1, ANIMFD3 and ANIMATE lines:

  • set ANIMFD3=/_ISO/docs/Templates/Animate/E2B_GIF.ima
  • set ANIMATE=0x90=3=9=615=160 (fd3)/frame_0001.bmp
  • set STAMP1=0x80=570=23 /_ISO/e2b/grub/E2BPlate.bmp

Instead of deleting the lines, you can just insert a # symbol at the start of each line - see here for more details about stamps and animation.

Back to Index

How do I remove the initial, blue 'Easy2Boot' start-up banner screen?

This start-up banner (and the 5-second delay) can be removed by following the instructions in eBook #1.

If you have already made a donation of £5 or more, please Contact Me for instructions.

More Information

E2B eBooks are available here.

If you are interested in automated Windows install, read eBook #2.

Details on how to make a pure-UEFI multiboot E2B drive (with links to some sample files) can be found in the E2B UEFI multiboot eBook #4.

For a fast, reliable USB drive for use with E2B and WindowsToGo, I recommend the Sandisk Extreme Pro USB 3.1 (#ad Amazon affiliate link).

Back to Index

UEFI64 boot to agFM menu fails with blank\black screen and no messages (maybe with cursor at top-left) but only fails on some computers (others computers UEFI64-boot OK)

Some computers (e.g. Zyrex or Lenovo IdeaPad s145, new Acer laptops, etc.) may not UEFI64 boot to the Kaspersky Shim EFI file.

This may be due to it being blacklisted in the BIOS (perhaps in the DBx blacklist?).

UEFI64 booting may just give a blank screen, a cursor or a dot.

To fix this, we need to remove the Kaspersky shim and replace it with the agFM EFI boot file...

Either Legacy Boot to E2B Main Menu (e.g. using \QEMU_Menu_Test,cmd under Windows or a Legacy system) and use the 'Disable UEFI64 Secure Boot (blank screen BUGFIX)' menu entry...


On Partition 2:

  1. Copy the file \grubfmx64.efi to \EFI\BOOT folder
  2. Make a copy of the file \EFI\BOOT\BOOTX64.EFI (if BOOTX64.KAS does not already exist)
  3. Delete \EFI\BOOT\BOOTX64.EFI
  4. Rename \EFI\BOOT\grubfmx64.efi to BOOTX64.EFI

Back to Index

When the Make_E2B .cmd file runs it just immediately quits and no message is displayed.

The most common reason is that your Windows PATH variable is bad. At the Windows command prompt type (not if XP OS)

where wmic
where find

These should return the path of the wmic.exe and find.exe files which are normally at C:\Windows\System32 and C:\Windows\System32\wbem.

Note that find.exe should NOT be a cygwin version but the windows\system32 version!

If these commands fail, you need to fix you PATH in Windows - see here https://exitcode0.net/adding-wmic-command-to-the-windows-path/ or just run SystemPropertiesAdvanced.exe from an Admin cmd prompt to edit the PATH system variable.

Try running the MAKE_E2B_USB_DRIVE (run as admin).cmd file by just double-clicking on it - you should see the a message to run it as Administrator. Then press ENTER and it should quit.

Now right-click on the same file and choose 'Run as Administrator' and answer the UAC prompt - if the script now seems to run very quickly but then abort with no message displayed, you may have a problem with Administrator access on your system. Did you make any changes to UAC control or any Administrator account permissions?

To debug the issue, find ".\_ISO\docs\Make_E2B_USB_Drive\DebugAll_MakeE2B_Admin.cmd" in the download folder and right-click on it and choose 'Run as Administrator' - the batch file commands will now be echo'd to the console - answer any questions if prompted until the console disappears. Now open the e2b.log file that should have been created in the same folder and examine the last lines to establish the cause of the problem or send the e2b.log file to me at steve (at) easy2boot dot com.

Back to Index

'Secure Boot violation' or 'Operating System Loader signature found in SecureBoot exclusion database' - Secure Boot no longer works.

Cause: Windows Update has blocked the Kasperksy Boot file used by agFM


Go into UEFI BIOS setup options and clear the DBx key blacklist list.

OR - disable Secure Boot in the UEFI BIOS setup options

OR - convert your ISO (or any payload) to a .imgPTN23 file using the MPI Tool Kit (the payload must have a signed EFI boot file and support Secure Booting)

See https://rmprepusb.blogspot.com/2021/01/latest-windows-update-kb4535680-blocks.html

Back to Index