Key Points
- Before using Bootrec.exe to repair Windows startup, use the Startup Repair tool from WinRE.
- If that doesn’t work, run the following commands in the given order in Command Prompt from WinRE: “Bootrec /FixMBR“, “Bootrec /FixBoot“, “Bootrec /RebuildBCD“.
- If “Access is denied” error comes up, use the given steps below to create new boot files.
If your Windows computer is experiencing issues booting up, there may likely be a problem with the Master Boot Record (MBR). If this is true, you may want to repair the boot records to get the current copies of Windows to boot normally again.
For that purpose, you will need to boot into the Windows Recovery Environment (WinRE) – a special Windows environment that lets you troubleshoot the operating system on a deeper level.
This guide provides a step-by-step tutorial on repairing the master boot record to fix startup issues with your Windows PC. It involves using the “bootrec.exe” tool in Windows which automatically fixes the issues. However, utilizing the tool is a whole other art.
Table of Contents
Possible issues with the Windows boot process
There can be several reasons why Windows won’t boot normally, but if the boot sector has been affected in any way, you may observe the following symptoms:
- Observing Blue Screen of Death (BSoD) on startup
- A black/blank screen
- You see the “No boot device detected” error.
- Windows keeps going into Startup Repair each time to power up the PC.
The errors mentioned above may occur due to boot record corruption. When a computer boots, the Power On Self Test (POST) hardware diagnostics process is carried out by the UEFI/BIOS. After that, the firmware examines the hard drive master boot record, loading “WinLoad.exe” into the main memory (RAM). This loads the Hardware Abstraction Layer (HAL) and “NTOSKRNL.exe”, which is the NT Kernel, to begin the startup process.
During any of the processes explained above, even a corruption with any file, the OS could fail to boot properly, resulting in requiring a repair.
Perform a Startup Repair
The Windows Recovery Environment offers a Startup Repair tool that automatically scans and fixes issues with the boot process. Before using the Bootrec tool for repairing OS startup, the Startup Repair tool should be adopted. This is also recommended by Microsoft in their documentation.
Here are the steps to perform a startup repair:
Note: You will need a bootable media for your operating system since you cannot boot into the Windows Recovery Environment if the OS is not loading.
-
Start by booting from the installation media.
-
On the welcome screen, click Next.
-
Then click “Repair your computer.”
You will now be booted into WinRE.
-
Click “Troubleshoot.”
-
Then click “Advanced options,” and then “Startup Repair.”
-
Now select the operating system to repair.
Now wait for Startup Repair to finish its job and repair the master boot records automatically.
However, you may encounter the following error if this doesn’t work:
Startup Repair couldn't repair your PC
Therefore, if Startup Repair doesn’t work for you, then you can continue to repair the OS boot process using Bootrec.
Repair Windows startup issues with Bootrec
The “Bootrec.exe” tool lets you repair the Windows master boot record. This is where the files are stored that are loaded into the system RAM, which eventually leads to loading the operating system. Bootrec lets you repair the master boot record, the boot sector, and the Boot Configuration Data (BCD) store.
The Bootrec command supports the following options that you can opt to use, depending on your situation:
- /FixMBR: This option writes Windows-compatible MBR to the system partition. It does not overwrite the existing partition table. Use this option when you must resolve MBR corruption issues, or when you have to remove nonstandard code from the MBR.
- /FixBoot: This option writes a new boot sector to the system partition by using a boot sector that’s compatible. Use this option if either the boot sector was replaced with a nonstandard Windows boot sector, the boot sector was damaged, or an earlier Windows OS was installed.
- /ScanOS: This option scans all disks for installations that are compatible. It also displays the entries that are currently not in the BCD store. Use this option when there are Windows installations that the Boot Manager menu does not list.
- /RebuildBCD: This option scans all disks for installations that are compatible with Windows. Additionally, it lets you select the installations that you want to add to the BCD store. Use this option when you must completely rebuild the BCD store.
Here is a step-by-step guide to use “Bootrec.exe” to repair the Windows startup process. This process will work on Windows 7 and above (including Windows 11).
-
Start by booting into the Windows Recovery Environment again.
-
Go to Troubleshoot > Advanced options > Command Prompt.
-
Run the following command:
Bootrec /FixMBR
-
Next, run this command:
Bootrec /FixBoot
If the “Bootrec /FixBoot
” command throws the error “Access is denied“, then you can write new boot sectors using the following method instead.
-
Enter the Diskpart mode with this command:
Diskpart
-
Now view the disks on the PC with this command:
List Disk
-
Now select the primary disk using its associated index number with this command:
Select Disk [DiskIndex]
-
List the volumes on the disk with this command:
List Volume
-
Select the boot volume using the associated volume index:
Select Volume [VolumeIndex]
-
Once selected, assign it a drive letter that is not in use with this command:
Assign Letter=[DriveLetter]
-
Now exit the Diskpart mode with this command:
Exit
-
Now switch the working directory to the boot partition using its newly-assigned drive letter.
[DriveLetter]:
-
Now run the following command to format the drive:
Format [DriveLetter]: /fs:FAT32 /q
-
When asked for confirmation, enter “Y” both times.
-
When the formatting is complete, run this command to create new boot files:
Bootrec /RebuildBCD
After performing the steps above, the master boot record of the Windows should be repaired successfully. You can now close the Command Prompt and try booting into Windows normally again.
Conclusion
The Bootrec.exe tool is excellent for repairing Windows startup issues, even when the Startup Repair tool fails to get it done. However, even the Bootrec tool may not always work.
The guide above gives a step-by-step tutorial to fix Windows startup issues with Bootrec. However, if this method does not work either, then you can try performing a cloud reset. A cloud reset downloads fresh files for the OS from Microsoft servers and should resolve the startup issues.
If that doesn’t work either, then a fresh Windows installation is recommended.
1 comment
Yuri
Thanks for the step-by-step, however regarding step 9, won’t a reformat of the drive cause a complete data loss on that entire disk? If so, if this is the main boot disk, how does it then successfully boot to windows after that if all data, including the OS is gone? Thanks.