Native VHD Boot on Windows XP

At work, we are still strictly using Windows XP SP3 as our desktop OS. However, as I’m an avid home user of Windows 7, I was very keen to try it out as my main work OS.

I was also particularly interested in testing Windows XP Mode, to run some of our legacy business applications that aren’t currently supported in Windows 7.

I didn’t want to start messing around with disk partitioning, and so decided to find if it was possible to use Native VHD Boot on my Windows XP machine.

Luckily, via Mark Wilson’s excellent blog, I found this guest post written by Garry Martin that showed just how easy it was to “Native VHD Boot on Windows XP” and my work PC is now dual-booting Windows XP SP3 & Windows 7 Enterprise. What makes this approach a great alternative to partitioning your drive and setting up a traditional dual-booting system, is that it can be set-up and removed very quickly — so it is an ideal set-up for testing.

I had to make one slight minor deviation from Garry’s instructions, to make it work for me, so I have included the additional steps below.

You will first need a bootable Windows 7 or Windows 2008 R2 VHD, and that should be copied to your hard-drive. If you need to create a bootable VHD, follow these simple instructions.

I created a sysprepped Windows 7 Enterprise disk image (win7ent.vhd), which I the saved to a folder on my local drive (C:\vhdboots).

You then need to boot your PC from a Windows 7 (or a Windows 2008 R2) installation disk and when you reach the “Install Windows” splash screen, press Shift+F10 to gain access to a command prompt.

Install Windows splash screen

To write the new Windows 7 or Windows Server 2008 R2 bootloader:

BOOTSECT /NT60 C: /FORCE /MBR

To create a BCD store from the Windows VHD:


DISKPART
SELECT VDISK FILE=C:\VHDBOOT\WIN7ENT.VHD
ATTACH VDISK
LIST VOLUME
SELECT VOLUME x (where x is the volume that matches the size of your attached VHD)
ASSIGN LETTER=Z
EXIT

BCDBOOT Z:\WINDOWS /S C:

To set up the Native VHD Boot:


BCDEDIT /SET {default} DEVICE VHD=[LOCATE]\VHDBOOT\WIN7ENT.VHD

BCDEDIT /SET {default} OSDEVICE VHD=[LOCATE]\VHDBOOT\WIN7ENT.VHD

BCDEDIT /SET {default} DETECTHAL ON

To set up the legacy boot:


BCDEDIT /CREATE {ntldr} /d "Normal XP Boot"
BCDEDIT /SET {ntldr} DEVICE PARTITION=C:
BCDEDIT /SET {ntldr} PATH \ntldr
BCDEDIT /DISPLAYORDER {ntldr} -ADDLAST

To return everything back to normal, should you ever need to:

BOOTSECT /NT52 C: /FORCE /MBR

No related posts.

  • Facebook
  • Twitter

Speak Your Mind

*