Posted on June 7, 2017 · Posted in Windows 10, Windows 8

How to Backup and Restore Boot Configuration (BCD) in Windows

Starting from Windows Vista, Microsoft stopped using the old Windows boot loader NTLDR, having replaced it with BOOTMGR. The code of the new boot manager is stored in a special file bootmgr in the root of the active partition. The boot manager is loading the system according to the existing configuration located in the special storage— BCD (Boot Configuration Data). This storage is a special binary file with the name BCD located in BOOT directory of the active partition (as a rule this is a hidden System Reserved partition).

Bootmgr boots Windows kernel according to BCD configuration. In addition, boot manager can boot other Windows OSs installed on this computer (NT/2000/XP), Linux OS versions, mount and boot from a virtual disk file or a WIM image.

bcd configuration file in BOOT folder

BCD resembles boot.ini file containing boot settings familiar from Windows XP /2000. However, you cannot edit it directly using a text editor. You can only modify BCD using a special command-line utility, Boot Configuration Data Editorbcdedit.exe (located in c:\Windows\System32).

You should understand that Windows boot depends on the correctness and consistency of information in BCD. If this file is corrupted or deleted, Windows won’t be able to boot normally. So prior to any experiments with BCD (installation of another OS with dual boot or multiboot, configuration of additional boot settings, like adding Safe Mode to Windows Boot Manager), it is recommended to backup BCD to be able to roll back if something goes wrong.

In this article, we’ll consider how to backup and restore BCD repository in Windows 10 / Windows 8.

Backup Boot Configuration Data (BCD)

Start the command prompt with the administrator privileges and run the following command:

bcdedit /export e:\bcd_backup.bcd

bcdedit /export e:\bcd_backup.bcd

In this example, Boot Configuration Data (BCD) will be exported to drive E:\ to the file bcd_backup.bcd. (It’s better that it is an external storage or a USB drive.).

How to Rebuild BCD

If an error or a failure occurs during BCD modification and the system doesn’t boot normally, (e. g., the error BOOTMGR is Missing or BOOTMGR is compressed appeared), it is necessary to rebuild BCD. To do it:

  • Boot from your Windows 10 or Windows 8 installation or boot DVD/USB drive
  • If you are using the installation disk, select Repair your computer option. bcdedit /export e:\bcd_backup.bcd
  • Run the command prompt and go to Troubleshoot -> Advanced Options ->Command Prompt
  • Run the following commands:bootrec /FixMbr – overwrites master boot record on the system partition

    bootrec /FixBoot – rebuilds boot sector on the boot partition

    bootrec /ScanOS – scans all disks for installed systems compatible with Windows and add the entry of the detected OS to the BCD.

    bootrec /RebuildBcd –  rebuilds BCD file configuration

bootrec /RebuildBcd

Restore Boot Configuration Data (BCD) from Backup

You can replace BCD configuration and import previously saved configuration to it using this command:
bcdedit /import e:\bcd_backup.bcd
After BCD has been imported, restart your computer and make sure that all boot options available earlier are present and work correctly.

Previous:
Next:
Related Articles