Get boot-partition to recognize a second operating system

I "restored" a system image (that contains an operating system) from one computer ("src") to a partition on a different computer ("dest") which already has an operating installed on one partition.

(Instead of installing all applications from scratch. And intending to change the product id to a different one.)

How do I get the boot partition (which is a third partition on "dest") to recognize the new operating system and give me the choice to which one I want to boot?

More info:

The system image does contain an image of "src" boot partition but I did not "restore" it so it doesn't crash the whole computer (because it doesn't "know" of the first operating system on "dest").

All OSs are Windows 7.


You have to modify the "BCD", the "boot configuration database", which is in your system partition (it's called "system", not "boot" - the "boot" partition is the one the OS lives on; Disk Manager will confirm this). You were correct to not "restore" the system partition to "dest".

You make the needed changes with bcdedit, a command-line tool included with Windows. It has to be run as admin, and it won't prompt for UAC elevation, so running it is a little convoluted:

  1. Boot and log into your older OS on "dest".

  2. Open an admin-mode command prompt. Command Prompt is in your Start menu under Windows System; navigate to that shortcut, right-click on it, and click on "Run as administrator".

  3. In the resulting command prompt window, enter the following commands.

    bcdedit /copy {default} /d "Second OS"

The part in quotes can be anything you like - this will identify the option in the boot selection menu.

You will get a response that looks like:

The entry was successfully copied to {b848b9c2-204a-11e2-a72b-b053348c13b0}.

The string in the braces is a GUID, a unique identifier for the new BCD entry. You'll have to copy it to the next commands (you can't use the one here).

  1. The next two commands are:

bcdedit {b848b9c2-204a-11e2-a72b-b053348c13b0} /set osdevice partition=d:

bcdedit {b848b9c2-204a-11e2-a72b-b053348c13b0} /set device partition=d:

Remember, do not simply copy the above! You need to change the GUID to the one you got from the output of the /copy command. (Command Prompt does allow copy-and-paste.)

You could actually do this with a single command:

bcdedit {b848b9c2-204a-11e2-a72b-b053348c13b0} /set osdevice partition=d: device partition=d: 

but by showing it as two commands, I avoided line-wrapping here. :)

The drive letter to use is the drive letter of the partition as seen by the Windows Boot Manager, which is not necessarily the same one you see under the existing operating system on dest. But it probably is. It may however show up as C: when you boot that OS. That is generally a good thing.

You can then use msconfig (run from a Run prompt, or from any command prompt) to easily change the identifying text, make your new entry the default, and make other minor changes. Once you have the second partition booting, you can use bcdedit or msconfig from either OS to make changes to the BCD.

Verb. Sap.: If you do a lot with admin-mode command prompts, you can make it slightly easier to get to by pinning Command Prompt to your taskbar. Then, to run it as admin: right-click on it, right-click on "Command prompt" that appears in the submenu, and select Run as administrator. Three clicks instead of five.

And, if you do a lot with bcdedit, you might look into a graphical tool called EasyBCD (see http://neosmart.net/EasyBCD/ ). There's a freeware version and a commercial version. One advantage is that it "knows" what the correct drive letter should be. (No relationship except as a satisfied user of the freeware version.)