Windows uses a data store named BCD to manage the applications and settings that launch at startup. BCD replaces the Boot.ini file in older versions of Windows and provides more customization and troubleshooting options. BCDEdit is a command line tool for accessing and editing the BCD. It is included with Windows Vista and later versions. BCDEdit is used to create, delete, modify or copy BCD entries, as well as enable or disable certain boot options, such as safe mode or boot logging.
In this article, we will show you how to use bcdedit to modify Windows startup. We will see the basic commands, BCD input identifiers, data types and possible values. We will also give you some examples of common use of bcdedit to solve problems or optimize Windows startup.
How to access bcdedit?
To use bcdedit, you must have administrative privileges on your computer. You must also open a command prompt in administrator mode.
- Click the Start menu and type cmd in the search box
Right-click on Command Prompt and choose Run as administrator.
Type bcdedit /? to display the list of available commands- For detailed help on a particular command, type bcdedit /? , Or is the name of the command you want to view. For example, bcdedit /? createstore displays detailed help for the createstore command.
How to list BCD entries?
To list the BCD entries, you can use the bcdedit /enum command. This command displays the following information for each entry:
- The identifier: this is a unique code which allows the entry to be identified. It can be in the form {XXXX-XXXX-XXXX-XXXX}, where XXXX are hexadecimal digits, or in the form {name}, where name is a standard name defined by Windows . The most common standard identifiers are:
- {bootmgr}: it corresponds to the Windows boot manager ( Windows Boot Manager), which displays the boot menu and loads the selected OS.
- {current}: it corresponds to the OS selected when Windows starts.
- {default}: it corresponds to the OS selected by default when Windows starts.
- {ntldr}: it corresponds to an OS in ntldr ( Windows Legacy OS Loader), for example Windows XP.
- The device type: it indicates whether the entry corresponds to a physical (partition) or logical (file) device.
- The path: indicates the path to the executable file or boot sector associated with the entry.
- Options: These are additional parameters that modify the behavior of the input. For example, description allows you to change the name displayed in the start menu, timeout allows you to change the waiting time before automatic start, etc.
You can also use the bcdedit /v command to display more detailed information about BCD entries, such as creation date, modification date, or GUID.
How to create a new entry in the BCD?
To create a new entry in the BCD, you can use the bcdedit /create command. This command creates an entry with a randomly generated identifier and a specified application type. The application type can be one of the following:
- {bootmgr}: to create a boot manager type entry.
- {memdiag}: To create a memory diagnostic tool type entry.
- {ntldr}: to create an OS loader entry in ntldr.
- {legacy}: to create an OS loader entry in legacy mode.
- {resume}: To create a resume after hibernation type entry.
- {emssettings}: to create an emergency service settings entry.
- {badmemory}: to create a list-type entry of bad memory addresses.
- {dbgsettings}: to create a debug settings type entry.
For example, to create an OS loader entry in ntldr, you can type the following command:
bcdedit /create /d “ Windows XP” /ntldr application
This command displays the ID generated for the new entry, for example {cbd971bf-b7b8-4885-951a-fa03044f5d71}. You can then use this identifier to modify other parameters of the entry, such as path or options.
How do I modify an existing entry in the BCD?
To modify an existing entry in the BCD, you can use the bcdedit /set command. This command allows you to change the value of a data type for an entry specified by its identifier. The data type can be one of the following:
- device: to change the type of device associated with the entry.
- path: to change the path to the executable file or boot sector associated with the entry.
- description: to change the name displayed in the start menu for the entry.
- local: to change the language used for input.
- inherit: to make the entry inherit the parameters of another entry.
- recoverysequence: to specify the identifier of an entry to use in case of boot failure.
- recoveryenabled: To enable or disable automatic recovery in case of boot failure.
- osdevice: to change the type of device containing the OS system files associated with the entry.
- systemroot: to change the path to the root folder of the OS associated with the entry.
- resumeobject: to specify the identifier of a resume after hibernation type entry.
- nx: To enable or disable Data Execution Protection (DEP) for the input.
- pae: To enable or disable physical address extension (PAE) for the entry.
- detecthal: To enable or disable automatic hardware detection (HAL) for input.
- winpe: to indicate whether the entry corresponds to a Windows PE (preinstallation) environment.
- ems: to enable or disable emergency service (EMS) for entry.
- debug: to enable or disable debug mode for the input.
- debugtype: to specify the debug type to use for input (serial, 1394 or usb).
- debugport: to specify the serial port to use for serial port debugging.
- baudrate: To specify the baud rate to use for serial port debugging.
- 1394channel: To specify the channel to use for IEEE 1394 port debugging.
- usbbusparams: To specify the USB bus parameters to use for USB port debugging.
- sos: to enable or disable the display of driver information during startup.
- bootlog: to enable or disable boot logging in the %WINDIR%\ntbtlog.txt file.
- nocrashautoreboot: to disable automatic reboot in case of blue screen.
- usefirmwarepcisettings: to use firmware PCI settings instead of Windows settings.
- groupsize: to specify the size of the processor group for parallel boot.
- groupaware: to enable or disable consideration of the processor group during parallel startup.
- numproc: to specify the number of processors to use for startup.
- truncatememory: to specify the maximum amount of memory to use for startup.
- removememory: to specify the amount of memory to remove for startup.
- increaseuserva: to increase the amount of virtual memory addressable by user mode applications.
- testsigning: to enable or disable loading of non-digitally signed drivers.
- nointegritychecks: To enable or disable integrity checking of digitally signed drivers.
- loadoptions: to specify load options to pass to the OS loader.
- hypervisorlaunchtype: to enable or disable hypervisor launch during startup.
- hypervisordebugtype: to specify the debug type to use for the hypervisor (serial, 1394 or usb).
- hypervisordebugport: To specify the serial port to use for serial port hypervisor debugging.
- hypervisorbaudrate: To specify the baud rate to use for serial port hypervisor debugging.
- hypervisorchannel: To specify the channel to use for hypervisor debugging per IEEE 1394 port.
- hypervisorusbbusparams: to specify the USB bus parameters to use for hypervisor debugging via USB port.
- bootstatuspolicy: to specify the policy to apply in case of previous boot failure (ignoreallfailures, ignoreshutdownfailures, displayallfailures or rebootonfailure).
- bootems: To enable or disable emergency redirection (EMS) during boot.
To modify an entry with the bcdedit /set command, you must specify the entry ID and data type to modify, as well as the value to assign. For example, to change the name displayed in the start menu for the {current} entry, you can type the following command:
bcdedit /set {current} description “ Windows 10”
You can also use the standard identifiers {bootmgr}, {default} or {ntldr} instead of the randomly generated identifiers, if you know the type of entry you want to modify. For example, to change the wait time before the Boot Manager starts automatically, you can type the following command:
bcdedit /set {bootmgr} timeout 10
How to delete an entry from the BCD?
To delete an entry from the BCD, you can use the bcdedit /delete command. This command deletes the entry specified by its identifier, as well as all entries that depend on it. For example, to delete the entry {cbd971bf-b7b8-4885-951a-fa03044f5d71} that we created earlier, you can type the following command:
bcdedit /delete {cbd971bf-b7b8-4885-951a-fa03044f5d71}
You can also use the /cleanup option to remove all orphan entries from the BCD, that is, entries that are not referenced by the boot manager or by an OS entry. For example, to remove all orphan entries from the BCD, you can type the following command:
bcdedit /delete /cleanup
How to copy a BCD entry?
To copy a BCD entry, you can use the bcdedit /copy command. This command creates a new entry with the same parameters as the entry specified by its ID, but with a new randomly generated ID. You can then modify the settings of the new entry as needed. For example, to copy the {current} entry and give it a new name, you can type the following commands:
bcdedit /copy {current} /d “ Windows 10 – Copy” bcdedit /set {ID} description “ Windows 10 – Copy”
Where {ID} is the generated identifier for the new entry.
How to restore the BCD to its original state?
If you have modified the BCD and are having boot problems, you can restore the BCD to its original state using the bcdedit /import command. This command restores the contents of the system store from a backup file previously generated with the bcdedit /export command. This command deletes all existing entries in the system store before importing.
For example, if you created a BCD backup file named backup.bcd in the C:\ folder, you can restore the BCD from that file by typing the following command:
bcdedit /import C:\backup.bcd
.
FAQs
What is the difference between bcdedit and bootrec?
BCDEdit is a tool to modify the contents of the BCD, while bootrec is a tool to repair Windows startup in case of BCD or boot sector corruption. Bootrec uses bcdedit internally to rebuild the BCD.
How do I access bcdedit if Windows won't start?
If Windows does not start, you can access bcdedit using Windows installation media (DVD or USB stick) or a system repair disc. You must then choose the Repair computer option and then access the command prompt.
How to create a dual-boot with bcdedit?
To create a dual-boot with bcdedit, you must have two partitions each containing an OS compatible with BCD ( Windows Vista or later). You must then create an entry in the BCD for each OS, specifying the appropriate device type, path, and options. You can also modify the {bootmgr} entry to change the default OS or the time to wait before autobooting.
How to remove a dual-boot with bcdedit?
To delete a dual-boot with bcdedit, you must delete the entry corresponding to the OS you no longer want to use in the BCD, as well as all the entries that depend on it. You must also modify the {bootmgr} entry to change the default OS if necessary. You can then format or delete the partition containing the deleted OS.
How to enable safe mode with bcdedit?
Safe Mode is a startup option that lets you launch Windows with a limited number of drivers and services. It is useful for diagnosing and resolving startup or stability issues. To enable safe mode with bcdedit, you must modify the entry corresponding to the OS you want to boot in safe mode, adding the safeboot option with the value minimal, network or dsrepair depending on the type of safe mode that you want to use. For example, to enable minimal safe mode for the {current} entry, you can type the following command:
bcdedit /set {current} safeboot minimal
To disable safe mode, you need to remove the safeboot option from the entry. For example, to disable safe mode for the {current} entry, you can type the following command:
bcdedit /deletevalue {current} safeboot
Conclusion
Windows startup . It allows you to create, delete, modify or copy BCD entries, as well as activate or deactivate certain boot options. It is useful for troubleshooting startup problems, optimizing system performance, or creating custom configurations. However, BCDEdit is also a complex and potentially dangerous tool. You must be careful when using it and understand the consequences of changes made to the BCD. It is recommended to make a backup of the BCD before modifying it, and to refer to the official Microsoft documentation for more details on commands, identifiers, data types and possible values. If you are having difficulty booting your PC after changing the BCD, you can try resetting your PC's BIOS using Clear CMOS .