Boot Configuration Data Editor Frequently Asked Questions
Applies To: Windows Server 2008, Windows Vista
The Boot Configuration Data (BCD) store contains boot configuration parameters and controls how the operating system is started in Microsoft® Windows Vista® and Microsoft® Windows Server® 2008 operating systems. These parameters were previously in the Boot.ini file (in BIOS-based operating systems) or in the nonvolatile RAM (NVRAM) entries (in Extensible Firmware Interface–based operating systems). You can use the Bcdedit.exe command-line tool to affect the Windows® code which runs in the pre-operating system environment by adding, deleting, editing, and appending entries in the BCD store. Bcdedit.exe is located in the \Windows\System32 directory of the Windows Vista partition.
Note
Even though this document focuses primarily on Windows Vista, this information applies to both Windows Vista and Windows Server 2008.
Note
For detailed command and option information at the command prompt, type bcdedit.exe /? command. For example, type bcdedit.exe /? CREATESTORE.
BCD was created to provide an improved mechanism for describing boot configuration data. With the development of new firmware models (for example, the Extensible Firmware Interface (EFI)), an extensible and interoperable interface was required to abstract the underlying firmware. This new design provides the foundation for a variety of new features in Windows Vista (for example, the Startup Repair tool and Multi-User Install shortcuts).
BIOS-based operating systems. The BCD registry file is located in the \Boot\Bcd directory of the active partition.
EFI–based operating systems. The BCD registry file is located on the EFI system partition.
No. You need administrative credentials to modify BCD.
Depending on what you want to change, you can use the following tools to modify BCD:
Startup and recovery. The Startup and recovery dialog box enables you to select the default operating system to start if you have multiple operating systems installed on your computer. You can also change the time-out value. These settings are located on the Advanced tab in the System Properties dialog box.
System Configuration utility (Msconfig.exe). Msconfig.exe is a more advanced tool with capabilities that include the following options: /debug, /safeboot, /bootlog, /noguiboot, /basevideo, and /numproc.
BCD WMI provider. The BCD Windows Management Instrumentation (WMI) provider is a management interface that you can use to script utilities that modify BCD. This is the only programmatic interface available for BCD. For more information, see Boot Configuration Data (BCD) at the Microsoft Web site (https://go.microsoft.com/fwlink/?LinkId=56792).
BCDEdit.exe. BCDEdit.exe is a command-line utility that replaces Bootcfg.exe in Windows Vista. For more information, see What can I do with Bcdedit.exe?.
Note
You cannot use Bootcfg.exe to modify BCD. However, Bootcfg.exe will remain in the operating system in order to support older operating systems.
All Windows entries are stored in the BCD store. On an EFI-based operating system, there is a single entry in the EFI firmware boot manager called “Windows Boot Manager”. This file is located in \EFI\Microsoft\Boot\Bootmgfw.efi. If you start Windows Boot Manager using the EFI boot manager, you should get a common look and feel on both your EFI-based and PC/AT-based operating systems. For example, the advanced boot options menu should work. The default timeout for the EFI boot manager is 2 seconds to make it easier to boot back and forth between Windows Server 2003 with Service Pack 1 and Windows Vista.
Yes. You can install Windows Vista on a different partition. It is best to install Windows Vista after you install the older operating systems. Older operating systems will continue to use Boot.ini for boot configuration.
No. You will need to alter your code so that it uses Boot.ini for the older operating systems, and so that it uses BCD on Windows Vista.
In a multiboot environment, does modifying BCD on the pre-Windows Vista operating system modify the boot configuration?
No. You need to modify BCD to alter the boot configuration for Windows Vista. You also need to modify Boot.ini (for BIOS-based operating systems) or NVRAM (for EFI-based operating systems) to alter boot configuration for the older operating systems.
No. The boot manager for Windows Vista runs first to determine which operating system to start. Therefore, if you want to boot to the older operating system, you must set the default order to the older operating system in the BCD store. For more information, see How to change the default operating system entry.
You can use Bcdedit.exe to modify the Windows code which runs in the pre- operating system environment by adding, deleting, editing, and appending entries in the BCD store. Bcdedit.exe is located in the \Windows\System32 directory of the Windows Vista partition.
Bcdedit.exe currently enables you to do the following:
•Create a BCD store for a later installation of Windows Server 2008.
•Add entries to a existing BCD store
•Modify existing entries in a BCD store.
•Delete entries from a BCD store.
•Export entries to a BCD store.
•Import entries from a BCD store.
•List currently active settings.
•Query entries of a particular type.
•Apply a global change (to all the entries).
•Change the default time-out value.
When I run bcdedit /enum, why do I get a Windows Boot Manager entry, a few Windows Boot Loader entries, and a legacy entry?
The boot environment has been split into two categories: Windows Boot Manager and various boot applications that run in the boot environment. Windows Boot Manager is basically a mini-operating system that controls your boot experience and enables you to choose which boot application to run. There are various boot applications (for example, Windows Boot Loader) and each one does something different. For example, a Windows Boot Loader application loads Windows.
When you specify /enum, you will get the following:
One Windows Boot Manager entry (because there is only one boot manager).
A Windows Boot Loader application for each Windows Vista operating system you have installed on the computer. For example, if you have two different versions of Windows Vista installed on different partitions, you will see two Windows Boot Loader entries.
One legacy entry. This entry is not a boot application, but instead uses NTLDR and Boot.ini to boot into an operating system that is older than Windows Vista. You will use this entry to boot into Windows Server 2003, Windows XP, and earlier operating systems (if installed on the computer).
Yes. For detailed command and option information at the command prompt, type bcdedit.exe /? and bcdedit.exe /? Command. For example, type bcdedit.exe /? CREATESTORE.
At the command prompt type:
bcdedit /dbgsettings DebugType [debugport Port**] [baudrate** Baud**]**
[channel Channel] [targetname TargetName]
Option | Explanation |
---|---|
DebugType |
Specifies the type of debugger. DebugType can be one of SERIAL, 1394 or USB. The remaining options depend on the debugger type selected. |
Port |
For SERIAL debugging, specifies the serial port to use as the debugging port. |
Baud |
For SERIAL debugging, specifies the baud rate to be used for debugging. |
Channel |
For 1394 debugging, specifies the 1394 channel to be used for debugging. |
TargetName |
For Universal Serial Bus (USB) debugging, specifies the USB target name to be used for debugging. |
The following command sets the global debugger settings to serial debugging
over com1 at 115,200 baud:
bcdedit /dbgsettings serial debugport 1 baudrate 115200
The following command sets the global debugger settings to 1394 debugging
using channel 23:
bcdedit /dbgsettings 1394 CHANNEL 32
The following command sets the global debugger settings to USB debugging
using target name "debugging":
bcdedit /dbgsettings USB targetname debugging
At the command prompt, type:
bcdedit /enum Type /v
Option | Explanation |
---|---|
Type |
Specifies the type of entries to be listed. Type can be one of the following:
|
For example, the following command lists all entries:
bcdedit /enum all /v
At the command prompt, type:
bcdedit /default ID
Option | Explanation |
---|---|
ID |
Specifies the default GUID to be used when the time-out expires. {466f5a88-0af2-4f76-9038-095b170dc21c} is the predefined GUID for NTLDR. You can find the ID for a particular object by specifying bcdedit /enum all. |
The following command sets the specified entry as the default boot manager
entry:
bcdedit /default {cbd971bf-b7b8-4885-951a-fa03044f5d71}
The following command sets the legacy Windows loader (Ntldr) as the default
entry: {466f5a88-0af2-4f76-9038-095b170dc21c} is the predefined GUID for Ntldr.
bcdedit /default {466f5a88-0af2-4f76-9038-095b170dc21c}
At the command prompt, type:
bcdedit /bootsequence {ID} {ID} {ID} …
Option | Explanation |
---|---|
ID |
Specifies the GUID(s) that make up the boot sequence for the next restart. After this one-time boot it will revert back to the default boot order. |
The following command sets the specified operating system as the default for the next restart. After that restart, it will be reset to DISPLAYORDER.
bcdedit /bootsequence {cbd971bf-b7b8-4885-951a-fa03044f5d71}
The following command sets two operating system entries and the
legacy Windows loader (Ntldr) in the boot manager one-time boot sequence:
bcdedit /bootsequnce {802d5e32-0784-11da-bd33-000476eba25f}
{cbd971bf-b7b8-4885-951a-fa03044f5d71} {legacy}
To change the length of time the computer waits until the default operating system is selected, type the following:
bcdedit /timeout TimeOut
Option | Explanation |
---|---|
TimeOut |
Specifies the time to wait, in seconds, before the boot manager selects a default entry. |
For example, the following command sets the boot manager TimeOut to 15 seconds:
bcdedit /timeout 15
At the command prompt, type:
Bcdedit.exe /display {ID} {ID1} {ID2} …
or
Bcdedit.exe /displayorder {ID} [/addlast|/addfirst|/remove]
Option | Explanation |
---|---|
ID |
Specifies one GUID or a list of GUIDs that make up the display order. You must specify at least one ID. For more information about identifiers, type bcdedit /? ID. |
The following command sets three operating system entries in the boot manager display order:
Bcdedit.exe /displayorder {c84b751a-ff09-11d9-9e6e-0030482375e6} {c74b751a-ff09-11d9-9e6e-0030482375e4} {c34b751a-ff09-11d9-9e6e-0030482375e7}
The following command sets two operating system entries and the legacy Windows loader in the boot manager display order:
bcdedit /displayorder {802d5e32-0784-11da-bd33-000476eba25f}
{cbd971bf-b7b8-4885-951a-fa03044f5d71} {legacy}
The following command adds the entry represented by the GUID to end of the boot menu display order.
bcdedit.exe /displayorder {c84b751a-ff09-11d9-9e6e-0030482375e6}-addlast
At the command prompt, type:
bcdedit /delete ID [/f]
Option | Explanation |
---|---|
ID |
Specifies the GUID of the boot entry you want to delete. If ID is not specified, the current boot entry ID will be deleted. If you specify a well-known GUID, you will have to force the deletion by specifying /f. For example: bcdedit /delete {default} /f |
For example, the following command deletes the entry with id {802d5e32-0784-11da-bd33-000476eba25f}.
bcdedit /delete {802d5e32-0784-11da-bd33-000476eba25f}
At the command prompt, type:
bcdedit /debug [{ID}] {on|off}
Option | Explanation |
---|---|
ID |
Specifies the GUID of the boot entry you want to modify. If ID is not specified, it modifies the current boot entry ID. |
For example, the following command enables boot debugging for the specified operating system boot entry:
bcdedit /debug {cbd971bf-b7b8-4885-951a-fa03044f5d71} on
Note
For more information about IDs, run bcdedit /? ID.
At the command prompt, type:
bcdedit /set {ID} pae [Default|ForceEnable|ForceDisable]
Option | Explanation |
---|---|
ID |
Specifies the ID of the operating system entry you want to change. If you do not specify ID, the current operating system settings will be modified. |
For example:
bcdedit /set {802d5e32-0784-11da-bd33-000476eba25f} pae forceenable
At the command prompt, type the following. Removememory removes memory from the total available memory that the operating system can use.
bcdedit /set {GUID} removememory bytes
Option | Explanation |
---|---|
ID |
Specifies the ID of the operating system entry you want to change. If you do not specify ID, the current operating system settings will be modified. |
bytes |
The number of bytes to remove. |
This example removes 256 MB of memory from the total available:
bcdedit /set {802d5e32-0784-11da-bd33-000476eba25f } removememory 256
At the command prompt, type the following. Truncatememory disregards all memory at or above the specified physical address.
bcdedit /set {ID} truncatememory bytes
Note
We recommend that you use removememory instead. It does a better job of restricting the operating system to use the specified memory while accounting for memory holes.
Option | Explanation |
---|---|
ID |
The ID of the operating system entry you want to change. If you don't specify ID, the current operating system settings will be modified. |
bytes |
Specifies the number of bytes to truncate. |
This example sets the truncate memory to 1024 MB:
bcdedit /set {802d5e32-0784-11da-bd33-000476eba25f} truncatememory 1073741824
At the command prompt, type:
bcdedit /set {ID} kernel "Path"
Option | Explanation |
---|---|
ID |
Specifies the identifier of the operating system entry you want to change. If you do not specify ID, then the current operating system settings will be modified. |
For example:
bcdedit /set {802d5e32-0784-11da-bd33-000476eba25f} kernel "mykrnl.dll"
To create a new Windows Vista operating system entry, use the following procedure:
First, copy the operating system entry you want to replicate and name it NewEntryDescription.
bcdedit /copy {GuidToCopy} /d “NewEntryDescription”
This command will split the new GUID. Use the new GUID to modify the partition information by specifying:
bcdedit /set {NewGuid} device partition=x:
bcdedit /set {NewGuid} osdevice partition=x:
Add the new operating system entry created to the display by specifying:
bcdedit /displayorder {NewGuid} /addlast
The /enum command lists entries in the BCD store. To list entries, type:
bcdedit /enum [Type]
Option | Explanation |
---|---|
Type |
Specifies the type of entries to list. Type can be one of the following:
|
The following command lists all operating system loader boot entries:
bcdedit /enum osloader
The following command lists all boot manager entries:
bcdedit /enum bootmgr
How to modify BCD when installing a previous version of Windows onto a computer running Windows Vista
To install an older Windows operating system on a computer running Windows Vista, use the following procedure.
Install the previous version of Windows.
Log on to the older operating system and restore the latest boot manager by running the following. Fixntfs.exe will be in the \boot directory of the active partition.
fixntfs /lh
Create a BCD entry for the older operating system by specifying the following. Bcdedit.exe is located in the \Windows\System32 directory of the Windows Vista partition. Description is the description of the new entry for the older operating system.
Bcdedit /create {legacy} /d “Description”
Bcdedit /set {legacy} device boot
Bcdedit /set {legacy} path \ntldr
Bcdedit /displayorder {legacy} /addlast
Restart the computer in order for the changes to take effect.
To create an entry to boot a Windows Imaging Format (WIM) image, you will need to create an OSloader type entry with RAMDISK options pointing to the boot partition. To do this, use the following procedure. In this procedure, the arcpath multi(0)disk(0)rdisk(0)partition(1) refers to the C: drive on the computer, and Boot.wim is a regular Boot.wim with Winload.exe in the System32 folder inside the WIM image.
Create the {ramdisktoptions} object in your BCD store by specifying the following. Drive should be the drive that contains the image.
bcdedit /create {ramdiskoptions} /d "Ramdisk options"
**bcdedit /set {ramdiskoptions} ramdisksdidevice partition=**Drive
bcdedit /set {ramdiskoptions} ramdisksdipath \boot\boot.sdi
Create a new boot application entry by specifying:
bcdedit /create /d "Boot from WIM" /application OSLOADER
This will return an identifier (GUID) for the newly created entry. This new entry will be referred to as {GUID} in the rest of this procedure. Next specify the following:
bcdedit /set {GUID} device ramdisk=[c:]\sources\boot.wim,{ramdiskoptions}
bcdedit /set {GUID} path \windows\system32\winload.exe
bcdedit /set {GUID} osdevice ramdisk=[c:]\sources\boot.wim,{ramdiskoptions}
bcdedit /set {GUID} systemroot \windows
If you are booting into Windows Preinstallation Environment (Windows PE), then you will also need to specify:
bcdedit /set {GUID} winpe yes
bcdedit /set {GUID} detecthal yes
Next specify the following to add your new entry to the display order:
bcdedit /displayorder {GUID} /addlast
To override the global entry for a specific debugger setting, type one of the following.
Note
This command does not enable or disable the debugger for the specific boot entry.
To set serial debugging, type:
bcdedit /set {GUID} debugtype:serial
bcdedit /set {GUID} baudrate:Baudrate
bcdedit /set {GUID} debugport:Port
To set USB debugging, type:
bcdedit /set {GUID} debugtype:usb bcdedit /set {GUID} targetname:debugging
To set 1394 debugging, type:
bcdedit /set {GUID} debugtype:1394 bcdedit /set {GUID} targetname:32
The following command sets the debugger setting for c74b751a-ff09-11d9-9e6e-0030482375e4 to serial debugging over com1 at 115,200 baud:
Bcdedit /set {c74b751a-ff09-11d9-9e6e-0030482375e4} debugtype:serial
Bcdedit /set {c74b751a-ff09-11d9-9e6e-0030482375e4} baudrate:115200
Bcdedit /set {c74b751a-ff09-11d9-9e6e-0030482375e4} debugport:1