BCDEDIT – Boot Configuration Data Store Editor

I recently had to troubleshoot an interesting problem which required me to reboot a server into safe mode a number of times. While I was hammering away on the F8 key during the boot phase I wondered if there was a different way to change the boot menu to avoid the key spamming. That’s what brought my attention to the bcdedit command and I decided it would be useful to write a post on this as I haven’t ever used it before. The server was in a state where the desktop would not load, nor anything but task manager and a command prompt. Attempting to open other tools resulted in ‘problems’. As I only had a command line to work with I figured why not find out a new way to set entering safe mode.

 

What is bcdedit?

Let’s start off with the text from Microsoft describing bcdedit –

The Bcdedit.exe command-line tool modifies the boot configuration data store.
The boot configuration data store contains boot configuration parameters and controls how the operating system is booted. These parameters were previously in the Boot.ini file (in BIOS-based operating systems) or in the nonvolatile RAM entries (in Extensible Firmware Interface-based operating systems). You can use Bcdedit.exe to add, delete, edit, and append entries in the boot configuration data store.

Basically we can edit the boot options to, for example, set the system to boot into safe mode without having to hammer the F8 key and select it. This can be rather handy, especially with physical servers that take a long time to boot and leave you sat on an IMPI console waiting for just the right moment to spam the key. In older versions of Windows (prior to Vista) we would modify the boot.ini file as indicated above. This command line tool was exactly what I needed to modify the boot order to save me having to pres F8 repeatedly during the boot phase.

bcdedit Command Line Options

Next we can take a look at the available command options –

We can reference an MSDN article to see how the boot.ini options map to BCDEdit options –

Boot.iniBCDEdit optionBCD element type

/3GB

increaseuserva

BcdOSLoaderInteger_IncreaseUserVa

/BASEVIDEO

vga

BcdOSLoaderBoolean_UseVgaDriver

/BOOTLOG

bootlog

BcdOSLoaderBoolean_BootLogInitialization

/BREAK

halbreakpoint

BcdOSLoaderBoolean_DebuggerHalBreakpoint

/CRASHDEBUG

/dbgsettings /start

/DEBUG, BOOTDEBUG

/debug

/bootdebug

BcdLibraryBoolean_DebuggerEnabled

/DEBUG

/debug

BcdOSLoaderBoolean_KernelDebuggerEnabled

/DEBUG, /DEBUGPORT=

/dbgsettings

BcdLibraryInteger_DebuggerType

/DEBUGPORT=

/dbgsettings

BcdLibraryInteger_SerialDebuggerPort

BcdLibraryInteger_SerialDebuggerBaudRate

BcdLibraryInteger_1394DebuggerChannel

BcdLibraryString_UsbDebuggerTargetName

BcdLibraryInteger_DebuggerNetHostIP

BcdLibraryInteger_DebuggerNetPort

BcdLibraryBoolean_DebuggerNetDhcp

BcdLibraryString_DebuggerNetKey

/EXECUTE

nx

BcdOSLoaderInteger_NxPolicy

/FASTDETECT

/HAL=

hal

BcdOSLoaderString_HalPath

/KERNEL=

kernel

BcdOSLoaderString_KernelPath

/MAXMEM=

truncatememory

BcdLibraryInteger_TruncatePhysicalMemory

/NODEBUG

/debug

/NOEXECUTE

nx {

BcdOSLoaderInteger_NxPolicy

/NOGUIBOOT

quietboot

BcdOSLoaderBoolean_DisableBootDisplay

/NOLOWMEM

nolowmem

BcdOSLoaderBoolean_NoLowMemory

/NOPAE

pae

BcdOSLoaderInteger_PAEPolicy

/ONECPU

onecpu

BcdOSLoaderBoolean_UseBootProcessorOnly

/PAE

pae

BcdOSLoaderInteger_PAEPolicy

/PCILOCK

usefirmwarepcisettings

BcdOSLoaderInteger_UseFirmwarePciSettings

/REDIRECT

/ems

/emssettings [ BIOS ] |

EMSPORT:{port} | [EMSBAUDRATE:{baudrate}] ]

BcdOSLoaderBoolean_EmsEnabled

/SOS

sos

What other tool might I use?

The msconfig tool in Windows is another way to make changes to these settings –

System Configuration GeneralSystem Configuration Boot

Leave a Reply