Subscribe to Windows IT Pro

 

Get Newsletters

  • Get the Latest News
  • Product Updates
  • Helpful Tricks
  • Productivity Tips

Subscribe Now!

February 20, 2009 12:00 AM

Bcdedit Basics

Control your Windows Server 2008 and Windows Vista boot options
Windows IT Pro
InstantDoc ID #101168
Rating: (15)

Executive Summary:

Windows Server 2008 and Windows Vista have changed the way you control Windows' boot loader. With this change comes a new tool—Bcdedit—that every systems administrator must master.
Anyone who uses Windows Server 2008 or Windows Vista knows that these latest Windows versions have brought some significant changes to Microsoft's OSs. One of these changes is the way you control Windows' boot loader, the software that supports storing more than one OS on a drive and that lets you configure the way Windows boots. With this change comes a new tool—Bcdedit—that anyone who administers Server 2008 or Vista systems must master.

Prior to Vista, we controlled boot order and boot options by modifying the boot.ini text file at the root of the C drive. To change the boot-loader behavior of pre-Vista systems, we needed nothing more complex than Notepad and the knowledge of how to un-set boot.ini's "read only" component. Now, Microsoft has replaced boot.ini with a binary file called BCD, which resides in a hidden/system folder called \boot on whatever drive you boot your system from. Bcdedit is the tool you'll use to control BCD.

Boot Alterations
The BCD boot-loader structure introduces some new terminology. Whereas a boot.ini file might have several sections that let you boot a particular OS with specific options, Bcdedit has boot entries. A new Server 2008 or Vista installation has just one boot entry, but if you add an OS—for example, if you install both Server 2008 and Vista on the same system, or if you have only one OS on your system but want the option to boot that OS with different startup or debugging settings—you'd have more than one boot entry. You can see your boot entries by opening an elevated command prompt and typing

bcdedit /v

The top section of the output that Figure 1 shows—labeled Windows Boot Manager—contains global information: which boot entry boots by default, how long users have to choose a non-default boot entry, and so on.

Below that, Bcdedit displays two boot entries labeled Windows Boot Loader. The first boots a copy of Server 2008 (as you can see in the description line), and the second boots Vista.

Notice that Bcdedit /v shows a lot of long hexadecimal strings enclosed in brackets—items that you probably recognize as globally unique identifiers (GUIDs). You can safely ignore most of these GUIDs, but pay special attention to the first one in each boot entry, labeled identifier. You need these GUIDs when you inform Bcdedit which boot entry to make the default, what order to display the boot entries, which boot entries to copy, and so on. If you're like me, you'll find yourself feeling thankful that you can mark text and put it into the clipboard.

To tell BCD which boot entry to load by default, you use the Bcdedit /default command. For example, to tell my system to boot the Server 2008 boot entry, I would type

bcdedit /default {6443870f-3c0c-11dd-835a-c0389998b4ec}

If you can't imagine typing or even copying those GUIDs, you'll be glad to know that Bcdedit recognizes two well-known GUIDs: The {current} value is the boot entry that the OS is currently running, and the {default} value is whatever boot entry BCD currently knows about.

If I were to delete the \Windows folder from my Server 2008 system's E drive, I would essentially uninstall Server 2008 from my system—but BCD wouldn't know that. So, every time I booted my system, I'd see a useless option to boot Server 2008. To configure BCD to no longer show the Server 2008 option, I could use the Bcdedit /delete command:

bcdedit /delete {6443870f-3c0c-11dd-835a-c0389998b4ec}

If you're thinking about trying some of these commands, I recommend creating an extra boot entry to play with. Believe me, you don't want to accidentally delete your main OS's boot entry! To make a copy of your boot entry for test purposes, you can use the Bcdedit /copy command:

bcdedit /copy {current} /d "Test entry"

Note that I've made use of the {current} well-known GUID and added the /d option (mandatory with the /copy switch), which let me give the option a name for the new OS boot entry.

Whenever I set up a Windows NT 3.1 or later system, I find boot.ini's default 30-second wait to be excessive, unacceptably slowing down my boot times. So, I always like to modify the "timeout=30" value to 5 seconds. To do the equivalent in Bcdedit, I type

bcdedit /timeout 5

Familiarize Yourself
I miss boot.ini's simplicity, but BCD and Bcdedit are here to stay, so I recommend spending a little time getting familiar with Bcdedit. I'll cover more in-depth options next time.

Related Content:

ARTICLE TOOLS

Comments
  • Jon Worrel
    2 years ago
    Mar 12, 2010

    This article definitely saved me hours of frustration over boot options in Windows 7. I wanted to briefly thank you Mark for finding the time to educate me on the basics of Microsoft's BCDEdit tool.

    Thanks again.

  • John
    3 years ago
    Mar 04, 2009

    I never investigated this and a light just clicked over my head. I have not had a need to change anything in my Vista machine. This is good information to be aware of.

You must log on before posting a comment.

Are you a new visitor? Register Here

advertisement

advertisement

White Papers

Get your Windows 7 deployment off to the right start by implementing PC lockdown. A locked-down environment is easier and cheaper to support since users are less likely to make unnecessary changes to the core system configuration - read more here!

Essential Guides

Is your iSCSI "lossy"? The reality is that most off-the-shelf Ethernet hardware deployed for iSCSI can lose packets, resulting in slow performance or application downtime. Learn how to assess your current iSCSI infrastructure and engineer an advanced iSCSI SAN infrastructure.

Web Seminars

What's the best way to keep your network safe from malware? In this web seminar, security expert Greg Shields suggests an alternative method to the traditional blacklisting approach that is common with anti-virus and anti-malware solutions.

eLearning Series

We bring the experts direct to you to share their real-world perspective and expertise. During each event, three sessions stream in real time, so you can learn, ask questions, and get solutions.
Upcoming event: Getting the Most with Exchange 2010 with Paul Robichaux

Subscribe to Windows IT Pro!

Windows is a trademark of the Microsoft group of companies. Windows IT Pro is used by Penton Media Inc. under license from owner.