Repair Windows BCD - Windows 10/8.1/7/Vista

 

Quick facts:

 

Important:

Always have A Windows installation/repair CD/DVD/USB ready before attempting any repairs of boot related files !

Always make a backup of BCD !

(use Visual BCD Editor or Dual-boot Repair tool to export/backup BCD or use "bcdedit /export backup-file-name" on elevated command prompt)

See how to create or obtain a Windows 7/8/10 installation/repair CD/DVD/USB.

 

In Windows Vista, Windows 7, Windows 8/8.1 and Windows 10 the System Boot Configuration Data (BCD) is stored in a file in folder "\Boot".

The full path to this file is "[active partition]\Boot\BCD".

(On UEFI/GPT the full path is "[EFI system partition]\EFI\Microsoft\Boot\BCD")

Windows NT6 (Vista, Windows 7/8/10) BIOS/MBR boot process depends on the presence of an active partition on hard disk.

(On UEFI/GPT boot process depends on the presence of EFI System Partition(ESP) on hard disk)

 

BIOS/MBR boot process from hard disk goes like this:

  1. BIOS firmware initialization and self test (Power On Self Test - POST)
  2. load and execution of MBR (Master Boot Record) on first disk
  3. load and execution of partition boot record (PBR) on active partition
  4. load and execution of boot manager ("\bootmgr") from active partition and then display of boot menu (skipped if only one boot entry)
  5. load and execution of Windows NT6 loader - file "winload.exe" from \Windows\System32 folder
  6. load and execution of kernel and drivers

 

The active partition (also a primary partition) can be mapped to a drive letter like c:, d: or be the unmapped "System Reserved" partition. You can use Disk Management or diskpart.exe to view and set the active partition.

If BCD resides on an unmapped active partition the full path is "\Device\HarddiskVolumeN\Boot\BCD" where N is a number starting from 1. If active partition is mapped to c: drive then the full path to system BCD is "c:\Boot\BCD".

 

 

UEFI/GPT boot process from hard disk goes like this:

  1. UEFI firmware initialization
  2. load and execution of first boot candidate (first entry in NVRAM boot order - usually Windows firmware boot manager(\EFI\Microsoft\Boot\bootmgfw.efi))
    - no master(MBR) and partition boot record(PBR) code used!
  3. display of Windows boot menu (skipped if only one boot entry)
    (it is not clear what's the purpose of Windows boot manager ("\EFI\Microsoft\Boot\bootmgr.efi") - should be investigated)
  4. load and execution of Windows NT6 loader - file "winload.efi" from "\Windows\System32" folder
  5. load and execution of kernel and drivers

 

And here a visualization of Windows UEFI boot process from an UEFI Plugfest - Windows boot environment by Murali Ravirala from Microsoft.

UEFI boot sequence

 

The almighty bcdboot command

 

The system BCD is a system protected file and can be accessed only with elevated administrative rights (for reading and for writing).

The tool supplied with Windows 10/8/7 to assist repair of BCD store is "bcdboot.exe".
bcdboot repairs also bootmgr and "\Boot" folder which contains also boot related language files and memtest.exe.

 

The simplest call to repair BCD is: (drive_letters in examples below should reflect concrete drive mapping on your system!)

bcdboot c:\windows

where "c:\windows" specifies the root of Windows Vista, Windows 7 or Windows 8/10.

On multi boot systems when you repair the system BCD always the root of the latest Windows OS (e.g. Windows 10) should be specified!

 

If no other parameter is given the tool has as target the active partition (or EFI system partition).

 

A target partition/drive can be specified as follows:

bcdboot c:\windows /s d:

where "d:" is the target drive to accept boot related files. "d:" should map to a primary and active partition (or map to a FAT/32 partition for UEFI firmware) to be bootable!

 

You can use also Visual BCD Editor or Dual-boot Repair tool to repair Windows BCD. Both tools give access to bcdboot utility using the same form:

Repair BCD form

Parameter "Windows Folder" specifies the root of Windows OS (Vista, Windows 7, Windows 8) used as source for boot related files.

Parameter "BCD Drive" specifies the target drive for BCD ("System" denotes the active partition or EFI system partition).

 

The bcdboot command assumes as default the English language. You can specify another language using parameter /l:

bcdboot c:\windows /s d: /l de-de

here German language for Germany is specified.

You should specify the language of the installed Windows version or else boot menu display problems could follow. Dual-boot Repair tool for Windows 10 and earlier has the "Automatic repair" option which tries to guess and set the correct language for Windows Boot manager in BCD.

 

Last but not least the /f parameter can be used for specifying type of boot: UEFI, BIOS or ALL(BIOS and UEFI)

bcdboot c:\windows /s d: /f UEFI /l de-de

here UEFI boot is specified.

You can specify the type of boot only when /s parameter is used.

 

To sum up:

A really good and complete bcdboot command for fixing BCD is for example:
bcdboot c:\windows /s d: /f UEFI /l de-de
where you specify c:\windows as source, d: drive as destination, the type of boot as UEFI and language German for boot menu.

 

Additional BCD repair steps

 

If there are problems/errors when executing bcdboot command (or when using Visual BCD Editor's or Dual-boot Repair's "Repair BCD" interface) then you have to remove following file:

There is no need to save/backup the file as it is seriously damaged if it cannot be repaired.

Start Windows repair CD/USB and go to command prompt.

C: drive is usually mapped to active partition. You can check if "\Boot" folder is present on c: drive with "dir /ahs" command.

c:<enter>
dir /ahs<enter>

 

Following commands will re/create BCD on C: drive

  attrib - s -h c:\boot\bcd      - remove system and hidden attributes so BCD file can be deleted
  del c:\boot\bcd                - delete BCD
  bcdboot c:\windows             - create BCD

Usually you should be able to boot to Windows 10/8/7/Vista after the BCD was fixed.

 

For a successful boot, at least to boot menu, following items are needed;

  1. Microsoft MBR (use bootsect.exe to fix Master Boot Record)
  2. Microsoft NT6 PBR on active partition (use bootsect.exe to fix Partition Boot Record called also VBR - Volume Boot Record)
  3. \bootmgr on active partition (or \EFI\Micosoft\Boot\bootmgfw.efi on ESP)
  4. \Boot\BCD on active partition (or \EFI\Microsoft\Boot\BCD on ESP)

Note:
On UEFI MBR and PBR code is not used for booting! UEFI firmware boot manager starts Windows boot manager directly.
EFI system partition(ESP) is not mapped usually and you can use diskpart.exe or mountvol.exe to map ESP to a drive letter for easy access.

 

 

 

 

 

Even small donations appreciated for site maintenance and further development. Thank you.

Paypal button

 

 

 

Errors fixed with bcdboot command:

1)
File: \Boot\BCD
Status: 0xc000000f
Info: An error occurred while attempting to read the boot configuration data.
2)
File: \Boot\BCD
Status: 0xc0000001
Info: An error occurred while attempting to read the boot configuration data.
3)
File: \Boot\BCD
Status: 0xc000014c
Info: An error occurred while attempting to read the boot configuration data.
4)
File: \Boot\BCD
Status: 0xc0000098
Info: The Windows Boot Configuration file does not contain a valid OS entry.