Logo
Windows XP
Windows Vista
Windows 7
Windows Azure
Windows Server
Windows Phone
EPL Standings
 
 
Windows Vista

Configuring Startup and Troubleshooting Startup Issues : How to Configure Startup Settings (part 2) - How to Use BCDEdit

9/9/2013 4:07:48 AM

3. How to Use BCDEdit

The BCDEdit command-line tool provides you almost unlimited control over the BCD registry file and configuration settings.

Note

If you have a computer with both Windows XP and Windows Vista installed and you want to modify the BCD registry file from Windows XP, you can run BCDEdit from Windows XP by launching it directly from the Windows Vista Windows\System32 folder. While this might be useful in some multi-boot configurations, typically, you should run BCDEdit from the System Recovery command prompt if you cannot load Windows Vista.


You must use administrative credentials to run BCDEdit from within Windows Vista. To do this, follow these steps:

1.
Click Start, click All Programs, and then click Accessories.

2.
Right-click Command Prompt and then click Run As Administrator.

3.
Click Continue when prompted by User Account Control.

To view detailed information about using BCDEdit, run BCDEdit /? from a command prompt. The following sections describe how to perform specific tasks with BCDEdit.

How to Interpret BCDEdit Output

You can view settings currently defined in your BCD registry file by using the bcdedit /enum command. Optionally, you can follow the command with one of the following parameters to change which entries are displayed:

  • Active The default setting that is displayed if you run bcdedit /enum without any additional parameters. Displays all entries in the boot manager display order.

  • Firmware Displays all firmware applications.

  • Bootapp Displays all boot environment applications.

  • Osloader Displays all operating system entries.

  • Resume Displays all resume from hibernation entries.

  • Inherit Displays all inherit entries.

  • All Displays all entries.

For example, to view the startup entry used to resume from hibernation, run the following command at an administrative command prompt:

bcdedit /enum resume

Similarly, to view all startup entries, use the following command:

bcdedit /enum all

How to Back Up and Restore Settings

Making changes to your BCD registry file can render your computer unbootable. Therefore, before making changes to your BCD registry file, you should make a backup copy, have a bootable Windows Vista DVD available, and be prepared to restore the original BCD registry file.

To make a backup of your current BCD registry, call the BCDEdit /export command, as shown here:

bcdedit /export backupbcd.bcd

Later, you can restore your original BCD registry file by calling the BCDEdit /import command, as shown here:

bcdedit /import backupbcd.bcd

Note

The filename and extension you use are not significant.


How to Change the Default Operating System Entry

To view the current default operating system entry, run the following command and look for the default line:

bcdedit /enum {bootmgr}


Windows Boot Manager
---------------------
identifier {bootmgr}
device partition=D:
description Windows Boot Manager
locale en-US
inherit {globalsettings} default
{current}
resumeobject {24a500f3-12ea-11db-a536-b7db70c06ac2}
displayorder {ntldr}
{current}
{dff40777-015d-11db-865c-d47e9be63989}
toolsdisplayorder {memdiag}
timeout 30
							

To change the default operating system entry, first run the following command to view the existing entries, and make note of the identifier for the entry that you want to be the default:
bcdedit /enum

Then run the following command to set a new default (where <id> is the identifier for the new entry:

bcdedit /default <id>

For example, to configure the Windows Boot Manager to start the previous version of Windows by default (which is identified as {ntldr}), run the following command:

bcdedit /default {ntldr}

To configure the currently running instance of Windows Vista as the default, run the following command:

bcdedit /default {current}

How to Change the Default Boot Entry

The boot menu, by default, is displayed for 30 seconds if you have more than one boot menu entry. If you have only one boot menu entry, the menu is not displayed at all (though the boot manager does wait several seconds so that you can press a key to view the menu).

To change the time-out for the boot menu, use the bcdedit /timeout seconds command, as shown here:

bcdedit /timeout 15

How to Change the Order of Boot Manager Menu Items

To change the order of boot manager menu items, use the bcdedit /display command, and then list the menu item identifiers in the desired sequence, as shown in the following example:

bcdedit /display {current} {ntldr} {cbd971bf-b7b8-4885-951a-fa0344f5d71}

How to Create an Entry for Another Operating System

You can use BCDEdit to create an entry for an operating system other than Windows Vista. You may need to add boot entries to the BCD registry file if you want to be able to load different operating systems on a single computer. While Windows Vista automatically creates boot entries for existing operating systems when installed, you might need to manually add a boot entry if you install another operating system after Windows Vista, or if you want to load an operating system from a newly attached hard disk.

By default, the BCD registry file contains an entry called {ntldr} that is configured to start an older version of Windows from your C:\ partition. If you only have one older operating system and Earlier Version Of Windows does not currently appear on the computer’s boot menu, you can use this existing entry to start the older operating system. To do this, call BCDEdit /set to configure the boot volume. Then add the entry to the Windows Boot Manager operating system menu by calling the BCDEdit /displayorder command. The following code demonstrates how to do this:

REM Modify the following line to identify the other OS' partition
REM The following line could also be, "bcdedit /set {ntldr} device boot"
bcdedit /set {ntldr} device partition=C:

REM The following line makes the entry bootable by adding it to the menu
bcdedit /displayorder {ntldr} /addlast

You can verify that the new entry will appear on the boot menu by running the command bcdedit /enum ACTIVE and looking for the Windows Legacy OS Loader entry.

If you need to be able to choose from multiple legacy Windows operating systems, you should choose the {ntldr} entry from the boot menu. The Windows Boot Manager will then pass control to NLTDR, which will display a menu based on the Boot.ini file that you can use to choose from all Windows operating systems.

If you want to create an entry for a non-Microsoft operating system, you can either create an entry using the bcdedit /create command, or you can copy the existing {ntldr} entry and update it for the operating system. To base a new entry on {ntldr}, copy the entry, update the boot loader path, and then add it to the boot menu by following these commands:

bcdedit /copy {ntldr} /d "Other operating system (or other description)"

REM The previous command will display a new GUID that identifies the copy.
REM Use the GUID in the following command, and modify the partition identifier as needed.
bcdedit /set {NEW-GUID} device partition=C:



Note

Don’t retype the GUID by hand—you’re likely to make a mistake. Instead, copy it to the clipboard. Click the command menu in the upper-left corner of the command prompt window, click Edit, and then click Mark. Select the GUID text (including the brackets) and then press Enter on your keyboard. To paste the GUID to the command prompt, click the command menu, click Edit, and then click Paste.


Now run the following command to identify the operating system’s boot loader:

REM Replace the last parameter with the boot loader filename
bcdedit /set {NEW-GUID} path \boot-loader

If {ntldr} was not part of the boot menu when you copied it, you also need to run the following command to add the copied entry to the boot menu:

bcdedit /displayorder {NEW-GUID} /addlast

Additionally, you might need to configure the operating system’s own boot loader.

How to Remove a Boot Entry

Typically, you do not need to remove entries from the BCD registry file. Instead, you should simply remove entries from the Windows Boot Manager menu. To remove an entry from the menu, first run bcdedit /enum and note the boot entry’s identifier. Then run the following command, substituting the identifier:

bcdedit /displayorder {GUID} /remove

For example, to remove the entry to load the previous version of Windows from the boot menu, you would run:

bcdedit /displayorder {ntldr} /remove

You can later re-add the entry to the boot menu by calling the following command:

bcdedit /displayorder {GUID} /addlast

To permanently remove an entry from the BCD registry, run the following command:

bcdedit /delete {GUID} /remove

You should only permanently remove an entry if you have removed the operating system files from the computer.

How to View and Update Global Debugger Settings

To view debugger settings for startup entries, run the following command:

bcdedit /enum

bcdedit /
dbgsettings DebugType [debugport:Port] [baudrate:Baud] [channel:Channel] [targetname:TargetName]



Replace the parameters with your custom settings, as described in the following list:

  • DebugType Specifies the type of debugger. DebugType can be one of SERIAL, 1394, or USB. The remaining options depend on the debugger type selected.

  • Port For SERIAL debugging, specifies the serial port to use as the debugging port.

  • Baud For SERIAL debugging, specifies the baud rate to be used for debugging.

  • Channel For 1394 debugging, specifies the 1394 channel to be used for debugging.

  • TargetName For Universal Serial Bus (USB) debugging, specifies the USB target name to be used for debugging.

For example, the following command sets the global debugger settings to serial debugging over com1 at 115,200 baud:

bcdedit /dbgsettings serial debugport:1 baudrate:115200

The following command sets the global debugger settings to 1394 debugging using channel 23:

bcdedit /dbgsettings 1394 CHANNEL:32

The following command sets the global debugger settings to USB debugging using target name debugging:

bcdedit /dbgsettings USB targetname:debugging

4. How to Remove the Windows Vista Boot Loader

If you want to remove Windows Vista from a dual-boot environment that includes an earlier version of Windows, follow these steps:

Note

You can follow these steps in the earlier version of Windows or in Windows Vista. If you follow these steps in Windows Vista, run the commands from a command prompt that has elevated user rights. To do this, click Start, click Accessories, right-click the command-prompt shortcut, and then click Run As Administrator.


1.
Use Bootsect.exe to restore the Ntldr.exe program. To do this, type the following command, where C:\ is the drive containing the Windows Vista system files:

C:\Boot\Bootsect.exe –NT52 All

After the computer restarts, it does not load the Windows Boot Manager program. Instead, Ntldr.exe loads and processes the Boot.ini to start an earlier version of Windows.

2.
If Windows Vista is not installed on the active partition, you can now delete or remove the partition where Windows Vista is installed.
Other -----------------
- Configuring Startup and Troubleshooting Startup Issues : Important Startup Files
- Accessing and Using Your Network : Collaborating with Windows Meeting Space (part 2)
- Accessing and Using Your Network : Collaborating with Windows Meeting Space (part 1)
- Accessing and Using Your Network : Working with Offline Files and the Sync Center (part 2) - Synchronizing Offline Files, Handling Synchronization Conflicts
- Accessing and Using Your Network : Working with Offline Files and the Sync Center (part 1) - Working with Network Files Offline
- Accessing and Using Your Network : Sharing Resources with the Network (part 3) - Hiding Shared Resources
- Accessing and Using Your Network : Sharing Resources with the Network (part 2) - Sharing a Resource
- Accessing and Using Your Network : Sharing Resources with the Network (part 1) - Setting Up File and Printer Sharing, Deactivating the Sharing Wizard
- Accessing and Using Your Network : Accessing Network Resources
- Accessing and Using Your Network : Learning Some Common Network Tasks
- Collecting Vista Events
- Automating Vista Events
- Exploring the Vista Task Scheduler
- Tracking Change in Vista : Turning on the audit policy, Exploring the Vista Event Log
- Managing Change through Group Policy (part 4) - Assigning PC-Related GPOs, Troubleshooting and monitoring Group Policy
- Managing Change through Group Policy (part 3) - Working with GPO tools
- Managing Change through Group Policy (part 2) - Working with central policies
- Managing Change through Group Policy (part 1) - Working with Local Policies
- Securing the Workstation : Applying the Castle Defense System (part 7) - Working with external access - Working with Public Key Infrastructures, Working with Virtual Private Network connections
- Securing the Workstation : Applying the Castle Defense System (part 6) - Working with external access - Working with the Windows Firewall with Advanced Security
 
 
Most view of day
- Workflow in Dynamics AX 2009 : Workflow Life Cycle (part 1) - State Model
- Windows Phone 7 : The Silverlight Controls (part 6) - Interactive Controls - ApplicationBar Controls
- Configuring Startup and Troubleshooting Startup Issues : Important Startup Files
- System Center Configuration Manager 2007 : Operating System Deployment - Boot Images
- Windows Server 2003 on HP ProLiant Servers : The Physical Design and Developing the Pilot - Network Services
- Microsoft Word 2010 : Working with Outlines - Creating a Multilevel List
- CorelDRAW X5 : Finding and Saving Important Characters
- Microsoft PowerPoint 2010 : Inserting Content from External Sources - Inserting New Slides from an Outline
- Advanced Windows 7 Programming : Working in the Background - DEVELOPING TRIGGER-START SERVICES (part 7)
- Windows Phone 7 : 3D Game Development (part 3) - The Game Class
Top 10
- Windows Server 2012 : DHCP,IPv6 and IPAM - Exploring DHCP (part 3) - Creating IPv4 DHCP Scopes
- Windows Server 2012 : DHCP,IPv6 and IPAM - Exploring DHCP (part 2) - Installing DHCP Server and Server Tools
- Windows Server 2012 : DHCP,IPv6 and IPAM - Exploring DHCP (part 1)
- Windows Server 2012 : DHCP,IPv6 and IPAM - Understanding the Components of an Enterprise Network
- Microsoft OneNote 2010 : Using the Research and Translate Tools (part 3) - Translating Text with the Mini Translator
- Microsoft OneNote 2010 : Using the Research and Translate Tools (part 2) - Translating a Word or Phrase with the Research Pane
- Microsoft OneNote 2010 : Using the Research and Translate Tools (part 1) - Setting Options for the Research Task Pane, Searching with the Research Task Pane
- Microsoft OneNote 2010 : Doing Research with Linked Notes (part 2) - Ending a Linked Notes Session, Viewing Linked Notes
- Microsoft OneNote 2010 : Doing Research with Linked Notes (part 1) - Beginning a Linked Notes Session
- Microsoft OneNote 2010 : Doing Research with Side Notes (part 3) - Moving Side Notes to Your Existing Notes
 
 
Windows XP
Windows Vista
Windows 7
Windows Azure
Windows Server
Windows Phone
2015 Camaro