Commands · Command

CommandWindows

bootrec

bootrec [/fixmbr | /fixboot | /rebuildbcd]

Repairs a Windows installation that won't boot, by rebuilding the boot sector, boot configuration, or master boot record — run from the Windows Recovery Environment command prompt, not a normal desktop session.

// FLAGS

/fixmbrwrite a new master boot record without overwriting the partition table
/fixbootwrite a new boot sector
/rebuildbcdrescan disks for Windows installations and rebuild the Boot Configuration Data store

// EXAMPLE

bootrec /rebuildbcd — scans for Windows installations and offers to add any missing ones back into the boot menu.

// GOTCHA

bootrec only works from WinRE (booted off installation media or the recovery environment) — it can't be run from within a normally-booted Windows session.

// RELATED COMMANDS