Native Boot to Windows 7 in VHD from Windows Vista

Posted by Kent on May 21st, 2009, in How to, Tips & Tricks, Virtualization tagged in: , ,
free computer fix

Now we now we can native boot to a Windows 7 installed VHD file, but it requires you have Windows 7 installed on the host computer. Is it possible to do the same from a Windows Vista installed machine? For example, I have Windows Vista installed on the physical machine and I have Windows 7 installed on a VHD file. Can I native boot to that Windows 7 VHD on the same machine without having to boot to Vista first? Well, definitely!

The trick is to upgrade the Windows bootloader on Vista to the version compatible with Windows 7, which requires 3 steps as follow:

Step 1: Get a copy of Windows 7 bootloader from a Windows 7 computer and save it to the external USB drive.

Basically, we need to copy 2 files from a Windows 7 system, bootmgr from c:\ and bcdedit.exe from c:\windows\system32. Connect the USB drive (assuming connected to drive F:) and run the following command from dos prompt window.

c:\windows\system32>xcopy /h /y bcdedit.exe f:\

c:\windows\system32>cd \

c:\>xcopy /h /y bootmgr f:\

Now we have got a copy of windows 7 bootloader on the USB, and let’s move to next. Note that the edition has to match on both Vista and 7, like 32bit of bootloader on 7 can only be used on 32bit Vista, or the boot will fail.

Step 2: Backup the current bootloader on Vista

They are the same two files on Vista machine in the same location that needed to be backed up before we overwrite them with the Windows 7 version. You can just make a copy of them on the same computer.

c:\windows\system32>xcopy /y /h bcdedit.exe bcdedit.org

press f (for file) when prompted.

c:\windows\system32>cd\

c:\>xcopy /y /h bootmgr bootmgr.org

press f (for file) when prompted.

Now it’s ready for the step 3.

Step 3: Replace the bootloader on Vista with the copy we obtained on step 1

First, you need to boot to Windows Recovery Environment by booting to Vista bootable DVD or Windows 7 boot DVD. Once you get in to the dos prompt window in recovery mode, run the following commands in order.

c:\>attrib bootmgr –s –h –r (change the bootmgr file attribute so it becomes replaceable)

c:\>e: (or whatever the drive that used for the USB drive you connected)

e:\>xcopy /y /h bootmgr c:\bootmgr

e:\>xcopy /y /h bcdedit.exe c:\windows\system32

Now, your Vista machine has native VHD support feature on.

Assuming you already have a bootable Windows 7 VHD ready on the Vista. If not, follow the instruction on how to native boot to Windows 7 in VHD to create one first and have it ready on the Vista machine. And then reboot the computer and do the following to add the VHD boot entry to the bootloader or follow the step 3 on how to native boot to Windows 7 in VHD.

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

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

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

Once it’s done, type bcdedit you will see the something like below.

sshot-281

Now, reboot your Vista computer and you will be prompted with two choices to boot. VHD is one of them.

Related Articles From Windows7hacker:

Subscribe to W7H Tips & Tricks (Why?)

Email:

Comments (21)

  1. Joshka says:

    If when you installed your Windows 7 source machine, you installed to a blank partition, you the installer creates a 100Mb partition called the System Reserved partition. This is not mounted by default. To mount this partition and give it a drive letter, open the Disk Management tool (Win key, type “Computer Management”, or Win Key, right click computer, click manage)
    Find the System Reserved partition and Right Click, Change drive letter and paths. Click add, and choose S: (this is the conventional drive mapping letter for this partition).
    The open the drive and continue to grab the bootmgr file from S: instead of C:.

    Hope this helps

  2. Joshka says:

    IIRC, Vista also acts in a similar manner with its bootmgr.

  3. Malih says:

    so does this mean I can do the VHD booting from my notebook's Windows 7 Home Premium by copying files from my PC's Windows 7 Ultimate

  4. Kishore B says:

    Sameer Dhoot has a very detailed step by step instructions with screen shots on how to replace the Windows Vista bootloader with Windows 7 bootloader giving you the ability to boot from VHD. read the post here http://intellects.in/2009/10/23/boot-from-vhd-r...

  5. windows7hacker says:

    Thanks @kishore for the sharing. Yes, the post from Sameer Dhoot is indeed in very detail.

    Cheers.

  6. windows7hacker says:

    The native boot VHD is only supported in Enterprise and Ultimate. So as long as the VHD image is built in these two edition, yes you can boot from your Windows 7 Home Premium as host machine.

    Cheers.

  7. Sanj says:

    Thanks for the article.

    Can I use this on a Win2K8 host machine?

  8. windows7hacker says:

    Yes, you can definitely can. You can even native boot Win2K8 in VHD if you haven't noticed.

    Cheers.

  9. Sanj says:

    Thanks for the article.

    Can I use this on a Win2K8 host machine?

  10. windows7hacker says:

    Yes, you can definitely can. You can even native boot Win2K8 in VHD if you haven't noticed.

    Cheers.

  11. Sanj says:

    Thanks for the reply.

    When you say “You can even native boot Win2K8 in VHD if you haven't noticed.”, do you mean,

    1) being able to native boot Win2K8 R1 VHD from a Windows 7 host? I thought this is not possible since native VHD boot is only supported from Win2K8 R2 onwards?

    2) or Something else?

    sorry if I am missing something obvious! :)

  12. windows7hacker says:

    Yes, you are right. It's only supported on Windows 2008 R2. R1 is not supported.

    Sorry for the confusion.

    Also, it doesn't seem to matter that which type of host you are running. As long as you have the latest bootloader you should be able to do the native boot VHD.

    Cheers.

  13. Sanj says:

    Thanks for the reply.

    When you say “You can even native boot Win2K8 in VHD if you haven't noticed.”, do you mean,

    1) being able to native boot Win2K8 R1 VHD from a Windows 7 host? I thought this is not possible since native VHD boot is only supported from Win2K8 R2 onwards?

    2) or Something else?

    sorry if I am missing something obvious! :)

  14. windows7hacker says:

    Yes, you are right. It's only supported on Windows 2008 R2. R1 is not supported.

    Sorry for the confusion.

    Also, it doesn't seem to matter that which type of host you are running. As long as you have the latest bootloader you should be able to do the native boot VHD.

    Cheers.

  15. Sanj says:

    Thanks for the reply.

    When you say “You can even native boot Win2K8 in VHD if you haven't noticed.”, do you mean,

    1) being able to native boot Win2K8 R1 VHD from a Windows 7 host? I thought this is not possible since native VHD boot is only supported from Win2K8 R2 onwards?

    2) or Something else?

    sorry if I am missing something obvious! :)

  16. windows7hacker says:

    Yes, you are right. It's only supported on Windows 2008 R2. R1 is not supported.

    Sorry for the confusion.

    Also, it doesn't seem to matter that which type of host you are running. As long as you have the latest bootloader you should be able to do the native boot VHD.

    Cheers.

  17. fjctp says:

    I can't find bootmgr under C: in my windows 7, but I found bcdedit.exe under C:windowssystem32.
    What's wrong?
    Thanks

  18. windows7hacker says:

    It's a system hidden file. You need to turn on the setting in folder option in order to see it.

    Cheers.

  19. fjctp says:

    I did….but there is nothing called “bootmgr”…..Can i get it from the CD???
    Thanks

  20. matt says:

    Reading all around about the native VHD boot is great, but you should really get your hands wet before blogging. You don't need win7 installed as a parent os. Boot from the win7 disk and get to the part about upgrade or custom, press [shift]+[fn]+[f10] to get to the cmd. Create a virtual disk like normal, partition it etc… Exit the cmd and continue by clicking custon, then you should see your virtual hdd partition to install to. It will take care of the bootloader on its own I believe. I have only done this with no os, and installed 7 to vhd

  21. windows7hacker says:

    Hi Matt. that's quite a creative way of doing this. I haven't thought about that and tried. So thanks for sharing it out.

    Cheers.

    Trackbacks/Pingbacks (2)

  1. Windows 7 VHD Native Boot without any Hosting Operation System | Windows 7 hacker
    [...] on either Windows 7 or Windows server 2008 R2, the host operation system can be either Windows 7, Vista, or even nothing. If you don’t believe it, follow the steps below, and tip your hat to Vineet, if [...]
  2. 7 Things about Windows 7 Native Boot VHD | Windows 7 hacker
    [...] While Vista in VHD for native boot is not supported, a Windows 7 VHD that native boots from Vista is totally possible, and here is how. [...]

Leave a Reply


Complete Guide on How to Install Windows 7 on Any Netbook

BitLocker in Question, But Don’t Worry, It’s Still A Foolproof Way of Protecting Sensitive Data

Tools That We Like – Foxit Reader a Lightweight PDF Reader

We have Reached 1 Million Pageviews in 2010, Thanks To All Our Readers

How To Disable or Customize the Aero Peak in Windows 7