April 07, 2009

Booting Up with Bcdedit

Modify your OSs' boot options
RSS
Subscribe to Windows IT Pro | See More Utilities Articles Here | Reprints | Or get the Monthly Online Pass—only $5.95 a month!

In "Bcdedit Basics" (InstantDoc ID 101168), I introduced you to Bcdedit, a tool in Windows Vista and later that lets you modify the way your system boots. (The tool's name refers to Microsoft's replacement of the boot.ini text file with a binary data file called BCD.) In that article, you learned how to store information in the BCD about how to boot more than one OS, but even if you have only one OS on a computer, you'll still find Bcdedit useful: It also lets you modify what Microsoft calls OS entry options (or what I refer to as boot options).

Boot.ini used to let you boot pre-Vista systems under some non-standard set of parameters. For example, Windows NT has always offered the /vga boot option, which—if placed in a system's boot.ini file—instructs the OS to boot using not a hardware-specific display driver but rather the generic SVGA driver. (The ability to choose an OS entry is useful if you realize too late that you've installed a defective or mismatched video driver.)

Bcdedit's OS entry options work similarly. You can control how your system boots with the Bcdedit /set command, as follows:

bcdedit /set <OS entry> <boot option> <boot option value>


That looks ugly, so how about a concrete example? The following Bcdedit /set command would instruct Bcdedit that your copy of Vista should always use the generic SVGA driver rather than a board-specific driver:

bcdedit /set {9c219fb1-bb55-11dd-97ac-804080387aa6} vga yes


As you can see, I first identified the OS entry to add. Recall from last month that Bcdedit identifies different OS options not with user-defined words or phrases but with ugly GUIDs randomly generated by the OS. (You can see the GUIDs associated with each OS entry by using the Bcdedit /v command.) Remember, these GUIDs are random numbers; don't just type in the GUID I've entered above, as it's almost certainly not the correct GUID for your system.

After the OS entry GUID, I've entered a pair of values: the name of a parameter that controls how the system boots, followed by the value of that parameter; vga=yes would be a clearer way to type it, but that's not how Microsoft designed Bcdedit's syntax.

Now, in the real world, you probably wouldn't want your system to always use the SVGA driver. So how might you make use of that Bcdedit command? How about using the Bcdedit /copy command to copy the OS entry that you normally use to boot your system to a second entry called something like Vista Safer Mode? It's not Safe Mode, per se, but it's the same basic idea, and you can define exactly what Vista Safer Mode means. Then, once you've created the new Vista Safer Mode OS entry, you can use its GUID to construct the Bcdedit /set command that adds vga=yes to that OS entry. Now, just type bcdedit to see your OS entries. You'll see one that looks something like Figure 1.

Once you see that output, it's easy to see that OS entries already have a number of boot options, such as device and osdevice (which help tell the OS option what drive to boot from and where to find the Windows loader), and description.

But what if you decide that you want to remove the vga boot option? Of course, you could just change its value from yes to no, but not every boot option offers that sort of flexibility. In that case, use the Bcdedit /deletevalue command:

bcdedit <OS entry> <boot option name>


To remove the vga=yes option altogether, you'd type

bcdedit /deletevalue {9c219fb1-bb55-11dd-97ac-804080387aa6} vga


Now that you've seen one boot option (e.g., vga), the logical next question is, "What other options can I use?" There are quite a few, and we'll examine those next month.

End of Article



Windows IT Pro Community
Blogs





Top Viewed ArticlesView all articles
WinInfo Short Takes: Week of November 23, 2009

An often irreverent look at some of the week's other news, including some post-PDC some soul searching, a Google Chrome OS announcement and a Microsoft response, Windows 7 off to a supposedly strong start, the Jonas Brothers and Xbox 360, and so much more ...

Command Prompt Tricks

One reader shares his tip for setting up the command prompt to reflect a remote path. ...

2009 Windows IT Pro Editors' Best and Community Choice Awards

Picking a favorite product from an impressive crowd of competitive offerings is never an easy task, and such was the case with our Editors' Best and Community Choice awards this year. ...


Related Events Deep Dive into Windows Server 2008 R2 presented by John Savill

Configuration Manager SP1 and R2 Overview

Check out our list of Free Email Newsletters!

Windows OSs eBooks Understanding and Leveraging Code Signing Technologies

A Guide to Windows Certification and Public Keys

SQL Server Administration for Oracle DBAs

Related Windows OSs Resources Introducing Left-Brain.com, the online IT bookstore
Looking for books, CDs, toolkits, eBooks? Prime your mind at Left-Brain.com

Discover Windows IT Pro eLearning Series!
Clear & detailed technical information and helpful how-to's, all in our trademark no-nonsense format


SQL Server Magazine Office & SharePoint Pro DevProConnections asp.netPRO ITTV
IT Library Technology Resource Directory Connected Home Windows SuperSite
 
 Windows IT Pro is a Division of Penton Media Inc.
 © 2009 Penton Media, Inc.     Terms of Use | Privacy Statement | Reprints and Licensing