How to Fix the MBR on Windows 11

Master Boot Record (MBR) is the data stored on the first sector of the storage drive that locates and loads Windows. If you’re getting different errors like ‘Operating System Not Found’, ‘Missing Operating System’, ‘Invalid Partition Table’, ‘Bootmgr is missing’, etc., these all could mean that the MBR is probably corrupted.

When this happens, you’re likely going to face boot problems. There’s no fixed reason why the MBR could get corrupted. But usually, this is due to improper shutdowns and ransomware attacks.

How to Fix MBR on Windows? Try These 5 Methods

Fortunately, it’s possible to troubleshoot this problem using the Bootrec.exe utility or by completely rebuilding the BCD. Here are some troubleshooting tips that you can try to fix MBR on Windows.

Perform Startup Repair

Before anything else, I recommend performing startup repair. This is a built-in Windows feature that lets you fix any issues that may be failing your OS to boot up. You can access this from the Windows Recovery Environment/Advanced Startup.

Force shut down your computer and turn it back on.


power-button-press

Repeat the step two to three times until Automatic Repair screen appears.

Click on the Advanced options button.


advanced-options-in-automatic-repair

Now, navigate to Troubleshoot.


troubleshoot-in-choose-an-option

Then, choose Advanced options.


advanced-options-in-troubleshoot

Next, pick Startup Repair.


startup-repair

Wait until your PC is diagnosed with possible startup problems and restarts your computer. This might take a few seconds to even more than an hour depending on what’s wrong with your computer.


wait-for-pc-diagnosis

If it doesn’t solve your problem or you will see the Startup Repair couldn’t repair your PC error, choose Advanced Options and move on to the next method.


advanced-options-startup-repair

Note: If your PC doesn’t get to the Windows Recovery Environment after performing a hard reset, you need to insert a bootable disc or flash drive. Then, from the Windows Setup screen, pick ‘Repair my computer.

Repair Critical Disk Structures Using Bootrec.exe

Startup Repair is just a general fix and might not work for the majority. On the other hand, Bootrec.exe is a specialized utility that can repair the MBR, boot sector, and BCD Store. Executing the dedicated commands can help fix the corruption issues and update the MBR code.

Once you’re in the advanced recovery environment, pick Troubleshoot Advanced Options.

This time, choose Command Prompt.


command-prompt-in-advanced-options

Wait until you get to the account selection screen. Once you’re there, select your account to continue.


select-your-account-command-prompt

Now, enter your correct password and press the Continue button.


enter-password-to-access-command-prompt-in-windows-re

After the Command Prompt window opens, check for your boot drive. Usually, this should be a C drive (unless you’ve installed your PC on another one). But sometimes, it can change in the Windows RE. Just note that the drive should have the Windows directory. If you do not see it, check in another drive.
You can take a reference from the below screenshot. I first entered C drive and then used the dir command to list all its directories.


check-for-windows-drive

Next, start executing the following commands one after other:

bootrec /fixmbr (writes a compatible MBR to the system partition and removes nonstandard code)


bootrec-fixmbr-in-cmd

bootrec /fixboot (writes a new boot sector to the same partition)


bootrec-fixboot-access-denied

bootsect /nt60 sys or bootsect /nt60 all (if you see an ‘Access is denied‘ error when fixing the boot)


bootsect-nt60-sys

bootrec /fixboot (re-execute the command and this time, it should work)


bootrec-fixboot-operation-completed-success

bootrec /scanos (wait until the file is scanned)


bootrec-scanos

bootrec /rebuildbcd (rebuilds the BCD Store)


bootrec-rebuildbcd

exit (exits from the Command Prompt window)

Once you’re in the Choose an option screen, pick Continue and check if you’re able to boot into Windows again.


continue-in-choose-an-option

Complete Rebuild of BCD Store

In most cases, a simple rebuild of the BCD store should fix the MBR. However, if you’re getting the Bootmgr is Missing error, the solution above might not be enough. In that case, I recommend backing up your BCD store first. Then, delete it and rebuild the BCD store as instructed below:

From the Windows Recovery Environment, open Command Prompt as earlier.

Now, execute the below commands:

  • bootrec /fixmbr (attempts to fix MBR)
  • bcdedit /export <drive>:\bcdbackup (exports the contents of the system store inside the BCD_Backup file to the specified drive)
  • attrib <drive>:\boot\bcd -s -h -r (deletes the system, hidden, and read-only attributes for bcd)
  • ren <drive>:\boot\bcd bcd.old (renames bcd to bcd.old)
  • bootrec /rebuildbcd (rebuilds the BCD Store)
  • exit (exits Command Prompt)


complete-rebuild-bcd-1024x439

Pick Continue and check if you still get the ‘Bootmgr Is Missing’ error.

Perform System Restore

If neither of the two methods solved your problem, I recommend opting for System Restore. This should take your Windows back to a working configuration based on the specified restore point.

In the Windows RE, navigate to Troubleshoot Advanced Options > System Restore.


system-restore-in-advanced-options

Select your account and enter the correct password to continue.


system-restore-select-account

Wait until the System Restore dialogue box appears. On the first screen, hit Next.


system-restore-next-button

Then, pick a custom or automatic restore point and press Next.


select-your-restore-point

Click on Finish.

Next, press Yes to confirm your action in the confirmation prompt.


yes-to-system-restore

Wait until the system starts to be restored. Once a dialogue box pops up, hit the Restart button.


restart-to-system-restore

Clean Install Windows

The last option is to reinstall Windows. When you clean install the OS, both the corrupted MBR and boot sector will be replaced. 

Before proceeding to perform a clean installation. make sure you have backed up all your important files. I understand you can’t boot into Windows right now. But there are plenty of solutions available on the web. I personally recommend removing the storage drive and cloning it to another one for the time being.

First of all, create a bootable USB drive and boot using it. Make sure you have changed the boot order from BIOS.

Select the appropriate option and hit Next.


select-language-time-input-method

Next, click on Install Now.


install-now-windows-setup

Now, enter your product key. If you want to add this later, you may pick the ‘I don’t have a product key’ option.


i-dont-have-a-product-key

Then, select the OS and hit Next.


select-windows-os

Accept the license terms and click Next.


accept-license-terms-windows-installation

You may choose either of the option—Upgrade or custom.


custom-windows-installation

Now, allocate space to the storage drive and let Windows create system partitions for you.


allocate-space-to-your-hard-drive

Hit Next and the Windows installation should start. 

Once it completes, you can sign in to your Microsoft account and finish setting up Windows.

Mohamed SAKHRI
Mohamed SAKHRI

I'm the creator and editor-in-chief of Tech To Geek. Through this little blog, I share with you my passion for technology. I specialize in various operating systems such as Windows, Linux, macOS, and Android, focusing on providing practical and valuable guides.

Articles: 1751

Newsletter Updates

Enter your email address below and subscribe to our newsletter

Leave a Reply

Your email address will not be published. Required fields are marked *