Native Boot to Windows 7 in VHD from Windows Vista

8

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.

sshot281 - Native Boot to Windows 7 in VHD from Windows Vista

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

8 COMMENTS

  1. 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. 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

    • 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.

  3. 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

LEAVE A REPLY

Please enter your comment!
Please enter your name here