guide · static export
PC · boot

Repair a Boot Failure with Bootrec and Bcdboot

A machine that shows no boot device or drops into recovery usually has a damaged boot record, not a dead disk. bootrec and bcdboot rebuild the parts separately, and each command has a different job.

by@guidox updated:11/01/26 time:30 min level:Advanced tested on:Windows 11 24H2 works on:Windows 10, Windows 11, Windows Server 2019 tools:Windows recovery environment, Command Prompt
TL;DR

From WinRE, run **bootrec /scanos**, then **bcdboot C:\Windows /s S: /f UEFI** to rebuild the boot files, and **bootrec /rebuildbcd** to register the installation. Check the disk with **chkdsk** before trusting either.

Before you start

Requirements

  • A Windows USB or the built-in recovery environment
  • Admin rights in WinRE
  • 30 minutes
Step by step

Instructions

01

Get into WinRE and find the Windows volume

Recovery letters differ from the running system. **diskpart** shows the real layout, and the Windows folder tells you which letter is the installation.

reagentc /info
wmic logicaldisk get deviceid,volumename,size
for %d in (C D E F) do @if exist %d:\Windows\System32\winload.exe echo %d is Windows
02

Check the disk before repairing the boot files

A failing disk produces the same symptoms as a broken boot entry. **chkdsk** finds bad sectors and file system damage that no boot command can fix.

chkdsk C: /f /r
diskpart /c "list volume"
Get-PhysicalDisk | Select-Object FriendlyName,MediaType,HealthStatus,OperationalStatus
03

Rebuild the boot files for the right firmware

**bcdboot** copies the boot manager from the Windows folder to a system partition. On UEFI systems the target partition must be FAT32 and the firmware type must be UEFI.

diskpart /c "select volume S"
diskpart /c "assign letter=S"
bcdboot C:\Windows /s S: /f UEFI
bcdboot C:\Windows /s S: /f ALL
04

Repair the master boot record for a legacy disk

**/fixmbr** rewrites the boot code, **/fixboot** writes a new boot sector. Both matter only for BIOS or MBR installations; on GPT with UEFI they are harmless but not the fix.

bootrec /fixmbr
bootrec /fixboot
bootrec /scanos
bootrec /rebuildbcd
⚠ warningOn a GPT disk the correct sequence is bcdboot first. Running /fixmbr on a disk with a mixed layout can remove a working boot code path.
05

Verify the store before you restart

**bcdedit /enum** must list a Windows Boot Manager with a device and a timeout. An empty store means bcdboot wrote to the wrong partition.

bcdedit /enum
bcdedit /enum {default} | findstr /i "device osdevice path description"
dir S:\EFI\Microsoft\Boot
06

Restart and check the logs if it still fails

A successful repair boots into Windows and leaves a clean boot log. A failure that repeats points at a driver or a pending update, which the setup and boot logs name.

wpeutil reboot
:: after the boot, if it failed
dir C:\Windows\Panther\*.log
wevtutil qe System /q:"*[System[(EventID=41 or EventID=1001)]]" /c:5 /f:text
Troubleshooting

Common issues

bcdboot says the volume is not valid

The system partition is not FAT32 or has no EFI folder. Format the EFI partition as FAT32 with diskpart, then run bcdboot again.

Access is denied for /fixboot

The boot sector belongs to another volume, or the disk is write-protected. Confirm with diskpart detail disk that the disk attribute is not set to read-only.

The repair works but fails again next week

Something rewrites the boot entry, usually a second installation or a backup tool. Check the boot order in the firmware and the setup logs for a second entry.

bootrec /scanos finds nothing

The Windows folder is on a volume the recovery environment cannot read, which points at a missing storage driver. Use a recovery medium with the right driver.

FAQ

Frequently asked

Do I need a USB stick?

Not always. If Windows still starts far enough, reagentc /boottore or shutdown /r /o opens the same recovery environment from the disk.

Is Startup Repair the same as these commands?

No. Startup Repair is an automated attempt; bootrec and bcdboot are the manual steps it tries. Running them by hand shows which one fails.

Can this recover lost files?

No. It repairs the boot path. Once Windows starts again, use a file recovery tool before writing anything else to the disk.

How to undo this

bcdboot only writes boot files. To undo it, remove the entry with bcdedit /delete {identifier} or restore a previously exported store with bcdedit /import.

Changelog · 1 entry
  1. 2026-10-31
    First version
Interactive version: checklist, feedback, related guides →

Free · no account needed · tracks your progress