Adding an existing VHD to the Windows 7 boot loader

In my last post I wrote about how to install Windows Server 2008 R2 into a VHD for dual-booting purposes. Well, recently I broke my laptop and had to rebuild my boot loader. Anyways, adding an existing VHD to the Windows 7 boot loader is a doddle.

First, copy your current boot loader:

bcdedit /copy {current} /d "Boot Description"

This will generate a new boot entry and print out the GUID. You’ll need this! Next, you’ll set the VHD path for the OS to use.

bcdedit /set {GUID from last step} osdevice vhd=[DriveLetter:]\PathToVHD\VHD_File
bcdedit /set {GUID from last step} device vhd=[DriveLetter:]\PathToVHD\VHD_File

That’s it! Reboot your PC and your VHDs should be bootable. Remember though, you can only boot Windows 7 or Windows Server 2008 R2 VHDs like this.

This entry was posted on Sunday, March 15th, 2009 at 3:18 pm and is filed under Windows 7. Find similar posts by selecting any of the following tags: , , , . You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

5 Comments so far

  1. This is awesome, Rob.

    Is this also doable to dual boot a primary Vista installed computer with Windows 7 on VHD?

    Thanks in advance, Kent

  2. It is possible… I’m just not 100% certain on how to do it though I’m afraid. Something to do with copying the bootmgr file and the boot folder from a Windows 7 installation. In fact thinking about it, that should be all that’s required; and even if you’ve got Vista installed, installing Windows 7 (even to a VHD) should replace the boot loader anyway.

  3. [...] Adding a existent VHD to the Windows 7 Boot Loader [...]

  4. I don’t understand what I’m doing wrong. I go step by step per you instructions but I get and error when I set the osdevice.
    I get this message: “The element data type specified is not recognized, or does not apply to the specified entry.”
    Can you help.

    Gv

  5. @Gv: You’re forgetting the {}.

Have your say

Fields in bold are required. Email addresses are never published or distributed.

Some HTML code is allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>
URIs must be fully qualified (eg: http://www.domainname.com) and all tags must be properly closed.

Line breaks and paragraphs are automatically converted.

Please keep comments relevant. Off-topic, offensive or inappropriate comments may be edited or removed.

  1. Search


  2. Recent Comments

  3. Tags