Using Windows Boot Manager to Fix Startup Errors on Windows
Windows PCs may sometimes encounter issues during startup, and that can happen when Windows fails to load properly. In this post, we’ll explain how you can use Windows Boot Manager to troubleshoot boot errors and get your PC up and running again.
Table of Contents
- What is Windows Boot Manager?
- Most common problems during the Boot Loader phase
- Using the Startup Repair tool to repair the Boot Loader
- How to use Windows Boot Manager to fix Windows 10 boot errors
What is Windows Boot Manager?
Windows Boot Manager (Bootmgr.exe) is Microsoft’s proprietary Unified Extensible Firmware Interface (UEFI) application. It is loaded from the volume boot code of your device’s hard drive, and it enables you to set up the boot environment, i.e. what happens when you first turn on your device.
Windows Boot manager also lets you choose a specific operating system to load if your system contains multiple operating systems. It can also provide access to several boot applications before loading Windows, which let you update, reset, or format your device. These applications can also help you flash the device with a new OS image and to capture and save crash dumps along with the associated logs to better understand any Windows issues.
Understanding the boot process
To boot a computer means to initiate the process of starting it. In any computing device, all the essential files, the operating system, its associated libraries and dependencies, along with system-critical data are stored on a hard disk drive. However, when you turn on your computer, these files need to be loaded into memory (RAM) and executed for the OS to load.
Here are the four major phases involved in the boot process:
Phase 1 – PreBoot
In this phase, the computer’s firmware settings are loaded through a power-on self test (POST) process. Once this process is completed, the system identifies a valid disk and reads the Master Boot Record (MBR) from it, and the Windows Boot Manager is loaded.
Phase 2 – Windows Boot Manager
In this phase, Windows Boot Manager starts the Windows OS Loader (WinLoad.exe). It lets you choose the operating system to load on the PC.
Phase 3 – Windows OS Loader
Once an OS has been selected, the Windows OS Loader loads the necessary drivers to talk to the hardware needed to start the Windows kernel.
Phase 4 – Windows NT OS Kernel
This is the last phase in the boot process: Additional drivers are loaded and the Windows registry settings are read and pass control to the Session Manager Subsystem (Smss.exe). Which in turn, loads the user interface (UI) along with the rest of the hardware and software.
How to access Windows Boot Manager
In most computers, the Windows Boot Manager can be accessed by pressing the ‘F8’ key as soon as your computer starts. Alternatively, you can also access the app by following the steps below:
- Open the Settings app from the Start menu.
- Click Update & Security.
- Click Recovery from the menu on the left side of the window.
- Click Restart Now under the Advanced Startup options.
The computer will restart and load Windows Boot Manager.
Enabling and disabling Windows Boot Manager
While Windows Boot Manager gives you the ability to choose which OS to boot on your machine, it also slows down the boot process. Therefore, disabling the app can be a viable option to speed up the boot process.
To enable or disable the Windows Boot Manager via the GUI, follow the steps below:
- Press Windows + R and type ‘systempropertiesadvanced’ and press Enter to load the System Properties menu.
- Under the Startup and Recovery section, click Settings.
- To enable Windows Boot Manager, check the box before Time to display list of operating systems options
- To disable Windows Boot Manager, uncheck the box before Time to display list of operating systems options
- Press OK to apply the changes
Note: You can also enable/disable the Windows Boot Manager and change boot manager options via the command line.
Most common problems during the Boot Loader phase
While several issues could hinder the Windows boot process, it’s easy to identify problems with the error codes indicating what went wrong. If your screen turns black when the device boots with a blinking cursor, it indicates that the boot process is stuck in the Windows Boot Loader phase.
The device can be in the same state if you encounter one of the following error codes during the Boot Loader phase:
- Boot file or MBR (Master Boot Record) corrupted.
- Boot sector missing or corrupted.
- Boot configuration data (BCD) missing or corrupted.
- Bootmgr missing or corrupted.
Below are some of the most commonly used and effective ways to solve problems that can occur in the Boot Loader phase.
Using the Startup Repair tool to repair the Boot Loader
The Startup Repair tool is the first resource that can help you fix boot loader issues. This tool analyzes startup log files to determine the cause of the problem. And it can also help you diagnose and repair many other startup issues.
To use the Startup Repair tool, boot your device from a disk or USB flash drive using Windows installation media: To do this, connect your installation media to your PC, turn on your PC, and press the key that opens the booting device selection menu. Depending on the manufacturer, this could be either Esc, F10, F12, or another key.
- On the Install screen of the installation media, select Next > Repair your computer
- Next, click Troubleshoot on the Choose an option screen.
- Now, select the Startup Repair option from the Advanced options screen.
- Once the Startup Repair tool has run the process to repair the Boot Loader, select Shutdown and turn your PC back on to see if the problem is resolved.
The Startup Repair tool also generates a log file that lists out every process, process execution, problems that occurred during the startup process, as well as the fixes that have been implemented. The log file can be found in the location below:
How to use Windows Boot Manager to fix Windows 10 boot errors
If using the Startup Repair tool wasn’t enough to fix your startup problems, we’ll now go through some other troubleshooting methods you can try on your device.
Repairing the master boot code and boot sector
When you turn on a PC, the BIOS or UEFI handles the initial power-on routine. It then loads the master boot code into the PC’s main memory (RAM). The master boot code then scans the disk’s partition table to identify the active partition that needs to be loaded.
The part of the disk that contains the master boot code is called the boot sector. If there are any errors or corrupted data in this area of the disk, the device may fail to load Windows.
To repair the master boot code, you can use the bootrec.exe tool in a command prompt. Again, you may need to use installation media to boot Windows 10 in recovery mode, then click on Advanced options > Troubleshoot > Advanced options > Command prompt.
Once in a command prompt, use the following command:
This command writes a new master boot code to the system partition, which can help to resolve MBR corruption issues. However, the /fixmbr switch does not overwrite the existing partition table. If the latter is corrupted, overwriting the master boot code may not fix the issue.
To repair the boot sector, you can run the /fixboot command with bootrec.exe in a command prompt. This command will write a new boot sector to the system partition.
Fixing Boot Configuration Data (BCD) errors
Boot Configuration Data (BCD) errors are also some of the most common types of boot issues on Windows. There are several different causes for BCD-related startup errors, including unexpected shutdowns, data corruption, malicious software, or failing hard drives.
To fix BCD errors, the first step you need to follow is to use the /ScanOS switch to perform a system-wide scan of all disks. This command will also help you see if there are Windows installations that Boot Manager doesn’t list:
After running this command, try restarting the computer to see if the problem is fixed. If that’s not the case, you can rebuild the BCD store with the /RebuildBcd switch.
The following commands will export and delete the BCD store, then rebuild it from scratch.
bcdedit /export c:\bcdbackup
attrib c:\boot\bcd -r -s -h
ren c:\boot\bcd bcd.old
Restart your PC when you’re done running these four commands, and check if you can now boot into Windows normally.
Replace the Bootmgr file
If none of the above methods fixed the issue, you can try replacing the Bootmgr file from C: drive to the System Reserved Partition (SRP), which is a small partition on your hard drive that stores boot information for Windows.
By default, the System Reserved Partition is not assigned any drive letters. To assign it with any letter like ‘R’, use the PowerShell command below at a command prompt:
Get-Partition -DiskNumber 0 -PartitionNumber 1|Set-Partition -NewDriveLetter R
After changing the directory to the System Reserved Partition, run the following command to unhide the Bootmgr file:
attrib -r -s -h
Now that you’re able to see the hidden files, you can rename the bootmgr file to bootmgr.old using the following command:
ren bootmgr bootmgr.old
Now, go to the system drive using the command (“C:”) and run the same attrib command to unhide the Bootmgr file:
attrib -r -s -h
Next, copy the bootmgr file from the C: drive and paste it inside the System Reserved Partition(R drive) using the command below:
copy C:\bootmgr R:\
Alternatively, you can use the GUI on your Windows machine to copy the bootmgr file. To do so, type the “NOTEPAD” command in CMD.
Once you’re done, restart your computer to see if you can boot to Windows normally.
Restore the system hive
The final method for fixing boot loader problems is to try to manually restore the system hive. To do that, we’ll need to copy the files from the C:\Windows\System32\config\Regback directory to the C:\Windows\System32\config directory.
For this, you need to use installation media to access the Windows Recovery Environment. Then, we can use the bcdedit command in CMD to determine the Windows partition.
Now, if your Windows partition is assigned the letter ‘C’, use the command below to see the content of the REGBACK folder:
In the output, if you see 5 different files with each file size greater than 0, then it means you have a copy of your registry: Here, these are the files named DEFAULT, SAM, SECURITY, SOFTWARE and SYSTEM. However, if all files in this folder have their size equal to zero, it means your PC does not have the registry backup and you cannot restore them to repair your boot.
Now, to restore the registry backup, we’ll need to copy these 5 registry files to the C:\Windows\System32\config directory. Here’s how to do it in command prompt:
First, change the directory to the config folder using the command below:
CD /D C:\WINDOWS\SYSTEM32\CONFIG
Next, enter the following commands to rename the existing registry files we need to copy:
REN DEFAULT DEFAULT.OLD
REN SAM SAM.OLD
REN SECURITY SECURITY.OLD
REN SOFTWARE SOFTWARE.OLD
REN SYSTEM SYSTEM.OLD
Now, we need to copy the registry backup files from the REGBACK folder to CONFIG folder. To do that, run the commands below one-by-one
copy C:\Windows\System32\config\RegBack\DEFAULT C:\Windows\System32\config\
copy C:\Windows\System32\config\RegBack\SAM C:\Windows\System32\config\
copy C:\Windows\System32\config\RegBack\SECURITY C:\Windows\System32\config\
copy C:\Windows\System32\config\RegBack\SOFTWARE C:\Windows\System32\config\
copy C:\Windows\System32\config\RegBack\SYSTEM C:\Windows\System32\config\
Restart your computer when you’re done, and check if you can now boot to Windows normally.
In this article, we looked at what Windows Boot Manager is for and we explained the different phases in the boot process. We also detailed how you can easily enable or disable Windows Boot Manager and looked at some of the most common boot loader problems and solutions.
Windows Boot Manager not only allows you to choose the operating system that you’d like to boot while starting your PC, but it’s also a useful resource for troubleshooting various boot issues. If using the Startup tool is the easiest way to repair boot errors, you may sometimes need to dig deeper.
We explained how to use the Bootrec.exe tool in the Windows Recovery Environment to repair the master boot record, boot sector, and Boot Configuration Data errors. Hopefully, this should be all you need to know to fix the most common startup errors on a Windows PC.
More in Windows Client OS
August Patch Tuesday Updates Fix 121 Vulnerabilities and Improve Focus Assist
Aug 10, 2022 | Laurent Giret
How to Set Up Amazon FSx for Windows File Server
Aug 5, 2022 | Arian Modiramani
Windows Autopilot Deployment: A Step-by-Step Guide
Jul 29, 2022 | Dean Ellerby
How to Fix The "Trust Relationship Between This Workstation And The Primary Domain Failed" Error
Jul 27, 2022 | Michael Reinders
How to Use the Icacls Command to Manage File Permissions
Jul 20, 2022 | Michael Reinders
July Patch Tuesday Updates Fix 84 Vulnerabilities and LDAP Gets TLS 1.3
Jul 13, 2022 | Laurent Giret
Most popular on petri