A practical step-by-step guide for fixing boot errors, rebuilding BCD, restoring the EFI System Partition, and making Windows start again without reinstalling the operating system.
The Windows bootloader is the set of boot files and configuration data that tells your computer where Windows is installed and how to start it. On modern UEFI systems, the most important components are stored on the EFI System Partition. On older BIOS/MBR systems, the boot code is stored in the Master Boot Record and the active system partition.
Bootloader corruption can happen after a failed Windows update, disk cloning, partition resizing, installing another operating system, changing BIOS/UEFI settings, replacing a drive, or accidental deletion of a small system partition. The good news is that in most cases Windows itself is still intact; only the boot configuration must be repaired.
You may need to restore the Windows bootloader if the PC powers on but Windows does not load. Typical messages include:
0xc000000e, 0xc0000098, 0xc0000225, or “The Boot Configuration Data file is missing”.
“No bootable device”, “Operating system not found”, or the BIOS opens instead of Windows.
Windows repeatedly opens Automatic Repair but never reaches the desktop.
Windows stopped booting after cloning, converting a disk, deleting partitions, or installing Linux.
The exact repair command depends on whether the PC uses UEFI/GPT or Legacy BIOS/MBR. Using the wrong method usually does not damage Windows, but it may not fix the boot problem.
Boot repair commands are powerful because they work with partitions and boot records. Before you start, follow this checklist:
C:. Always verify before running commands.clean, format, or partition deletion commands in DiskPart. This guide uses DiskPart only to identify volumes and temporarily assign a drive letter to the EFI partition.
All methods below require Command Prompt or Startup Repair from Windows Recovery Environment. Choose the access method that matches your situation.
Start with the automatic tool. It can fix missing boot files, incorrect BCD entries, and some startup loops without manual commands.
If Startup Repair says it could not repair your PC, continue with the manual methods below. That message does not necessarily mean the installation is lost.
The bootloader repair procedure is different for UEFI and Legacy BIOS. You can identify the mode from Command Prompt in recovery.
Look at the GPT column. If your Windows disk has an asterisk * in the GPT column, it is a GPT disk and normally boots in UEFI mode. If there is no asterisk, the disk is usually MBR and normally boots in Legacy BIOS/CSM mode.
Then list volumes to find the Windows partition and the EFI partition:
Exit DiskPart when you finish checking:
This is the most common method for modern Windows 10 and Windows 11 computers. It recreates boot files on the EFI System Partition using bcdboot.
In recovery mode, Windows may be installed on D:, E:, or another letter instead of C:. Check possible drive letters:
Use the letter where you see the Windows folder. In the examples below, we will assume Windows is on C:. Replace it if your system uses another letter.
Find the small FAT32 EFI volume. Then replace N with its volume number:
If the command succeeds, you should see a message similar to Boot files successfully created. Restart the PC and select the internal Windows drive in UEFI boot settings if needed.
bcdboot C:\Windows /s S: /f UEFI is the cleanest and most reliable bootloader repair command.
Older computers and some converted installations use Legacy BIOS with an MBR disk. In this configuration, you normally repair the MBR boot code and rebuild BCD entries.
Assume the correct Windows partition is C: in the commands below. Change the letter if recovery mode shows a different one.
If Windows is detected, type Y when prompted to add it to the boot list.
If the PC still does not boot, the system partition may not be marked active. Use this only on MBR disks, not GPT disks.
Replace N with the partition that contains the boot files. It may be a small System Reserved partition or the main Windows partition, depending on how Windows was installed.
If bootrec /rebuildbcd does not find Windows or fails to add the installation, rebuild the BCD store manually. This method is useful when the BCD file is damaged but the Windows folder is still present.
Assign the EFI partition to S: as shown earlier, then run:
If the ren command says the file does not exist, continue with bcdboot. The BCD store may already be missing.
Run these commands from recovery Command Prompt:
If the Boot folder is on the System Reserved partition instead of C:, assign that partition a temporary drive letter in DiskPart and run the commands against that letter.
Some Windows installations return Access is denied when running bootrec /fixboot. On UEFI systems, you usually do not need /fixboot; recreate EFI boot files with bcdboot instead.
Replace N with the FAT32 EFI volume number and replace C: if your Windows folder is on another letter.
Check the drive letter first. The most common reason is that the recovery environment assigned Windows a different letter.
In this example, D: is used because that is where the Windows folder was found.
Dual-boot systems require extra care. Boot files may be stored on a different drive than the Windows installation, especially if Linux or another Windows version was installed later.
To create boot files that support both UEFI and BIOS when you are not sure which mode will be used, you can use:
However, for a standard modern UEFI installation, /f UEFI is preferred because it matches the actual boot mode.
After Windows starts successfully, perform a few checks to prevent the issue from returning.
| Situation | Recommended command | Notes |
|---|---|---|
| Modern UEFI/GPT installation | bcdboot C:\Windows /s S: /f UEFI |
Requires assigning S: to the FAT32 EFI partition. |
| Legacy BIOS/MBR installation | bootrec /fixmbrbootrec /rebuildbcd |
Use on MBR disks, often with an active system partition. |
| BCD file is corrupted | ren BCD BCD.bakbcdboot C:\Windows /s S: /f UEFI |
Renames old BCD and creates a new one. |
/fixboot access denied |
bcdboot C:\Windows /s S: /f UEFI |
Usually the better solution on UEFI systems. |
| Wrong Windows drive letter in WinRE | dir C:\Windowsdir D:\Windows |
Always identify the real Windows letter before repair. |
bcdboot because Windows 11 is normally installed in UEFI/GPT mode. bootrec is still useful on older Legacy BIOS/MBR installations and for some BCD troubleshooting tasks.
D: or E:. Always run dir C:\Windows, dir D:\Windows, and similar checks before using repair commands.
bcdboot. This is more advanced and should be done only after backing up important data.
bootrec, bcdboot, and diskpart commands from there.
bcdboot C:\Windows /s S: /f UEFI again with the correct partitions.
To restore the Windows bootloader, start with Startup Repair. If it fails, identify whether the system uses UEFI/GPT or Legacy BIOS/MBR. For modern Windows 10 and Windows 11 computers, the most effective fix is usually to assign a drive letter to the EFI System Partition and run bcdboot to recreate boot files.
After Windows starts, verify boot order, check disk health, run sfc /scannow, and create a backup. A repaired bootloader solves the startup problem, but the original cause—failed update, disk issue, interrupted cloning, or partition change—should still be investigated.