bootrec.exe is the utility that is used to update the master boot record code, partition bootsector code, and the BCD (boot configuration data). It’s most-commonly used to correct boot problems on Windows Vista and later versions of Windows.

Contents

Synopsis

Arguments enclosed with braces {  } are necessary and | stands for “or“.

bootrec.exe {/fixmbr | /fixboot | /scanos | /rebuildbcd}

Description

The bootrec.exe utility takes only one of several valid argument, depending on the desired correction behavior. It can be used to update a disk’s master boot record (MBR) code, a partition’s bootsector code, or to rebuild the boot configuration data (BCD).

The options are as follows:

/?
Lists the existing arguments

/fixmbr
Updates the master boot record (MBR) code with the code compatible with Windows Vista, 7, 8, 10. It doesn’t edit the existing partition table.

/fixboot
Updates the boot sector code of the partition used to boot the system with the code that loads and runs the BOOTMGR bootloader i.e. it works on Windows Vista, 7, 8, 10.

/scanos
Scans all disks for Windows installations that are Windows Vista or of a newer version and returns the number of installations that are not listed in the boot configuration data (BCD i.e. can’t be booted into.

/rebuildbcd
Rebuilds the boot configuration data (BCD) by updating it with a choice to boot into versions of Windows installed on the disk that were previously unbootable i.e. adding them to the boot configuration data.

Exit Status

The bootrec utility exits 0 on success and 1 if an error occurs.

Examples

To update the master boot record (MBR) code of the disk in the case it got corrupt or rewritten, resulting in the inability to boot the system:

bootrec /fixmbr

To update the boot sector code of the partition used to boot the system with the code that loads and runs the BOOTMGR bootloader:

bootrec /fixboot

To scan all the Windows installations on the disk that are not included in the BCD:

bootrec /scanos

To update the BCD with the ability to boot into Windows versions installed on the hard disk that were previously unbootable:

bootrec /rebuildbcd

Compatibility

The bootrec.exe utility is compatible with Windows Vista, Windows 7, Windows 8, Windows 10.

History

Before the bootsect utility introduced the /mbr argument, bootrec /fixmbr was the only way of updating the disk’s MBR.

See Also

bootsect  – command-line utility that is used to update the partition bootsector code and the master boot record code.