Windows

Rebuild the BCD with bootrec When Windows Won't Boot

Published ✓ Verified ⏱️ 2 min read February 4, 2025 · by Ryan Bennett

Windows fails to boot — a black screen with a blinking cursor, or a message about missing/corrupted boot data — and Startup Repair didn’t fix it.

Why: The boot records that hand control to Windows are damaged. Microsoft’s guidance for this Boot Loader phase is to run Startup Repair first, and if that fails, repair the boot codes and rebuild the Boot Configuration Data (BCD) manually with bootrec.exe.

Step 0: Open the Command Prompt in Windows RE

Boot from a Windows 11 installation USB (or let Windows RE appear after failed boots), then:

  1. At the Install Windows screen, select Next > Repair your computer (or press Shift + F10 for a Command Prompt directly).
  2. Go to Troubleshoot > Advanced options > Command Prompt.

Fix 1: Repair the boot codes

bootrec /fixmbr
bootrec /fixboot

/fixmbr writes a standard master boot record to the system partition without touching the partition table — use it to clear MBR corruption or non-standard code. /fixboot writes a fresh boot sector. Restart and check; if Windows still won’t boot, continue.

Fix 2: Scan for installations and rebuild the BCD

bootrec /scanos
bootrec /rebuildbcd

/scanos scans all disks for Windows installations that aren’t currently in the BCD. /rebuildbcd lists what it finds and asks whether to add each one to the BCD store — type Y to add it. Restart and test.

Fix 3: Fully export and rebuild the BCD store

If /rebuildbcd finds zero installations, or the boot problem persists, wipe the store and rebuild it cleanly:

bcdedit /export c:\bcdbackup
attrib c:\boot\bcd -r -s -h
ren c:\boot\bcd bcd.old
bootrec /rebuildbcd

This backs up the current BCD, strips the read-only/system/hidden attributes, renames the old store aside, and rebuilds from scratch. Restart afterward. If your Windows install shows under a letter other than C: in the recovery environment, substitute that letter throughout.

FAQ

Will any of this delete my files? No. bootrec and the bcdedit /export sequence only touch boot records and the BCD store; your data is safe.

bootrec /fixboot returns “Access is denied”. Common on UEFI systems. Skip it, run the Fix 3 export-and-rebuild sequence, or let Startup Repair handle the EFI partition.

In what order should I try these? Startup Repair first, then Fix 1, then Fix 2, then Fix 3 — fastest and safest to heaviest. Most boot-record failures clear up by Fix 2.

Sources: Microsoft Learn — Windows startup issues troubleshooting, Microsoft Support — Startup Repair

↑↓ navigate · ↵ open · Esc close See all results →