How to Repair BIOS/MBR Bootloader on Windows 10 or 11

If the BCD file is missing or corrupted, if you removed/formatted a separate disk partition with the System Reserved label (and 500 MB in size) or a special OEM recovery partition, a user is likely to see the following message when trying to boot Windows:

The boot configuration data for your PC is missing or contains errors.
File :\boot\bcd
Error code: 0xc000000f

boot fail

or:

Error code: 0xc000014c
Error code: 0xc0000098

Using Automatic Repair

Boot your device from the recovery disc or Windows 10/11 installation media.
Then select Repair your computer –> Troubleshoot -> Startup Repair and select the OS whose bootloader you want to try to repair:

startup repair

But most likely the result will be negative: Automatic Repair couldn't repair your PC.

Using BCDBoot to Manually Repair BIOS/MBR Bootloader

To repair the bootloader configuration (BCD), you have to boot from the original Windows installation media.
After booting into the recovery environment, select Repair your computer –> Troubleshoot -> Command Prompt to open a command-line console:.

command prompt

You can run the Command Prompt even if you only have a Windows installation media at hand. To do this, it is enough to press the key combination Shift + F10 (or Shift + Fn + F10 on some laptop models) on the first Windows setup screen (when choosing a language and keyboard layout).

In the command prompt that opens, try to repair the BCD file automatically using this command:

X:\Sources> bootrec /RebuildBCD

Reboot your computer and check if Windows boots. If Windows does not boot, boot from the installation media again and open a command prompt.

Run the disk management tool, display the list of drives on the computer:

DISKPART> list disk
DISKPART> list vol

list disk
list volume

  • System Reserved partition with the size of 500 MB and the drive letter C: assigned to it. By default, Windows Boot Manager and BCD file are located on this small service partition.
  • Windows partition with the size of 39 GB and the letter D: assigned. This partition contains installed Windows, programs, and user data.

Try overwriting the master boot record (MBR) of the system partition for compatibility with the Windows boot loader (the existing partition table is not overwritten).

X:\Sources> bootrec.exe /fixmbr
X:\Sources> X:\boot\bootsect.exe /nt60 all /force

repair mbr

Try to automatically rebuild the BCD bootloader configuration with the following commands:

X:\Sources> bootrec /FixBoot
X:\Sources> bootrec /ScanOs
X:\Sources> bootrec /RebuildBcd

After that, restart your computer and check if Windows boots properly. If the OS doesn’t boot, follow the instructions below.

Next, use the using BCDedit command to create a new Boot Configuration Data file (it is supposed, you don’t have the BCD backup file).

Create an empty temporary file bcd.tmp:
X:\Sources> bcdedit /createstore c:\boot\bcd.tmp

Create an entry for the Windows Boot Manager (bootmgr):
X:\Sources> bcdedit.exe /store c:\boot\bcd.tmp /create {bootmgr} /d "Windows Boot Manager"

Import settings from bcd.tmp to your BCD:
X:\Sources> bcdedit.exe /import c:\boot\bcd.tmp

Specify that the Windows Boot Manager is located on the System Reserved partition (the drive letter C: is assigned to it):
X:\Sources> bcdedit.exe /set {bootmgr} device partition=c:

Configure the timeout to select an OS:
X:\Sources> bcdedit.exe /timeout 10

Remove the temporary file:
X:\Sources> del c:\boot\bcd.tmp

create bcd file

So, you have created an empty BCD file with the bootloader settings. Now you have to add entries about the installed Windows.

X:\Sources> bcdedit.exe /create /d "Windows 10" /application osloader
The entry {8a7f03d0-5338-11e7-b495-c7fffbb9ccfs} was successfully created.

X:\Sources> bcdedit /default {8a7f03d0-5338-11e7-b495-c7fffbb9ccfs}

create entry

Now you have to specify the paths to the installed Windows 10 copy in the new bootloader entry. We found out earlier that the drive letter D: is assigned to the Windows partition in WinPE. Use this drive letter in the following commands:

X:\Sources> bcdedit.exe /set {default} device partition=d:
X:\Sources> bcdedit.exe /set {default} osdevice partition=d:
X:\Sources> bcdedit.exe /set {default} path \Windows\system32\winload.exe
X:\Sources> bcdedit.exe /set {default} systemroot \Windows
X:\Sources> bcdedit.exe /displayorder {default} /addlast

modify entry

Now you need to make active the partition on which the bootmgr and BCD file with the Windows bootloader configuration are located (BIOS transfers control to the OS bootloader on the active MBR partition).

DISKPART> list disk
DISKPART> sel disk 0
DISKPART> list vol
DISKPART> select volume 1
DISKPART> active
DISKPART> detail partition

list volume
detail partition

Now you can restart your computer and make sure that Windows boots normally.