BCDEDIT - How to Use

How to Use the BCDEDIT Command Line Tool

   Information
This will show you how to use BCDEDIT in the command prompt and avoid the need of third party applications like EasyBCD.
   Note
Bcdedit is a really powerful tool that Windows Vista and Windows 7 uses to manage the boot loader entries.

BCDEDIT needs a boot manager to boot your system.



A boot manager is a file that contains necessary information that instruct the system how to boot/start an operating system.
  • Windows 7 and Vista boot manager file is \bootmgr
  • Windows XP boot manager file is \ntldr
BCDEDIT can support other boot managers too, like grub for linux. You just have to place the boot file on the root of the boot manager partition. e.g. \grldr and you have a grub boot loader enabled.

Bcdedit edits a file called bcd , which is located in Windows 7's hidden partition under \boot\bcd.
In Vista, its located under C:\boot\bcd.


   Warning
You must be logged on in an administrator account to be able to do this tutorial.





To Use bcdedit:
1. Open an elevated command prompt.

2. Type bcdedit and press enter.
NOTE: By typing just bcdedit you just list your boot entries.


A boot entry consists of 4 main elements:
1. Identifier
The identifier is how the system has named the boot entry.
2. Device
The device is the drive or virtual image that the system will use to boot the boot entry.
3. Path
The path is the location on the device where the bootloader file is found.
4. Description
The description is the friendly name we give to our boot entry, e.g. "Windows 7"
You see next to the identifiers their UUIDs in {}. The UUID is the unique codename that the system gives to each boot entry and cannot be changed.

The standard identifier UUIDs are explained below:
{bootmgr} = the boot manager
{current} = the OS you selected to boot at startup.
{default} = the default OS selected to boot the PC.
{ntldr} = Windows Legacy OS Loader (for windows xp)
there are others like {memdiag} or {ramdisk} but they can't be of much use right now.
   Warning
IMPORTANT: make a backup of your bcd file first. To do that, type:

bcdedit /export C:\SAVEDBCD

This will create a file c:\savebcd which is your boot entry backup.
If you mess up, you can always undo changes by:

bcdedit /import c:\savedbcd



Now to see how we can control the above entries, here are some examples:
bcdedit /set {current} description "My edited Windows Boot Entry"
NOTE: This changes the title of the boot menu entry "{current}".

bcdedit /set {ntldr} device partition=E:
NOTE: This tells bcd that Windows XP partition is drive E:

bcdedit /set {ntldr} path \ntldr
NOTE: This tells bcd that the ntldr file which is the winxp bootloader is on root folder "\" (of drive e: as stated above)

bcdedit /displayorder {ntldr} /addfirst
NOTE: This places Windows XP as the first OS on the menu list.

bcdedit /default {ntldr}
NOTE: This places Windows XP as the default OS to boot first with.

bcdedit /displayorder {33342343-3424-2342342342-2344} /addlast
NOTE: This tells bcd that the boot entry with UUID 3334... should be the last entry on the menu.
You can copy your existing VISTA or W7 boot entry to another identical. Then you can change settings on the new entry to experiment. You will always have the first entry available, so it's safe to play with.
bcdedit /copy {current} /d "New W7 boot entry I just copied!"
this will give you a line:
NOTE: The entry was successfully copied to {4c21825f-e04b-11dd-b760-00195b61617a}. The {4c21825f-e04b-11dd-b760-00195b61617a} is the UUID of the new entry that the system just created. Yours will be different than mine! This is its identifier and you should use this to address that entry. Example:

bcdedit /set {4c21825f-e04b-11dd-b760-00195b61617a} numpoc 2
NOTE: This adds the 2 CPU Core support during boot, like you do in msconfig.

bcdedit /deletevalue {4c21825f-e04b-11dd-b760-00195b61617a} numproc
NOTE: This deletes the numproc parameter from entry {4c21825f....}

bcdedit /delete {4c21825f-e04b-11dd-b760-00195b61617a}
NOTE: This deletes the boot entry {4c21825f....} completely. In order to delete an {ntldr} entry, you must use the /f switch to force deletion: bcdedit /delete {ntldr} /f

You can always type just bcdedit to see your current settings.

What else can I do with BCDEDIT?

You can use BCDEDIT to alter any boot parameter , like you would in msconfig, only more. BCDEDIT works from booting with installation dvd too, so it can be handy for recovery purposes.
bcdedit /timeout 5
NOTE: This sets the wait-to-select-OS menu timeout at startup to 5 seconds . You will notice that I didn't give a UUID above. If you omit the UUID, it applies automatically to the relavant UUID. So: bcdedit /timeout 5 is identical to bcdedit /set {bootmgr} timeout 5
Some more advanced examples:
bcdedit /set {current} detecthal yes
bcdedit /set {current} detecthal no
NOTE: The above commands sets the detecthal to yes or no for entry {current}
To create a new boot entry to load Windows XP from a partition on your disk:
NOTE: The example below uses F: as the Windows XP partition. Replace with your xp drive letter.
bcdedit /create {ntldr} /d "Windows XP"

bcdedit /set {ntldr} device partition=F:

bcdedit /set {ntldr} path \ntldr

bcdedit /displayorder {ntldr} /addlast
   Note
Final note: BCDEDIT works from installation boot dvd too. If you mess up with a setting and you cannot boot, just boot from DVD and enter Repair Computer, then go to command prompt and there you go. You can play again with bcdedit to restore your system back.



 
Last edited by a moderator:
Saw this in the thread first. Thanks much.

Gary
 

My Computer

Computer Manufacturer/Model Number
Dell XPS420
OS
Vista Ult 64 bit Seven Ult RTM x64
CPU
Intel Core2 Quad Q6600 2.40 gigahertz
Memory
Crucial Ballistix 4x2GB PC2 6400
Graphics Card(s)
NVIDIA GeForce 8600 GTS 256 MB
Sound Card
Creative SB X-Fi audio
Monitor(s) Displays
HP w2207 + HPvs15
Screen Resolution
1680x1050 + 1024x768
Hard Drives
2-WD5000AAKS-500 GB
WD5000AAV-500 GB external
Keyboard
Microsoft Comfort Curve
Mouse
MX Revolution
Other Info
Wacom Intuos 2 Graphics Tablet
Experience Index=5.5

My Computers

System One System Two

  • Computer type
    PC/Desktop
    OS
    7 X64
    CPU
    i5 8400
    Motherboard
    gigabyte b365m ds3h
    Memory
    2x8gb 3200mhz
    Hard Drives
    various
    PSU
    pure power 11 400w cm
    Case
    Coolermaster
    Cooling
    cryorig m9i
  • Computer type
    PC/Desktop
    OS
    7x64
    CPU
    g5400
    Motherboard
    ga b365m ds3h
    Memory
    8gb ddr4 2400
    PSU
    xfx pro 450w
Hello limneos.

Thank you very much; I haven't had time to go through the tutorial yet, but I will. I was going to suggest you do a proper tutorial as we are having many requests for this knowledge and I will be sure to point people to this tutorial first, in future.

Thanks again.












Later :) Ted
 

My Computer

Computer Manufacturer/Model Number
* BFK Customs *
OS
W 7 64-bit Ultimate
CPU
Intel Q9550 Yorkfield
Motherboard
ASUS P5Q Pro
Memory
8GB Dominator 8500C5D
Graphics Card(s)
ATI : XFX 5870
Sound Card
Realtek HD Audio 7-1
Monitor(s) Displays
1x 47" LCD HDMI & 3x 26" LCD HDMI
Screen Resolution
1920x1080P & 1920x1200
Hard Drives
1x 80GB Intel X25-M G2 SSD : 1x 500GB & 1x 640GB WD Caviar Black(s)
PSU
Corsair 620HX
Case
Cooler Master RC-690
Cooling
Tuniq Tower 120, 2x 140mm and 3x 120mm case fans
Keyboard
Microsoft 500
Mouse
Razer Diamondback 3G
Internet Speed
14 Mb/s
Other Info
1x Koutech 3Gb/s SATA HDD Hot Swap Rack
Help! Trapped in "safe" mode, just learning BCDEDIT...

Folks,

I made the mistake of selecting "safe mode" boot from my gui screen earlier this morning. I don't even know where... I was hunting for why I wasn't properly joining my work domain (1st Win7 beta in the domain!) and selected safe boot and now I can't get back to my "normal" Win7 boot.

I have tried from elevated-cmd to "bcdedit /set safe off" or some such but I haven't got the right combo yet.

Can anyone tell this BCDEDIT newby what the proper command is?

Tanks In Advance! ...Steve (waiting in safe land, want my Win7 back!)
 

My Computer

OS
XP or Win7 (preferred!)
Hi Steve,

Type msconfig in Start search box - click it when it pops up.

Click Boot tab - uncheck Safe Boot , Apply, OK. Restart

Hope it helps.
 

My Computers

System One System Two

  • Computer type
    PC/Desktop
    OS
    7 X64
    CPU
    i5 8400
    Motherboard
    gigabyte b365m ds3h
    Memory
    2x8gb 3200mhz
    Hard Drives
    various
    PSU
    pure power 11 400w cm
    Case
    Coolermaster
    Cooling
    cryorig m9i
  • Computer type
    PC/Desktop
    OS
    7x64
    CPU
    g5400
    Motherboard
    ga b365m ds3h
    Memory
    8gb ddr4 2400
    PSU
    xfx pro 450w
SIW2,

As a pun (per your pic), you "made my day"!

I'm not sure that I did exactly as you suggested but at the safe mode command line prompt I typed "msconfig" which gloriosky! brought it up and I clicked on the "boot" tab, unselected safe and debug log and then rebooted.

Voila! My Win7 GUI is making me happy again... I owe ya, big fella! Thanx...SteveB
 

My Computer

OS
XP or Win7 (preferred!)
You're welcome:D
 

My Computers

System One System Two

  • Computer type
    PC/Desktop
    OS
    7 X64
    CPU
    i5 8400
    Motherboard
    gigabyte b365m ds3h
    Memory
    2x8gb 3200mhz
    Hard Drives
    various
    PSU
    pure power 11 400w cm
    Case
    Coolermaster
    Cooling
    cryorig m9i
  • Computer type
    PC/Desktop
    OS
    7x64
    CPU
    g5400
    Motherboard
    ga b365m ds3h
    Memory
    8gb ddr4 2400
    PSU
    xfx pro 450w
If I'm reading this right to edit the Windows XP description from "Earlier Version of Windows" to say "Windows XP Home" or to what ever you want. Would be the following bcdedit /set {ntldr} description "Windows XP Home"

For bcdedit /displayorder {ntldr} /addfirst
NOTE: This places Windows XP as the first (default) OS on the menu list.

To put back Windows 7 as the (default) OS would be the following
bcdedit /displayorder {current} /addfirst

For Windows XP This is how your OS Loads

When you turn on your computer, it goes through an elaborate startup process. The process begins when your computer performs its power-on self test (POST), which is followed by the POST for each adapter card that has a BIOS, such as SCSI adapters and video cards. The system BIOS then reads the master boot record (MBR)—the first sector on the first hard disk—and transfers control to the code in the MBR, which is created by Windows XP Setup.

This is where Windows takes over the startup process. Here’s what happens next:

1. The MBR reads the boot sector—the first sector of the active partition—which contains code that starts Ntldr, the bootstrap loader for Windows XP. The initial role of Ntldr is to switch the system to protected mode with paging enabled to allow full memory addressing, start the file system, read the Boot.ini file, and display the boot menu. Note that Ntldr must be located in the root folder of the active partition, along with Ntdetect.com, Boot.ini, Bootsect.dos (if you’re going to dual boot), and Ntbootdd.sys (if you’re using certain SCSI adapters for the drive with the boot partition).

2. If you select Windows XP from the boot menu, Ntldr runs Ntdetect.com to gather information about the currently installed hardware. Ntldr then uses the Advanced RISC Computing (ARC) path specified in Boot.ini to find the boot partition—the one where Windows XP is installed—and loads the two files that constitute the Windows XP core: Ntoskrnl.exe and Hal.dll. Both files must be located in the %SystemRoot%\ System32 folder.

3. Ntldr continues by reading the files that make up the registry, selecting a hardware profile and control set, and loading device drivers.

4. At this point, Ntoskrnl.exe takes over and starts Winlogon.exe, which in turn starts Lsass.exe (Local Security Administration), the program that displays the Welcome screen (or the Windows logon dialog box) and allows you to log on with your user name and password.

Please Rep! ;)
phoneyvirus-albums-windows-7-build-7057-leaked-screenshotted-picture287-rep-upper-right-hand.png
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
PowerUsers build there Computer's
OS
Windows 7 Professional (64-bit)
CPU
Intel Core 2 Duo E8400 45nm (Codename: Penryn)
Motherboard
ASUS P5Q Pro - P45 Chipset
Memory
OCZ PC2 8500 SLI 1066MHz
Graphics Card(s)
EVGA GeForce GTX 670 (Codename: Kepler)
Sound Card
RealtekI ACL1200
Monitor(s) Displays
2X Acer V223W
Screen Resolution
1680+1050
Hard Drives
3x Western Digital Black (1TB)
PSU
PC Power & Cooling 610W Silencer
Case
Cooler Master HAF 912
Cooling
Zlaman CNPS9700
Keyboard
Logitech G110
Mouse
Logitech MX518
Internet Speed
6.5 Mbps Speedtest.net
Antivirus
What is a Antivirus?
Browser
Mozilla Firefox
Change the OS Name in Windows Boot Manager

I found it on the Vista Forums


If I helped solve your time give me some Rep! Thanks ;)

 

Attachments

  • phoneyvirus-albums-windows-7-build-7057-leaked-screenshotted-picture287-rep-upper-right-hand.png
    phoneyvirus-albums-windows-7-build-7057-leaked-screenshotted-picture287-rep-upper-right-hand.png
    1.3 KB · Views: 942,462

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
PowerUsers build there Computer's
OS
Windows 7 Professional (64-bit)
CPU
Intel Core 2 Duo E8400 45nm (Codename: Penryn)
Motherboard
ASUS P5Q Pro - P45 Chipset
Memory
OCZ PC2 8500 SLI 1066MHz
Graphics Card(s)
EVGA GeForce GTX 670 (Codename: Kepler)
Sound Card
RealtekI ACL1200
Monitor(s) Displays
2X Acer V223W
Screen Resolution
1680+1050
Hard Drives
3x Western Digital Black (1TB)
PSU
PC Power & Cooling 610W Silencer
Case
Cooler Master HAF 912
Cooling
Zlaman CNPS9700
Keyboard
Logitech G110
Mouse
Logitech MX518
Internet Speed
6.5 Mbps Speedtest.net
Antivirus
What is a Antivirus?
Browser
Mozilla Firefox
Dual Boot to XP on seperate hard drive

Followed your bcdedit instructions for booting to XP and all looks good except when XP is selected from boot menu it just reboots to the boot menu again and must select Windows 7. I'm thinking your instructions only work if Windows 7 and XP or on the same hard drive? If this is true how to you point the path to XP on a seperate hard drive? Thanks for your tutorial on bcdedit, wish I knew more!/Chuck
 

My Computer

Computer Manufacturer/Model Number
Shuttle
OS
Windows 7
CPU
Intel quad core
Motherboard
Shuttle
Memory
4 gig
Graphics Card(s)
asus 9400gt
Sound Card
onboard realtec
Monitor(s) Displays
dell 2408
Hard Drives
640
500
80
80
PSU
400
Case
shuttle
Cooling
active
Does anyone know if the bcdedit switch 'ramdisktftpblocksize' has been changed in Windows 7? I can't get it to work.
 

My Computer

OS
Windows 7 RC1
Ntldr vs guid identifier

I installed a backup drive and cloned my host drive and setup an the option in my multi-boot menu with bcdedit to boot into the backup os ...since that was easier than resetting the bios boot sequence .. it works fine but I went through the hastle of using the guid number identifier... i'm wondering if {ntldr} is a valid substitue? I guess I'll just try it and see. Here is the method I used:



<P>bcdedit /copy {current} /d "Boot Backup"
<P>You will get this message with DIFFERENT guid numbers
<br>The entry was successfully copied to {bda1ead3-8577-11de-883c-00226808ae4c}
<P>Use YOUR guid number in the 3 following commands:
<P>bcdedit /set { YOUR GUID NUMBER } device partition=E:
<P>bcdedit /set { YOUR GUID NUMBER } osdevice partition=E:
<P>bcdedit /set { YOUR GUID NUMBER } description "Backup Drive"
 

My Computer

Computer Manufacturer/Model Number
Gateway
OS
Windows 7
CPU
Core I7
Memory
3 gigs
Followed your bcdedit instructions for booting to XP and all looks good except when XP is selected from boot menu it just reboots to the boot menu again and must select Windows 7. I'm thinking your instructions only work if Windows 7 and XP or on the same hard drive? If this is true how to you point the path to XP on a seperate hard drive? Thanks for your tutorial on bcdedit, wish I knew more!/Chuck

ME TOO.

I'm kind of desperate to get back into my XP Installation, I hope someone can explain this issue.
 

My Computer

Computer Manufacturer/Model Number
HP Workstation Xw4100
OS
Windows 7 Ultimate/XP SP3
CPU
Pentium 4 HT 3.0 Ghz
Memory
2048MB DDR ECC RAM @ 200Mhz (4x512mb)
Graphics Card(s)
Nvidia Quadro FX 1100
Sound Card
Max Blaster
Monitor(s) Displays
17" MAG
Screen Resolution
1280*1024
Hard Drives
160GB IDE (WinXP Installation)
13GB IDE
250GB SATA (Win 7 installation & Storage)
PSU
280w
Edit boot.ini. Rt click it and edit.

on BOTH lines put in the Disk number in rdisk(1) e.g. 0 or 1 - whatever it says in Disk Management.

Also put the partition number , e.g. 1 if the first partition on that Disk , or 2 if the second, etc.

So if XP is on Disk1 partition 1 , it should read:

[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(1)partition(1)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(1)partition(1)\WINDOWS="Windows XP" /fastdetect
 

My Computers

System One System Two

  • Computer type
    PC/Desktop
    OS
    7 X64
    CPU
    i5 8400
    Motherboard
    gigabyte b365m ds3h
    Memory
    2x8gb 3200mhz
    Hard Drives
    various
    PSU
    pure power 11 400w cm
    Case
    Coolermaster
    Cooling
    cryorig m9i
  • Computer type
    PC/Desktop
    OS
    7x64
    CPU
    g5400
    Motherboard
    ga b365m ds3h
    Memory
    8gb ddr4 2400
    PSU
    xfx pro 450w
Edit boot.ini. Rt click it and edit.

on BOTH lines put in the Disk number in rdisk(1) e.g. 0 or 1 - whatever it says in Disk Management.

Also put the partition number , e.g. 1 if the first partition on that Disk , or 2 if the second, etc.

So if XP is on Disk1 partition 1 , it should read:

[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(1)partition(1)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(1)partition(1)\WINDOWS="Windows XP" /fastdetect


I don't understand that 100%. My XP installation is on Disk 0. Here is what my boot.ini file from XP says:

;
;Warning: Boot.ini is used on Windows XP and earlier operating systems.
;Warning: Use BCDEDIT.exe to modify Windows Vista boot options.
;
[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Home Edition" /NOEXECUTE=OPTIN /FASTDETECT /NOEXECUTE=OPTOUT /NUMPROC=2
c:\CMDCONS\BOOTSECT.DAT="Microsoft Windows Recovery Console" /CMDCONS


I don't know how to find the boot.ini for Windows 7.
 

My Computer

Computer Manufacturer/Model Number
HP Workstation Xw4100
OS
Windows 7 Ultimate/XP SP3
CPU
Pentium 4 HT 3.0 Ghz
Memory
2048MB DDR ECC RAM @ 200Mhz (4x512mb)
Graphics Card(s)
Nvidia Quadro FX 1100
Sound Card
Max Blaster
Monitor(s) Displays
17" MAG
Screen Resolution
1280*1024
Hard Drives
160GB IDE (WinXP Installation)
13GB IDE
250GB SATA (Win 7 installation & Storage)
PSU
280w
7 doesn't use boot.ini - it uses bcd instead.


Looks like XP boot.ini is pointing the right way. It also looks like it may be in the wrong place.

Check in Disk Management and see which is the partition marked System.

Copy and paste ntldr, boot.ini and ntdetect.com onto the System partition.

If it is a 100mb System partition without a drive letter - rt click it in Disk Management and give it a drive letter.

Then add an entry for XP to 7 using Easybcd - point it at the System partition.


Please post a screenshot of the 7 disk management window.

http://www.sevenforums.com/tutorials/9733-how-post-screenshot-seven-forums.html
 

My Computers

System One System Two

  • Computer type
    PC/Desktop
    OS
    7 X64
    CPU
    i5 8400
    Motherboard
    gigabyte b365m ds3h
    Memory
    2x8gb 3200mhz
    Hard Drives
    various
    PSU
    pure power 11 400w cm
    Case
    Coolermaster
    Cooling
    cryorig m9i
  • Computer type
    PC/Desktop
    OS
    7x64
    CPU
    g5400
    Motherboard
    ga b365m ds3h
    Memory
    8gb ddr4 2400
    PSU
    xfx pro 450w
...

I'm kind of desperate to get back into my XP Installation, I hope someone can explain this issue.


You set up a multi-boot menu when Windows 7 is running and you only need to run 3 commands:

bcdedit /copy {current} /d "XP"

You will get this message with DIFFERENT guid numbers

The entry was successfully copied to {bda1ead3-8577-11de-883c-00226808ae4c}

Use YOUR guid number in the 2 following commands:

bcdedit /set { YOUR GUID NUMBER } osdevice partition=E:

bcdedit /set { YOUR GUID NUMBER } description "XP"


That's it.... you can even run Msconfig and look under the Boot tab and see it.. and modify the priority and time to default to the first entry.


I think Xp will run from a win 7 multi-boot menu.

Microsoft has relased the virtual XP mode for win 7 but the graphics are limited to 2d.


Download Windows Virtual PC and XP Mode RTM 7600.16393 for Windows 7

Windows Virtual PC: Download
or here:
Download Windows Virtual PC and XP Mode RTM 7600.16393 for Windows 7 | Web Talk
 

My Computer

Computer Manufacturer/Model Number
Gateway
OS
Windows 7
CPU
Core I7
Memory
3 gigs
7 doesn't use boot.ini - it uses bcd instead.


Looks like XP boot.ini is pointing the right way. It also looks like it may be in the wrong place.

Check in Disk Management and see which is the partition marked System.

Copy and paste ntldr, boot.ini and ntdetect.com onto the System partition.

If it is a 100mb System partition without a drive letter - rt click it in Disk Management and give it a drive letter.

Then add an entry for XP to 7 using Easybcd - point it at the System partition.


Please post a screenshot of the 7 disk management window.

http://www.sevenforums.com/tutorials/9733-how-post-screenshot-seven-forums.html

I didn't know I had to copy ntdlr & ntdetect.com over as well, that's probably why it didn't work--I just copied boot.ini.

I ended up fixing the problem by changing the controller order to read the HDD with XP first. I still got the Win7 dual-boot screen and this time both worked.

I have 3 HDDs. An IDE C:, Another IDE, H:, and a Partitioned SATA, O: and W:.

XP is on C:, Win7 is on O: and I just store data on H: and W: . Despite this, W is listed as the System Drive. O.o

Oh well, I got it all working. That's all I care about.
 

My Computer

Computer Manufacturer/Model Number
HP Workstation Xw4100
OS
Windows 7 Ultimate/XP SP3
CPU
Pentium 4 HT 3.0 Ghz
Memory
2048MB DDR ECC RAM @ 200Mhz (4x512mb)
Graphics Card(s)
Nvidia Quadro FX 1100
Sound Card
Max Blaster
Monitor(s) Displays
17" MAG
Screen Resolution
1280*1024
Hard Drives
160GB IDE (WinXP Installation)
13GB IDE
250GB SATA (Win 7 installation & Storage)
PSU
280w
Back
Top