Windows Server 2008 – BCD and BCDEdit

Windows Server 2008 – BCD and BCDEdit

Boot.ini really was the last of Microsoft’s .ini files.  In Windows Server 2008, Boot.ini is superseded by BCD (Boot configuration data).  Boot Configuration Data is a wonderfully descriptive expression, more importantly, it gives you control of what should happen when a Windows Server 2008 computer starts.  The BCD editor is not notepad, but a command-line program called BCDEDIT.

Topics for Windows Server 2008 – BCD and BCDEdit

 ♦

Difficulty Getting Started with BCDEdit

At the beginning I found it frustrating when I tried to set, or even change boot settings with BCDEdit.  My aim on this page is to provide you with strategies and detailed examples, as a result, you will soon learn how to editor the menu which appears when Windows Server 2008 boots.  Incidentally, the same techniques work with Vista.

Scenario:  We want to inspect, and then change the Windows Server 2008’s boot options.  For example, reduce the timeout, or display an option to boot into a second operating system on a dual-boot machine.

Example 1 – Plain bcdedit

Trap: Before launching the command prompt, right-click CMD and select, RunAs, administrator. 

Let us get started with plain:
bcdedit

Here is the BCD code

 

Windows Boot Manager
——————–

identifier {bootmgr}
device partition=C:
description Windows Boot Manager
locale en-US
inherit {globalsettings}
default {default}
displayorder {current}
{3b1cb4c9-5398-11dd-88aa-a0b620d5ce11}
toolsdisplayorder {memdiag}
timeout 7

Windows Boot Loader
——————-
identifier {current}
device partition=C:
path \Windows\system32\winload.exe
description Microsoft Windows Server 2008
locale en-US
inherit {bootloadersettings}
osdevice partition=C:
systemroot \Windows
resumeobject {default}
nx OptOut

Windows Boot Loader
——————-
identifier {3b1cb4c9-5398-11dd-88aa-a0b620d5ce11}
device partition=D:
path \Windows\system32\winload.exe
description Microsoft Windows Vista
locale en-US
inherit {bootloadersettings}
osdevice partition=D:
systemroot \Windows
resumeobject {3b1cb4ca-5398-11dd-88aa-a0b620d5ce11}
nx OptIn

Note 1:  Observe three sections of BCD code, one for the boot manager itself, followed by sections for the operating systems, in this instance Windows Server 2008 and Vista.

Note 2:  You could also append the verbose switch /v.  The advantage is that you can now see the GUID of the default identifier.

See more on Windows 8 boot loader.

Guy Recommends:  A Free Trial of the Network Performance Monitor (NPM)Review of Orion NPM v12 v12

SolarWinds’ Network Performance Monitor will help you discover what’s happening on your network.  This utility will also guide you through troubleshooting; the dashboard will indicate whether the root cause is a broken link, faulty equipment or resource overload.

Perhaps the NPM’s best feature is the way it suggests solutions to network problems.  Its second best feature is the ability to monitor the health of individual VMware virtual machines.  If you are interested in troubleshooting, and creating network maps, then I recommend that you give this Network Performance Monitor a try.

Download your free trial of SolarWinds Network Performance Monitor.

Example 2 – Collect information about the switches

Making changes to BCD code is possible, but beware, your mind has to adjust to its logic and moreover, the syntax is tricky particularly with the hex code.  The biggest problem at the outset is to sift the important commands from a long list.

Let us ask for help identifying bcdedit’s switches, we can try the famous switch /?
bcdedit /?

Here is an excerpt:

BCDEDIT – Boot Configuration Data Store Editor

Commands that control the boot manager
===================================
/bootsequence   Sets the one-time boot sequence
/default   Sets the default entry to boot.
/displayorder   Sets the order in the multiboot menu.
/timeout   Sets the boot manager time-out value.

Note 1: Try bcdedit /? TOPICS 

Example 3 – How to Edit BCD Settings

bcdedit /timeout

I would like to start with /timeout, because it’s the easiest change to understand and to monitor.

Here is an easy change:
bcdedit /timeout 7

To see the effect, re-run this plain command: bcdedit

bcdedit /default

Here is the classic switch to control what happens after the timeout expires.

bcdedit /default {GUID}

bcdedit /default {3b1cb4c9-5398-11dd-88aa-a0b620d5ce11}

Note 1: In the above example setting the /default in this way changes the bcd code, as a result my computer now boots into Vista.  Just to remind you that tweaking the default GUID only makes sense if you have a multi-boot machine.

bcdedit /displayorder

The key point with /displayorder is that you can only use particular GUIDs, furthermore, they must be encased in curly brackets.  The knack is to research for GUIDs in sections starting with:

Windows Boot Loader
——————-
identifier {3b1cb4c9-5398-11dd-88aa-a0b620d5ce11}

Tip: To save typos you can ‘Mark’, ‘Copy’ and ‘Paste’ these hex blocks at the command-line.  Click on the tiny icon at the top left of your cmd box, then select ‘Edit ->’

Trap: The GUIDs must exist, you cannot just make them up.  Moreover they must correspond to real settings as indicated under ‘identifier’.

Example 1:
bcdedit /displayorder generic syntax {GUID-os1} {GUID-os2}
bcdedit /displayorder {current} {3b1cb4c9-5398-11dd-88aa-a0b620d5ce11}

Example 2:
bcdedit /displayorder {3b1cb4c9-5398-11dd-88aa-a0b620d5ce11} {9f25ee7a-e7b7-11db-94b5-f7e662935912}

I say again, you must use your GUIDs, and not mine; test by re-running the command: bcdedit.  The key point is to synchronize with the rhythm of the syntax,
/displayorder space curly bracket os1 curly bracket space curly bracket os2 curly bracket.

bcdedit /set

It is possible to make cosmetic changes to the descriptions that appear alongside the operating systems on the boot menu.

Example 1
bcdedit /set {50487680-538e-11dd-9786-b25b83bcddca} description "Longhorn"

bcdedit /bootsequence

At present I have no use for this bootsequence switch, however, I did once see its effect when bootmgr asked me if I wished to roll-back an update I was about to make. 

Guy Recommends: SolarWinds Network Topology Mapper (NTM)SolarWinds Network Topology Mapper

NTM will produce a neat diagram of your network topology.  But that’s just the start;Network Topology Mapper can create an inventory of the hardware and software of your machines and network devices.  Other neat features include dynamic update for when you add new devices to your network.  I also love the ability to export the diagrams to Microsoft Visio.

Finally, Guy bets that if you test drive the Network Topology Mapper then you will find a device on your network that you had forgotten about, or someone else installed without you realizing!

Download your 14 day free trial ofSolarWinds Network Topology Mapper

well-known GUIDs for BCDEdit

Apparently, these GUIDs are well-known to the bootmgr, although this bcd code is not well-known by me!

{5048767f-538e-11dd-9786-b25b83bcddca}  (Meaning Windows Server 2008)

{3b1cb4c9-5398-11dd-88aa-a0b620d5ce11}  (Meaning BCD for Vista)

{cbd971bf-b7b8-4885-951a-fa03044f5d71}   (Another Vista GUID)

{466f5a88-0af2-4f76-9038-095b170dc21c}  (Meaning BCD XP)

Further Information

On this page I have concentrated on amending the Windows Server 2008 boot menu on a dual boot machine.  BCDEdit has more wide ranging capabilities, in particular ‘/copy’ for creating more Windows Boot Loader sections.  While that may be useful for preparing imaging software, there is no point in complicating matters on a regular server by creating references to non-existent operating systems. 

My scenario deals with cases where you have installed two or more operating systems on the same computer and now you need to control or troubleshoot what happens when the machine boots.  Such control was formerly the province of boot.ini.

See more about dual booting with Windows 8 »

Summary of BCDEdit

If you are wondering how to control the boot menu that you see in Windows Server 2008 or Vista, then investigate the command-line bcdedit.  There are switches to control the timeout and the display order for multi-boot machines.

If you like this page then please share it with your friends

 


Microsoft Windows Server 2008 Topics:

Server 2008 Home   • Overview   • What’s New?   • Migration Advice   • Install   • SP1 Review

AD DC   • Roles   • Features   • Editions   • Hyper-V   • UAC   • IPv6   • Group Policy   • Free NPM Trial