BCDboot Command-Line Options

Published: October 22, 2009

Updated: October 22, 2009

Applies To: Windows 7

BCDboot is a tool used to quickly set up a system partition, or to repair the boot environment located on the system partition. The system partition is set up by copying a small set of boot environment files from an installed Windows® image. BCDboot also creates a Boot Configuration Data (BCD) store on the system partition with a new boot entry that enables you to boot to the installed Windows image.

You can run BCDboot from Windows® PE. For information on Windows PE, see Windows PE Walkthroughs.

BCDboot is included with Windows® 7 and Windows Server® 2008 R2 in the %WINDIR%\System32 folder. BCDboot is also available in the Windows OEM Preinstallation Kit (OPK) and Windows Automated Installation Kit (AIK) under the %Program Files%\<version>\Tools directory, where <version> is either Windows OPK or Windows AIK.

BCDboot copies a set of boot environment files from a Windows image that is already on the computer. BCDboot can copy boot environment files from images of Windows Vista®, Windows Server® 2008, Windows 7, or Windows Server 2008 R2. For information on applying a Windows image to a system, see Capture and Apply Windows Images.

BCDboot uses the file: %WINDIR%\System32\Config\BCD-Template file to create a new BCD store and initialize the BCD boot-environment files on the system partition. Specific BCD settings can be defined in the BCD-Template file. The tool also copies the most recent versions of boot-environment files from the operating system image %WINDIR%\boot folder and %WINDIR%\System32 folder to the system partition.

BCDboot copies files to the default system partition identified by the firmware. You can create this partition by using a partitioning tool such as DiskPart. You do not have to assign a drive letter to this partition for BCDboot to locate it. For more information, see the DiskPart Help from the command line, or Diskpart Command line syntax.

  • On BIOS-based systems, the system partition is the active partition on disks using the Master Boot Record (MBR) disk format. BCDboot creates the \Boot directory on the system partition and copies all required boot-environment files to this directory.

  • On Unified Extensible Firmware Interface (UEFI)-based systems, the EFI system partition is the system partition on disks using the GUID Partition Table (GPT) disk format. BCDboot creates the \Efi\Microsoft\Boot directory and copies all required boot-environment files to this directory.

BCDboot can update an existing boot environment to the system partition. Newer file versions from the Windows image will be copied to the system partition.

If a BCD store already exists on the system partition:

  • BCDboot will create a new boot entry in the existing BCD store, based on settings in the BCD-Template file, and remove any duplicate boot entries that reference the same Windows image.

  • If there is already a boot entry for the Windows image, and additional BCD settings are enabled for that boot entry beyond the default values, these settings can be retained the next time BCDboot is run by using the /m option to merge the existing boot entry, identified by the OS Loader GUID into the new boot entry created by BCDboot.

BCDboot Command-line Options

The following command-line options are available for BCDboot.exe.

BCDBOOT source [/llocale] [/svolume-letter] [/v] [/m [{OS Loader GUID}]]

 

Option Description

source

Specifies the location of the Windows directory to use as the source for copying boot-environment files.

/l

Optional. Specifies the locale. The default is US English.

/s

Optional. Specifies the volume letter of the system partition. The default is the system partition identified by the firmware.

/v

Optional. Enables verbose mode.

/m

Optional. By default, merges only global objects.

If an OS Loader GUID is specified, merges the given loader object within the system template to produce a bootable entry.

Examples

  • This example initializes the system partition using files from the operating system image installed on the C: volume.

    bcdboot C:\Windows
  • This example sets the default BCD locale to Japanese, and copies BCD files to a system partition that was assigned a volume letter S: using DiskPart.

    bcdboot C:\Windows /l ja-jp /s S:
  • This example merges the OS loader in the current BCD store identified with the given GUID in the new BCD store.

    bcdboot c:\windows /m {d58d10c6-df53-11dc-878f-00064f4f4e08}

See Also

Concepts

Apply Images by Using ImageX

Other Resources

BCDedit

Tags :


Community Content

anuar30
fix
please fix my software
Tags :

Steve6375
GPT install from WinPE
<p>Will bcdboot initialise the system partition of a GPT disk if booted from an MBR version of WinPE v3 - or must WinPE v3 be booted as UEFI device? Also, can a 32bit MBR booted WinPe v3 version correctly run bcdboot to make a GPT System partition bootable?i.e. if booting from a WinPE environment, which of these will work for a GPT hard disk when running<br /> </p> <p>BCDboot c:\windows /s S: (assuming S: is system ESP ptn)?<br /><br /></p> <p>boot 32-bit WinPE in MBR mode<br />boot 64-bit WinPE in MBR mode<br />boot 32-bit WinPE in UEFI mode<br />boot 64-bit WinPE in UEFI mode<br />P.S. Command Syntax is missing spaces after /s and /l commands in article.</p>
Tags : contentbug

Page view tracker