How to use BCDEdit to dual boot Windows installations?

Posted by Ian Boyd on Super User See other posts from Super User or by Ian Boyd
Published on 2012-11-28T00:37:29Z Indexed on 2012/11/28 11:06 UTC
Read the original article Hit count: 1138

Filed under:
|

What are the bcdedit commands necessary to setup dual boot between different installations of Windows?5

Background

i recently installed Windows 8 onto a separate hard drive1. Now that Windows 8 in installed i want to dual-boot back to Windows 7.

i have my two2 hard drives:

enter image description here

So you can see that i have my two disks, with the partitions containing Windows:

  • Windows 7: \\PhysicalDisk0 (partition 03)
  • Windows 8: \\PhysicalDisk2 (partition 1)

What i'm trying to figure out how is how to use bcdedit to instruct the thing that boots Windows that there is another Windows installation out there.

Running bcdedit now, it shows current configuration:

C:\WINDOWS\system32>bcdedit

Windows Boot Manager
--------------------
identifier              {bootmgr}
device                  partition=\Device\HarddiskVolume2
description             Windows Boot Manager
locale                  en-US
inherit                 {globalsettings}
integrityservices       Enable
default                 {current}
resumeobject            {ce153eb7-3786-11e2-87c0-e740e123299f}
displayorder            {current}
toolsdisplayorder       {memdiag}
timeout                 30

Windows Boot Loader
-------------------
identifier              {current}
device                  partition=C:
path                    \WINDOWS\system32\winload.exe
description             Windows 8
locale                  en-US
inherit                 {bootloadersettings}
recoverysequence        {ce153eb9-3786-11e2-87c0-e740e123299f}
integrityservices       Enable
recoveryenabled         Yes
allowedinmemorysettings 0x15000075
osdevice                partition=C:
systemroot              \WINDOWS
resumeobject            {ce153eb7-3786-11e2-87c0-e740e123299f}
nx                      OptIn
bootmenupolicy          Standard
hypervisorlaunchtype    Auto

i cannot find any documentation on the difference between Windows Boot Manager and Windows Boot Loader.

Documentation

There is some documentation on Bcdedit:

But they don't explain how edit the binary boot configuration data

If i had to guess, i would think that a Windows Boot Manager instructs the BIOS what program it should run. That program would give the user a set of boot choices. That leaves Windows Boot Loader do be a particular boot choice, that represents a particular installation of Windows.

If that is the case i would need to create a new Windows Boot Loader entry.

This means i might want to use the /create parameter:

/create

Creates a new boot entry:

bcdedit [/store filename] /create [id] /d description [/application apptype | /inherit [apptype] | /inherit DEVICE | /device]

So i assume a syntax of:

>bcdedit /create /d "The old Windows 7" /application osloader

Where application can be one of the following types:

Apptype     Description
BOOTSECTOR  The boot sector application
OSLOADER    The Windows boot loader
RESUME      A resume application

Unfortunately, the only documentation about osloader is "The Windows boot loader". i don't see how that can differentiate between Windows 8 on one hard drive, and Windows 7 on another.

The other possible parameter when /create a boot loader is

>bcdedit /create /D "Windows Vista" /device "The Quick Brown Fox"

Unfortunately the documentation is missing for /device:

/device

Optional. If id is not set to a well-known identifier, the option that is used to specify the new boot entry as an additional device options entry.

Since i did not set id to a well-known identifier, i must set /device to "the option that is used to specify the new boot entry as an additional device options entry". i know all those words; they're all English. But i have on idea what it is saying; those words in that order seem nonsensical.

So i'm somewhat stymied. i don't want to be like Dan Stolts from Microsoft:

I found no content that was particularly helpful when I hosed my machine by playing with BCDEdit. This post would have been ok if there was much more detail especially on the /set command OSDevice, etc. So once I got my machine fixed, I documented the solution and the information is here....

i mean, if a Microsoft guy can't even figure out how to use BCDEdit to edit his BCD, then what chance to i have?

Bonus Reading

Footnotes

  • 1 Since the Windows 8 installer would have damaged my Windows 7 install, i decided to unplug my "main" hard drive during the install. Which is a long-winded explanation of why the Windows 8 installer didn't detect the existing Windows 7 install. Normally the installer would have automatically created the required entries for dual-boot. Not that the reason i'm asking the question is important.
  • 2 Really there's three drives, but the third is just bulk storage. The existence of a 3rd hard drive is irrelevant to the question. i only mention it in case someone wants to know why the screenshot has 3 hard drives when i only mention two.
  • 3 i arbitrarily started numbering partitions at "zero"; not to imply that partitions are numbered starting at zero. i only mention partitions because i don't see how any boot-loader could do its job without knowing which partition, and which folder, an installation of Windows is located in.
  • 4 i'm asking about BCDEdit. i tried Visual BCD Editor. It seems to be a visual BCD editor. That is to say that it's a GUI, but still uses the same terminology as BCDEdit, and requires the same knowledge that BCD doesn't document.
  • 5 For simplicity sake we'll assume that all installation of Windows i want to dual-boot between are Windows Vista or later, making them all compatible with the BCDEdit and the binary boot loader. The alternative would require delving into the intricacies of the old ntloader. Nor am i asking about dual booting to Linux; or how to boot to a Virtual Hard Drive (vhd) image. Just modern versions of Windows on existing hard drives in the same machine.
  • Note: You can ignore everything after the word Background. It's all pointless exposition to satisfy some people's need for "research effort" before they'll consider being helpful. Some people have even been known to summarily close questions unless there is research effort. Some people have been know to close questions if there is too much research effort. Some people close questions when i put the note saying that they can ignore everything after the Background out of spite. Some people are just grumpy.

© Super User or respective owner

Related posts about bcd

Related posts about bcdedit