You can use system recovery tools to fix most of your computer problems. However, there are times when you'll need to address such issues in a manual way like, for example, when your computer won't boot. In these cases, you can use a tool named Bootrec.exe. It can help you troubleshoot and repair things like the master boot record (MBR), the boot sector or the Boot Configuration Data (BCD) store. Here's how it works:
Bootrec.exe - The Ultimate Repair Tool For Boot Problems
No matter whether you use Windows 7 or Windows 8.1, if your operating system has trouble booting and Startup Repair can't fix the problem, it's worth trying the Bootrec.exe tool.
In order to be able to use this tool, you'll have to use Command Prompt. However, because you already have startup issues, it's obvious that you won't be able to simply run it from Windows.
If you're on Windows 7, first boot from your Windows 7 Setup DVD or a System Repair Disc. Then launch Command Prompt. You'll find more information about the whole procedure here: An Overview of System Recovery Options for Windows 7.
In case you're using Windows 8 or Windows 8.1, follow the steps described in the third, fourth or fifth section of this tutorial: 5 Ways to Boot into Safe Mode in Windows 8 & Windows 8.1. Depending on the method you choose to boot your system, you'll be able to launch Command Prompt either from the Advanced options or from the Safe Mode interface.
Once you've launched Command Prompt, type the command bootrec.exe and hit Enter to see the options that are available for this tool. As you can see in the screenshot below, there are four parameters available: /FixMbr, /FixBoot, /ScanOs and /RebuildBcd.
Later in this article we'll see how each of them can help you solve boot problems. Keep in mind though, that even if the Bootrec.exe tool can handle most boot problems, it does not guarantee success in every possible scenario.
How To Repair The Master Boot Record (MBR)
The first parameter of the Bootrec.exe tool is /FixMbr. It allows the repair of a corrupted or damaged Master Boot Record (MBR). The Master Boot Record is the first sector of your drive and its purpose is to tell the BIOS where to look for the operating system on your computer. Usually, you will use this parameter when you meet one of these error messages: “Operating System not found", “Error loading operating system", “Missing operating system" or “Invalid partition table".
To start the repair process of the MBR, run:
How To Write A New Boot Sector
The /FixBoot parameter writes a new boot sector to the system partition. The tool will use a boot sector that is compatible with your Windows version, whether it's Windows 7, 8 or 8.1. Using this parameter is useful in the following situations:
- The boot sector has been replaced with a non-standard Windows Vista, 7, 8 or 8.1 boot sector;
- The boot sector is damaged;
- An earlier Windows operating system has been installed after your version of Windows was installed.
To start writing a new boot sector, use the command
How To Rebuild The Boot Configuration Data (BCD)
The Boot Configuration Data (BCD) contains a detailed list of what is supposed to load at startup. Microsoft indicates that a boot error can also be caused by missing or damaged files in the BCD. The /rebuildbcd parameter can be very useful when you must fix some errors by completely rebuilding the BCD.
To completely rebuild the Boot Configuration Data, run this command:
How To Add Missing Windows Installations To The Boot Configuration Data
If your computer has multiple operating systems installed but not all of them are available, use the /ScanOS option. Using this parameter on Bootrec.exe will launch a scan on all disks for any Windows Vista, 7, 8 or 8.1 installations that are not currently included in the Boot Configuration Data (BCD).
In the screenshot below, you can have a look at how this scan process might look.
If the bootrec.exe /scanos command returns results, you will be able to continue the repair process. In the end, you will get the lost Windows installation back into the secure BCD table, thus making it bootable again.
First of all you have to clean the Master Boot Record (MBR) by using bootrec /fixmbr. Next, type bootsect.exe /nt60 all /force and press Enter. The /nt60 parameter applies the master boot code that is compatible with BOOTMGR. The /all argument updates the master boot code on all partitions. The /force parameter forcibly dismounts the volume(s) during the boot code update so that the Bootsect.exe tool does not gain exclusive volume access.
Running all these commands will create a new MBR and tell it to use the correct Windows boot loader in order to load that specific installation from your drive.
As you can from this tutorial, Bootrec.exe is a very powerful tool for troubleshooting and fixing problems with your computer's boot records. If you have any questions, don't hesitate to leave a comment. We'll try our best to help you.