A corrupted Master Boot Record stops Windows 10 before it even loads the sign-in screen. The machine powers on, but instead of the desktop you see a black screen with a message like “Bootmgr is missing,” “An operating system wasn’t found,” or “Error loading operating system.” The drive is usually fine. The small piece of code that tells the firmware where Windows lives has broken, and you can rebuild it without reinstalling the operating system.

This guide covers every working method to repair the MBR on Windows 10, from the automatic option to manual bootrec commands, plus how to handle the “Access is denied” error that often blocks the boot sector fix.
Why the Master Boot Record (MBR) Gets Corrupted on Windows 10
The Master Boot Record sits in the first sector of a disk that uses the legacy BIOS and MBR partition scheme. It holds the boot loader code and the partition table. When the firmware hands control to this sector, the code points to the active partition and starts the Windows boot process.
The MBR breaks for a handful of common reasons:
- A sudden power loss or hard shutdown during a Windows update or disk write
- Malware that targets the boot sector
- A failed dual-boot setup or a second operating system overwriting the boot loader
- Disk errors and bad sectors near the start of the drive
- A botched partition resize using third-party tools
Newer machines that boot in UEFI mode with a GPT disk do not use the traditional MBR. They rely on an EFI System Partition and the Boot Configuration Data store instead. The repair steps differ slightly between the two, and this guide covers both, so check which mode your PC uses if the bootrec commands report no MBR disk.
How to Tell the Problem Is the MBR
The boot sector is the likely culprit when you see one of these messages at startup:
- “Bootmgr is missing. Press Ctrl+Alt+Del to restart.”
- “An operating system wasn’t found. Try disconnecting any drives that don’t contain an operating system.”
- “Error loading operating system.”
- “Invalid partition table.”
- A blinking cursor on a black screen with no further activity.
If Windows reaches the spinning dots and then crashes, the issue usually lives deeper in the system files rather than the MBR. The fixes below still help in many cases, but a stuck boot sector almost always shows one of the error messages above.
What You Need Before You Start
You reach the repair tools through the Windows Recovery Environment (WinRE). Two paths get you there:
Option 1: Automatic trigger.
- Power on the PC and hold the power button to force a shutdown the moment the Windows logo appears. Repeat this twice more. On the third boot, Windows loads Automatic Repair, which opens WinRE.
Option 2: Windows 10 installation media.
- Create a bootable USB drive on another PC using the Media Creation Tool, boot from it, choose your language, then click Repair your computer at the bottom left.
The installation media route is more reliable, because a badly damaged MBR sometimes prevents the automatic trigger from working at all. Keep an 8 GB USB drive ready for this.
Method 1: Run Startup Repair First
Startup Repair scans for boot problems and fixes many MBR and BCD faults on its own. Try it before the manual commands.
- In WinRE, click Troubleshoot.
- Select Advanced options.
- Click Startup Repair.
- Choose your account and enter the password if prompted.
- Wait while Windows diagnoses and repairs the boot files. This can take several minutes.
If Startup Repair reports that it could not fix the PC, move on to the manual commands. A failure here does not mean the drive is dead. It often means the repair tool cannot determine the correct configuration, which the bootrec commands let you set directly.
Method 2: Repair the MBR With bootrec Commands
This is the core fix. The bootrec tool rebuilds the boot sector, the MBR, and the boot configuration from a command line.
- In WinRE, go to Troubleshoot, then Advanced options.
- Click Command Prompt.
- Run the commands below one at a time, pressing Enter after each:
bootrec /fixmbr
bootrec /fixboot
bootrec /scanos
bootrec /rebuildbcdHere is what each command does:
| Command | What It Does |
|---|---|
bootrec /fixmbr | Writes a fresh Windows-compatible MBR to the system partition without overwriting your partition table. Clears most “Invalid partition table” and boot loader errors. |
bootrec /fixboot | Writes a new boot sector to the system partition. Use this when the boot sector is damaged or a non-standard one replaced it. |
bootrec /scanos | Scans all disks for Windows installations that the boot menu does not list. |
bootrec /rebuildbcd | Rebuilds the Boot Configuration Data store. When it finds a Windows installation, it asks “Add installation to boot list?” Type Y and press Enter. |
Close the Command Prompt, return to the WinRE menu, and click Continue to restart. Many machines boot straight into Windows after this sequence.
Method 3: Fix the “Access Is Denied” Error on bootrec /fixboot
A common roadblock is bootrec /fixboot returning “Access is denied.” This happens most often on UEFI systems where the EFI System Partition needs attention, or when the boot partition has no drive letter assigned.
Run these steps from the same Command Prompt:
diskpart
list disk
select disk 0
list volumeLook in the volume list for the EFI partition. It is small, around 100 MB to 500 MB, and formatted as FAT32. Note its volume number, then assign it a drive letter:
select volume 3
assign letter=V:
exitReplace 3 with the actual EFI volume number on your system, and use any free letter such as V:. Now repair the boot files on that partition:
cd /d V:\EFI\Microsoft\Boot\
bootrec /fixboot
bcdboot C:\Windows /s V: /f UEFI
The bcdboot command copies fresh boot files from your Windows folder to the EFI partition. Adjust C:\Windows if Windows sits on a different drive letter inside WinRE. Restart when the commands complete.
If the disk uses the legacy MBR format rather than GPT, the “Access is denied” message sometimes clears after running bootsect /nt60 SYS from the Command Prompt, which updates the boot code on the system partition.
Method 4: Rebuild BCD When No Windows Installation Is Found
Sometimes bootrec /rebuildbcd reports “Total identified Windows installations: 0.” The boot store is missing or so corrupt that the scan cannot read it. Rebuild it from scratch with these commands:
bcdedit /export C:\bcdbackup
c:
cd boot
attrib bcd -s -h -r
ren c:\boot\bcd bcd.old
bootrec /rebuildbcdThese commands back up the current store, strip the protective attributes from the BCD file, rename it so Windows treats it as gone, then rebuild a clean one. When the scan finds your installation, type Y to add it. Restart and check whether Windows loads.
When the MBR Repair Does Not Work
If you have run every method and Windows still refuses to boot, the cause likely sits beyond the boot sector:
Failing drive: Run chkdsk C: /f /r from the WinRE Command Prompt to scan for and repair bad sectors. Persistent read errors point to a dying disk that needs replacement.
Corrupt system files: Run the command below to check core Windows files offline:
sfc /scannow /offbootdir=C:\ /offwindir=C:\WindowsWrong boot mode. Confirm the firmware setting (UEFI vs Legacy/CSM) matches how the disk was installed. A disk set up in UEFI mode will not boot with the firmware switched to Legacy, and the reverse is also true.
If the drive itself is healthy and nothing restores the boot, back up your files using a Linux live USB or by connecting the drive to another PC, then perform a clean install of Windows 10.
Frequently Asked Questions
Does repairing the MBR delete my files?
No. The bootrec /fixmbr and bootrec /fixboot commands rewrite only the boot code and boot sector. They leave your partitions and personal files untouched. Data loss during MBR repair is rare and usually points to a separate hardware fault.
What is the difference between fixmbr and fixboot?
bootrec /fixmbr repairs the Master Boot Record, the very first sector that points the firmware to the active partition. bootrec /fixboot repairs the boot sector inside the system partition, which loads the Windows boot manager. Damaged boot setups often need both.
My PC uses UEFI and GPT. Do I still have an MBR?
A pure UEFI and GPT system does not use the traditional MBR. It boots through the EFI System Partition and the Boot Configuration Data store. The bcdboot and EFI partition steps in Method 3 are the correct repair for that setup rather than bootrec /fixmbr.
Why does bootrec /fixboot say “Access is denied”?
This usually means the EFI System Partition has no drive letter or the boot files are damaged. Assign a letter to the EFI partition with diskpart, then run bcdboot to rewrite the boot files, as shown in Method 3.
Can I repair the MBR without installation media?
Yes, if the PC can still reach the Windows Recovery Environment. Force three failed boots to trigger Automatic Repair, then open Command Prompt from Advanced options. Installation media is the backup when WinRE will not load on its own.
How long does an MBR repair take?
The bootrec commands run in seconds. Startup Repair can take five to fifteen minutes. A full chkdsk /r scan on a large or failing drive can run for an hour or more.
