Windows OS Hub
  • Windows Server
    • Windows Server 2016
    • Windows Server 2012 R2
    • Windows Server 2012
    • Windows Server 2008 R2
    • SCCM
  • Active Directory
    • Group Policies
  • Windows Clients
    • Windows 10
    • Windows 8
    • Windows 7
    • MS Office
    • Outlook
  • Virtualization
    • VMWare
    • Hyper-V
  • PowerShell
  • Exchange
  • Home
  • About

Windows OS Hub

  • Windows Server
    • Windows Server 2016
    • Windows Server 2012 R2
    • Windows Server 2012
    • Windows Server 2008 R2
    • SCCM
  • Active Directory
    • Group Policies
  • Windows Clients
    • Windows 10
    • Windows 8
    • Windows 7
    • MS Office
    • Outlook
  • Virtualization
    • VMWare
    • Hyper-V
  • PowerShell
  • Exchange

 Windows OS Hub / Windows 10 / How to Backup and Restore Boot Configuration (BCD) in Windows

June 7, 2017 Windows 10Windows 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 Editor — bcdedit.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.

Contents:
  • Backup Boot Configuration Data (BCD)
  • How to Rebuild BCD
  • Restore Boot Configuration Data (BCD) from Backup

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.

0 comment
0
Facebook Twitter Google + Pinterest
previous post
How to Access and Manage Windows Registry with PowerShell
next post
Outlook: How to Delete E-Mails Stuck in Outbox

Related Reading

How to Sign a PowerShell Script (PS1) with...

February 25, 2021

How to Shadow (Remote Control) a User’s RDP...

February 22, 2021

Configuring PowerShell Script Execution Policy

February 18, 2021

Configuring Proxy Settings on Windows Using Group Policy...

February 17, 2021

Updating Group Policy Settings on Windows Domain Computers

February 16, 2021

Leave a Comment Cancel Reply

Categories

  • Active Directory
  • Group Policies
  • Exchange
  • Windows 10
  • Windows 8
  • Windows 7
  • Windows Server 2016
  • Windows Server 2012 R2
  • Windows Server 2008 R2
  • PowerShell
  • VMWare
  • MS Office

Recent Posts

  • Accessing USB Flash Drive from VMWare ESXi

    February 26, 2021
  • How to Sign a PowerShell Script (PS1) with a Code Signing Certificate?

    February 25, 2021
  • Change the Default Port Number (TCP/1433) for a MS SQL Server Instance

    February 24, 2021
  • How to Shadow (Remote Control) a User’s RDP session on RDS Windows Server 2016/2019?

    February 22, 2021
  • Configuring PowerShell Script Execution Policy

    February 18, 2021
  • Configuring Proxy Settings on Windows Using Group Policy Preferences

    February 17, 2021
  • Updating Group Policy Settings on Windows Domain Computers

    February 16, 2021
  • Managing Administrative Shares (Admin$, IPC$, C$, D$) in Windows 10

    February 11, 2021
  • Packet Monitor (PktMon) – Built-in Packet Sniffer in Windows 10

    February 10, 2021
  • Fixing “Winload.efi is Missing or Contains Errors” in Windows 10

    February 5, 2021

Follow us

woshub.com
  • Facebook
  • Twitter
  • RSS
Popular Posts
  • Booting Windows 7 / 10 from GPT Disk on BIOS (non-UEFI) systems
  • Removable USB Flash Drive as Local HDD in Windows 10 / 7
  • How to Create a Wi-Fi Hotspot on your Windows 10 PC
  • How to increase KMS current count (count is insufficient)
  • How to Download APPX Installation File from Microsoft Store in Windows 10 / 8.1
  • How to Sign an Unsigned Driver for x64 Windows 10, 8.1 or 7 with a Self-signed Certificate
  • How to Hide Installed Programs from Programs and Features in Windows?
Footer Logo

@2014 - 2018 - Windows OS Hub. All about operating systems for sysadmins


Back To Top