Native boot Windows 7, Windows Server 2008 R2 from VHD on a Windows XP PC

Windows 7 and Windows Server 2008 R2 came with a great new feature “Native Boot from VHD”. With a little configuration, you can deploy a Windows 7, Windows Server 2008 R2 build side-by-side, without making any changes to exisiting XP system. First you neet to create a VHD of Win7, or R2; you can use Disk2vhd tool, and put […]

Windows 7 and Windows Server 2008 R2 came with a great new feature “Native Boot from VHD”. With a little configuration, you can deploy a Windows 7, Windows Server 2008 R2 build side-by-side, without making any changes to exisiting XP system. First you neet to create a VHD of Win7, or R2; you can use Disk2vhd tool, and put the VHD on to your local disk, then create a new bootloader and chain your existing Windows XP build from it.

To begin, boot your computer using your Win 7 or R2 installation media. From Install Windows screen, select your preferences "Language to install, Time & currency, Keyboard or input method boxes," click Next. Don't click Install now, instead click Repair your computer. The search for supported operating systems will fail, and System Recovery Options dialog box appears with Restore your computer using a system image that you created earlier option selected. Click Next. The Re-image your computer tool will fail to find a system image and will display a dialog informing you of this. Click Cancel on the dialog, and then Cancel again on the main tool window. The System Recovery Options menu appears. Click Command Prompt.

Write new Windows 7 or Windows Server 2008 R2 bootloader:

BOOTSECT /NT60 C: /FORCE /MBR

Create a BCD store from Windows VHD:

DISKPART
SELECT VDISK FILE=C:\BOOTVHDS\W2K8R2ENTX64.VHD
ATTACH VDISK
ASSIGN LETTER=X
EXIT
BCDBOOT X:\WINDOWS /S C:

Set up VHD native boot:

BCDEDIT /SET {default} DEVICE VHD=[LOCATE]\BOOTVHDS\W2K8R2ENTX64.VHD
BCDEDIT /SET {default} OSDEVICE VHD=[LOCATE]\BOOTVHDS\W2K8R2ENTX64.VHD
BCDEDIT /SET {default} DETECTHAL ON

Set up legacy boot:

BCDEDIT /CREATE {ntldr} /d "Chain Legacy Bootloader"
BCDEDIT /SET {ntldr} DEVICE PARTITION=C:
BCDEDIT /SET {ntldr} PATH \ntldr
BCDEDIT /DISPLAYORDER {ntldr} -ADDLAST

To put things back to normal, should you ever need to:

BOOTSECT /NT52 C: /FORCE /MBR