How to use BCDEdit to dual boot Windows installations?

This is not a direct answer to the question before "Background" but points to an alternative solution for creating loader entries for booting two (and more) Windows Vista and later OS's. Please see also my second answer below about critic on terminology used in Visual BCD.

No guids, devices, objects, elements and blah, blah, blah.

My Background (skip if not interested and go to solution below):

I have implemented Visual BCD Editor.

During the implementation process I had to read all available sources on bcdedit and WMI BCD Provider interface (programming interface, can be used with C++, C#). The documentation from Microsoft is really poor.

In the BCD there are objects (loaders, settings, device elements). There is no documentation about the connections between objects despite there are dependencies.

There are more than 140 (!) elements (properties) of BCD objects in Windows 7. I do not know the meaning of some elements - there is simply no documentation.

In Windows 8 there are new elements - I guess the total number now is approaching 180 (!!). No documentation.

On the other hand there are two very powerful utilities for manipulating the BCD: bcdboot and reagentc.

bcdboot - creates/fixes default loader also BCD and boot environment as a whole !

reagentc - installs/deinstalls recovery environment (winre.wim)

Both tools are not very well documented also.

Alternative solution:

There is almost no need of bcdedit as using only bcdboot you can create loaders for Windows Vista and later Windows OS's - you create loader for earliest OS, than for the latest and voila you have created the boot environment for a dual/multi boot system:

Assuming you are in Windows 8:

1. bcdboot f:\windows (this maps to Windows 7 as on picture in question)

2. bcdboot c:\windows (this maps to Windows 8)

Done !

Base Microsoft rule for boot process: Boot environment (and BCD) should be always on [first disk + active partition]. (on picture - Disk 2 => First disk in BIOS boot sequence !)

Last but not least there is the bootsect utility for writing MBR and PBR (master and partition boot record) - now standard in Windows 8 (was available only in WinRE earlier).

So using only bootsect and bcdboot all boot entities for a dual boot system can be created/fixed.

I think the boot process for Vista and later is described very well on many internet sites even on Microsoft.com.

Note:

One of the best sites about Windows BCD is Geoff Chappell's site - there is more detailed information there than on Microsoft.com. Interested users could find quite useful information there and some critical notes on bcdedit documentation.


When I formatted my C: drive to reinstall Windows the master boot record was deleted and the Windows 7 installer failed to restore it. I could use a GUI bcdedit tool like Visual BCD Edit tool, but why should I have to install something when there should be a simple command in bcdedit can do the job? After much searching through the online help files I gave up with bcdedit and found the answer here buried in digressions. To create a boot entry for the second partition you have to use bcdboot.

Assuming you are in C:\Windows:

  1. bcdboot e:\windows
  2. bcdboot c:\windows
    When you reboot you will be presented with the Windows boot menu with two entries for Windows 7. If you select the entry that boots into C:\Windows you can rename the entry for this partition with:
  3. bcdedit /set {current} description "Windows 7 (Partition 1)"
    This makes the OS booted at startup the default entry in the boot menu:
  4. bcdedit /default {current}
    This places the default OS at startup first item in the boot menu
  5. bcdedit /displayorder {default} /addfirst
    Or you could make the OS at startup the first item in the boot menu:
  6. bcdedit /dispalyorder {current} /addfirst
    Now reboot and select the second item in the boot menu which should be labelled "Windows 7". Once booted into E:\Windows rename the OS booted at startup:
  7. bcdedit /set {current} description "Windows 7 (Partition 2)"
    Test that the boot menu works OK and save the bcd data to a partition that does not have an OS installed on it:
  8. bcdedit /export D:\Saved_BCD_Settings\SavedBCD
    If you mess up later you can restore the bcd boot menu with:
  9. bcdedit /import D:\Saved_BCD_Settings\SavedBCD