Like almost every other corporate in the world, where Mark and I work there is a standard build deployed to everyone. The default in our particular organisation is a 32-bit Windows XP OS regardless of the capabilities of the laptop or desktop it is deployed to. Over the years, this has caused a number of problems that have required an increasing number of “exemptions” from standard policy to allow people to run a different Windows version or platform.
Whilst this hasn’t been too much of a problem for the majority of the Architects that Mark and I work with – after all, we’re fairly self-sufficient when it comes to supporting our environments and are infinitely capable of collectively dreaming up ever more creative workarounds for the things that don’t work – it isn’t a solution that’s manageable at scale.
Then, along came Windows 7 and Windows Server 2008 R2 and with them came the introduction of a great new feature – Native Boot from VHD. With a little configuration, this has enabled us to leave the existing Windows XP corporate build in place, and to deploy a 32-bit or 64-bit Windows 7 (Enterprise or Ultimate) or 64-bit Windows Server 2008 R2 build side-by-side, crucially without having to make any changes to the Windows XP build or the existing disk partitioning scheme.
To achieve this, we created a new Windows 7 or Windows Server 2008 R2 bootloader, and “chained” the original Windows XP bootloader from it. At boot, this allows us to select a Native Boot from VHD into, for example, a 64-bit Windows Server 2008 R2 Enterprise build, or to select the chained bootloader which allows us to boot into the corporate Windows XP build.
Of course, you’ll need to create your VHD-contained Windows 7 or Windows Server 2008 R2 OS build and put it to your local disk, and this post doesn’t go into that detail, but once you have done that, the steps below will allow you to create a new bootloader and chain your existing Windows XP corporate build from it.
To begin, boot your computer using your Windows 7 or Windows Server 2008 R2 installation media.
When you reach the Install Windows screen, select your preferences in the Language to install, Time and currency format, and Keyboard or input method boxes, and then click Next.
Do not click Install now. Instead, click Repair your computer.
The search for supported operating systems will fail, and the System Recovery Options dialog box appears with the 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.
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:\BOOTVHDS\W2K8R2ENTX64.VHD
ATTACH VDISK
ASSIGN LETTER=X
EXIT
BCDBOOT X:\WINDOWS /S C:
Set up the 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 the 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