Home > Windows 7 > Adding an existing VHD to the Windows 7 boot loader

Adding an existing VHD to the Windows 7 boot loader

Sunday, March 15, 2009 Leave a comment Go to comments

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.

  1. Friday, May 15, 2009 at 10:57 pm | #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

    • Rob
      Monday, May 18, 2009 at 8:16 am | #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.

  2. Gv
    Sunday, July 11, 2010 at 5:58 am | #3

    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

  3. Jogai
    Monday, August 2, 2010 at 11:05 am | #4

    @Gv: You’re forgetting the {}.

  4. Wednesday, September 14, 2011 at 3:28 pm | #5

    I followed exact steps as you mentioned,but it is not working for me.
    I think problem is boot loader

  1. Monday, April 26, 2010 at 6:57 am | #1
  2. Tuesday, June 28, 2011 at 2:15 am | #2

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.