BoYans.net

Visual BCD Editor - Document

 

 

Visual BCD Editor uses the WMI BCD Provider interface for BCD access.

It must be noted that other known BCD GUI tools implement BCD access by scripting 'bcdedit.exe' utility.

A drawback using WMI BCD Provider is that it is available only in Vista, Window 7 and Windows 8.

To bring up/repair a non booting Windows 8/7/Vista in the scenario of dual-boot with Windows XP Visual BCD Editor comes with "Dual-boot Repair" utility which runs on Windows XP and later and repairs dual boot automatically on click.

 

To continue a little bit on dual booting - Windows 8/7/Vista BCD can have a loader entry for Windows XP but it is still 'ntldr' at the end which loads Windows XP and XP boot parameters are stored in 'boot.ini'. So we see that boot parameters for Windows XP (in a dual-boot scenario with Windows 7/8) are partly in BCD and another part in boot.ini and two boot managers/loaders are involved in booting XP - 'bootmgr' and 'ntldr' . So every operating system has its own boot manager/loader and its own boot configuration !

In a dual boot scenario Windows 7 + Windows 8 we have one common boot manager(that of Windows 8), one common BCD and two different loaders - 'winload.exe' (or winload.efi), one for every OS.

To sum up so far - BCD is used by Windows boot manager and specifies OS (also recovery and resume from hibernation) loaders.

 

The WMI BCD Provider interface gives a programmatic view of BCD store as follows.

The BCD Store is a collection of objects.

Objects are divided in three groups depending on their type:

Some objects have special reserved names and roles like:

{bootmgr} - Windows boot manager,

{ntldr} - Windows NT legacy loader,

{memdiag} - Windows memory diagnostic,

{globalsettings} - common settings for different objects.

 

Every object has elements.

The elements can be considered as the 'properties' of an object.

Some objects (like OS loaders) have a 'Description' element which is used to present the object to the user with a human readable name.

 

As an example let us consider 'Windows boot manager' object. (*see note)

Some of its elements are: 'Application Device', 'Application Path', 'Timeout', 'Display Order', 'Default Object'.

Element 'Application Device' describes the physical device were the application resides. For example the value of this element could be “\Device\HarddiskVolume1” which could map to logical drive “C:” or “D:” or any other logical drive depending on operating system mappings.

Element 'Application Path' describes the path to the application. The value of this element is usually “\bootmgr” (for Windows boot manager object).

The combination 'Application Device' + 'Application Path' gives the exact location of the application/loader on disk/media (example - “C:\bootmgr”).

Element 'Display Order' describes what is presented as boot menu.

The value of this element could be "{GUID1} {GUID2} {GUID3}" which would be displayed as following boot menu for example:

"Windows 7 Home Edition"

"Windows XP Professional"

"Linux BSD"

One of the elements above is selected as default at boot time. This choice is defined by the value of element 'Default Object'.

So the value of element 'Default Object' could be "{GUID2}" and then "Windows XP Professional" is selected by default.

 

Every object in the BCD store has a unique GUID.

The {bootmgr} object has always GUID={9DEA862C-5CDD-4E70-ACC1-F32B344D4795}.

There are other objects that have a fixed symbolic name and fixed GUID:

{466F5A88-0AF2-4F76-9038-095B170DC21C} = {ntldr},

{7EA2E1AC-2E61-4728-AAA3-896D9D0A9F0E} = {globalsettings},

{AE5534E0-A924-466C-B836-758539A3EE3A} = {ramdiskoptions},

{B2721D73-1DB4-4C62-BF78-C548A880142D} = {memdiag}

to name some of them.

 

A novice user is interested mainly in the value of three elements of {bootmgr}object:

'Display order',

'Default object' and

'Timeout'.

Setting the value of these elements describes the boot menu, the default boot choice and how long the boot menu is displayed before the booting continues.

There is also the 'Description' element of application objects which presents a readable name of the object to the user - in the example of the boot menu we have three loader objects with their readable names.

Advanced users would be interested in creating new loader objects and setting their elements.

 

It must be mentioned that Microsoft has not documented very well the BCD and some experimentation has to be done to reveal the functionality and meaning of some elements (Windows 7 has about 140 different elements, Windows 8 about 200!).

There are descriptions of the BCD available over the internet and the interested user could find more information there.

Special thanks to Geoff Chappell for his detailed documentation on BCD !

Microsoft:

http://msdn.microsoft.com/en-us/library/bb986746(v=VS.85).aspx

http://www.microsoft.com/whdc/system/platform/firmware/bcd.mspx

Geoff Chappell:

http://www.geoffchappell.com/viewer.htm?doc=notes/windows/boot/bcd/index.htm

 

*Note:

'Application device' and 'Application path' cannot have a role on initial BCD load (for defining location of boot manager) as BCD is loaded by boot manager. First loaded BCD is always either on active partition on first MBR disk (BIOS booting) or on EFI System partition(ESP) on first GPT disk (UEFI booting). For exact location of BCD on MBR or GPT disks see Repair Windows BCD. It is possible to load a second BCD by selecting advanced options of a loader and escaping (return to boot menu) after that if a location is specified for BCD it is used for loading that BCD (location can be specified with elements 'BCDDevice' and 'BCDFilePath').

 

 

Copyright © 2012-2014 Bo Yans