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.

Procedure:

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
    c. DISCONNECT THE E2B USB DRIVE
    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.

How to repair Master Boot Record (MBR) on Windows 10

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

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.