How Do I Fix the Master Boot Record (MBR)?

There are a couple of different ways.

If your computer refuses to start, the problem might be the Master Boot Record (MBR). Fixing it isn’t as scary as it sounds. I’ll show you how to use Windows’ built-in Startup Repair and a couple of handy command-line tools to get your machine running again.
Startup Repair
(Screenshot: askleo.com)
Question: Can you tell me how to fix the MBR?

The MBR, or Master Boot Record, is the first sector of MBR-configured hard disks. (GPT-configured hard disks have something similar, but I’ll be referring to MBR unless the difference matters.) In either case, it tells the BIOS or UEFI where on the hard disk to locate the software to be loaded when you boot the computer.

Without an MBR, or with a damaged MBR, your machine won’t boot (power up and load the operating system).

There’s a lot more to booting than just the MBR. Fortunately, recent versions of Windows have made the distinction between these various pieces fairly transparent, referring to all of them as “Windows Startup”.

I’m not sure what led you to ask about fixing the MBR, but repairing Windows Startup will address MBR problems as well as others.

TL;DR:

Fixing startup and the MBR

If your PC won’t boot, Windows has a built-in Startup Repair that often fixes the Master Boot Record (MBR) and other startup issues. Just boot from a Windows setup USB or disc, choose Repair, and run Startup Repair. If that fails, use command-line tools like bootrec /fixmbr.

Startup Repair

Recent versions of Windows now include Startup Repair: software that attempts to fix several problems that can cause a machine to fail to boot. Fixing the MBR is just one of them.

The first logical question to ask is, if you can’t boot the machine, how do you run the boot repair tool?

You boot from something else.

Specifically, you boot from a System Repair Disc (a disk you create beforehand, when the operating system is running), or you download the Windows Setup Disc for your version of Windows, which also has these tools.

I’ll assume the setup disk since that’s more common, and you can download it using a different computer if you need it.

Running the repair

Boot from your Windows Setup CD, DVD, or USB. You’ll first be asked what language and keyboard layout you’ll want to use. (Not shown.)

Click Next. This will bring up the primary Windows Setup screen.

Windows Setup - Options
Select a setup option. Click for larger image. (Screenshot: askleo.com)

Make sure “Repair my PC” is selected, and click Next. (Previous versions of the setup program may have a “Repair your computer” link in the lower left to click instead.)

You’ll be asked for your keyboard layout (not shown) and then presented with a menu of options.

Setup repair menu of options.
The repair menu. Click for larger image. (Screenshot: askleo.com)

Click on Troubleshoot.

Setup repair advanced options.
Advanced options for PC repair. Click for larger image. (Screenshot: askleo.com)

Click on Startup repair.

If the system drive is encrypted using BitLocker, you’ll be asked to provide the recovery key. (If the system drive is not encrypted, you won’t see this screen.)

Startup repair needing your Bitlocker key.
Entering your BitLocker key. Click for larger image. (Screenshot: askleo.com)

You can locate the key saved in your Microsoft account by visiting aka.ms/myrecoverykey. If you have the key saved elsewhere, you can fetch it from there instead.

Enter the key and click on Continue.

Startup Repair - OS
Choosing your operating system. (Screenshot: askleo.com)

You’ll be presented with a list of operating system installations that were found on your machine. In most cases, there’ll only be one, as in the example above. Click on it, and Startup Repair will begin.

Diagnosing your PC.
The repair process starts with diagnosing your PC. (Screenshot: askleo.com)

After it completes, you’ll either be told that nothing could be fixed (as in my case, since there was nothing to be fixed) or that repairs were made and you can reboot your machine.

If Startup Repair explicitly fails or your computer doesn’t start after running it, you can try the command-line tools listed below.

Start repair via the command line

Caveat: I assume that Startup Repair runs these same tools, or their equivalents, for you behind the scenes. In particular, I’m assuming it runs MBR-related tools for MBR-configured disks and GPT-related tools for GPT-configured disks. The hope is that by running them manually, we may get more diagnostic information, if only to provide to a repair technician.

Follow the steps above to boot from the setup disk again, this time clicking on Command Prompt instead of Startup Repair.

Command Prompt option.
Command Prompt option. (Screenshot: askleo.com)

This, naturally, opens up a command-prompt window.

Command Prompt
Command Prompt. (Screenshot: askleo.com)

There are several commands and options available.

bootrec /fixmbr

If all you need to do is fix the MBR, then “bootrec /fixmbr” is the command to run.

bootrec /fixboot

This command attempts to fix the Boot Configuration Data (BCD), which is used by newer boot processes and GPT-configured disks.

bootrec /rebuildbcd

This one rebuilds the Boot Configuration Data (BCD) used by newer boot processes with the operating systems found on the hard disk1.

Unfortunately, errors in these steps are beyond the scope of this article, though as I said, perhaps additional diagnostic information might be made available.

Do this

In almost all cases, running Startup Repair is all that’s necessary. It’ll generally fix things that are fixable. If you need more information or just want to investigate, the Command Prompt is always an option.

Subscribe to Confident Computing! Less frustration and more confidence, solutions, answers, and tips in your inbox every week.

Footnotes & References

1: I believe this will report “0” installations found if only one was found. My theory is that it’s reporting additional installations found.

2 comments on “How Do I Fix the Master Boot Record (MBR)?”

  1. Leo, I have cloned my two PCs, running Windows 10, to two external drives using a software program, Macrium Reflect. If one of my SSD drives should fail, I just replace it with an identical SSD, plug the external drive in, and, in theory, I should be able to boot from the drive, reload Windows and all my data
    in, and I’m good to go. Is the Master Boot Record still needed in this circumstance? BTW thanks for all your tips.

    Reply

Leave a reply:

Before commenting please:

  • Read the article.
  • Comment on the article.
  • No personal information.
  • No spam.

Comments violating those rules will be removed. Comments that don't add value will be removed, including off-topic or content-free comments, or comments that look even a little bit like spam. All comments containing links and certain keywords will be moderated before publication.

I want comments to be valuable for everyone, including those who come later and take the time to read.