bcdboot.exe is a Windows command line utility used to install the bootmgr bootloader and to configure its boot configuration data (BCD). bcdboot copies the core boot files from a chosen Windows installation on the disk to the system boot partition,  and adds that an appropriate entry to the boot configuration data.

Contents

Synopsis

Arguments enclosed with bracers {  } are necessary, arguments enclosed with bracekts [  ] are optional, | stands for “or“. 

bcdboot {source} [/i <locale>] [/s <volumeLetter> [/f <firmwareType>]] [/v] [/m <OSloaderGuid>]] [/addlast | /p] [/d] [/c]

Description

bcdboot is used to install the bootmgr bootloader to the system partition, creates a new BCD store entry and initializes its contents as-needed. The BCD is a firmware-independent database containing boot-time configuration data. It replaced the old boot.ini previously used by the ntldr bootloader in Windows XP and Windows Server 2003. bcdboot doesn’t affect the bootsector or the master boot record (MBR), which must be configured separately. It can be used to either reinstall the bootloader files overwriting default boot entry, or optionally to add a single entry to the boot menu instead. bcdboot is especially useful when setting up multiple operating systems on a single computer, and can be used to fix boot problems such as an operating system not showing up in the boot menu or an out-dated or corrupted bootloader installation.

The command line arguments to bcdboot are as follows:

source
Instructs bcdboot to copy the critical boot files from the source Windows installation to the system (boot) partition, installs a BCD entry for the source installation, and adds that entry to the displayed boot menu. The typical source format is C:\Windows. On UEFI-based systems, boot environment files and the BCD store are stored on a the reserved UEFI system partition, while on BIOS-based systems these files are stored on the primary (active) partition.

/i <locale>
This flag specifies the localization of the boot environment; the locale value for US English is en-us

/s <volumeLetter>
Copies the boot environment files to a partition labeled by volumeLetter and creates a new BCD store on it. As the system partition isn’t labeled, this option is not used in the typical deployment scenarios. The user should use this option when configuring a drive that will be used on another computer i.e. a secondary hard drive, or in case the correct boot partition is not automatically identified. More on the difference of deployment depending on the firmware type can be found in the section regarding the /f option below.

/f <firmwareType>
Specifies the firmware type. Valid values are UEFI, BIOS and ALL. Used with the /s flag. The UEFI value copies only the UEFI-compatible boot files and initializes a BCD store on a partition specified by the /s flag making it compatible with UEFI-based systems. The BIOS value does the same for BIOS-based systems. The ALL value installs both the BIOS- and UEFI-compatible versions of the bootloader and also configures each of their BCDs accordingly.

/v
Enables verbose mode. In verbose mode, extra information about the operations being carried out is displayed to the end user.

/m <OSloaderGuid>
Merges an existing BCD entry identified by the GUID OSloaderGuid with the system template to create a bootable entry. By default, this option will merge only global objects.

/addlast
The default behaviour of bcdboot is that the newly-created entry is added as the first in Windows Boot Manager menu. This options specifies that it is added as the last entry in the list instead.

/p
Used to preserve the existing UEFI boot order. The boot entry positions are preserved, and if the entry doesn’t exist it will be added as the first one in the list. It cannot be used together with the /addlast option.

/d
Preserves the existing default windows boot entry.

/c
Specifies that the existing objects (BCD elements) won’t be migrated. In Windows 10, during an upgrade BCD elements such as debugsettings or flightsigning are preserved as well.

Exit Status 

bcdboot returns on success and 1 if an error occurs.

Examples

To copy the boot environment files to the system partition and add a Windows installation located on the D: drive to the boot entry:

bcdboot D:\Windows

To copy the boot environment files from the C:\Windows folder to the system partition on a secondary hard drive. Here, the partition labeled with a D: is the system partition of the secondary hard drive:

bcdboot C:\Windows /s D:

To copy the boot environment files on a partition labeled D: that belongs to a secondary hard drive, including boot files to support either a UEFI-based or a BIOS-based computer:

bcdboot c:\Windows /s D: /f ALL

Compatibility

bcdboot works on Windows 10, Windows 8.1, WIndows 8, Windows 7, Wndows Vista, Windows Server 2016. Technical Preview, Windows Server 2012 R2, Windows Server 2012, Windows Server 2008 R2, Windows Server 2008.

History

bcdboot was first introduced in Windows 7. The /p, /d, and /c flags were introduced in Windows 10.

See Also

bootsect – tool used to update bootsector and master boot record code.