Main menu

SmartFeed by FeedBurner Subscribe to the site feed.


If you find the information here useful, then please consider a small donation, or linking to this site.

Recent Comments

Recent Tweets

  • RT @robmargel: http://tinyurl.com/y8tcrhr - Parental Controls in Windows 7 and Windows Vista ^MW practical advice for parents
  • Just caught up for a coffee with an old friend at Microsoft UK (we were grads together 15 years ago... now I feel /really/ old)
  • Grrr... I paid £5 to respond to an ad on preloved.co.uk and the advertiser didn't even respond. There's a site to avoid in future...
  • [blog] Safer Internet Day: Educating parents on Internet safety for their children http://bit.ly/c0s8Jt
  • European Safer Internet Day: ChildLine's advice on staying safe online - parents might want their kids to read this: http://bit.ly/92HY9C

Calendar

October 2009
M T W T F S S
« Sep   Nov »
 1234
567891011
12131415161718
19202122232425
262728293031  

Archive

Native boot from VHD on a Windows XP computer

Written by: Garry Martin

Guest PostLike 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 installTime 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

Comments

1

Comment from Dan
Time: Friday 16 October 2009, 1:33

Were all the steps before the command prompt just for getting to the command prompt? If so you know the key combination CTRL+F10 summons a command prompt anytime during Windows Setup.

Err… or it could be ALT+F10 or SHIFT+F10. Not 100% positive, but it’s one of those. This has worked since Vista’s Windows Setup.

2

Comment from Garry Martin
Time: Friday 16 October 2009, 18:54

Good catch Dan. I actually use a Windows PE boot disk but was conscious that not everyone would have access to one of those, so I checked the Microsoft website for official instructions to get to the Command Prompt. You are of course correct that hitting Shift+F10 at the initial install screen will also take you to the same place and save some time.

3

Pingback from Native Boot VHD on a Windows XP Computer [Virtualization] | Windows 7 hacker
Time: Saturday 17 October 2009, 16:12

[...] it’s Native Boot VHD on Windows 7, and then on Vista, and without any hosting OS, now it can be done on a Windows XP machine too. Thanks to Mark Wilson and his team for finally figuring it [...]

4

Pingback from Een VHD booten op een XP-machine « EarlyBert
Time: Sunday 18 October 2009, 9:47

[...] Mark’s weblog voor het hele [...]

5

Pingback from Semi-regular web-link clearance – October 2009 | wisefaq.com
Time: Sunday 18 October 2009, 15:54

[...] Native boot from VHD on a Windows XP computer (Mark Wilson blog) 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. [...]

6

Pingback from jim jacob : Windows XP boot from VHD
Time: Monday 19 October 2009, 6:13

[...] Native boot from VHD on a Windows XP computer. I figured it would be a matter of time before someone found a way to make this possible. And now it is. [...]

7

Pingback from Native boot Windows 7, Windows Server 2008 R2 from VHD on a Windows XP PC
Time: Monday 19 October 2009, 13:37

[...] To begin, boot your computer using your Windows 7 or Windows Server 2008 R2 installation media. When you reach Install Windows screen, select your preferences in 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, noted. [...]

8

Comment from trialUnplugged
Time: Friday 23 October 2009, 9:26

i couldn’t get past “ASSIGN LETTER=X” it keeps giving me an error saying “NO VOLUME SELECTED”

any thoughts?

9

Comment from Garry Martin
Time: Friday 23 October 2009, 10:23

trialUnplugged – after you’ve used ATTACH VDISK try LIST VOLUME to see what volumes are available. Can you see anything that looks like it would be your VHD file?

10

Comment from Mark Wilson
Time: Friday 23 October 2009, 11:55

@trialUnplugged – it sounds as though the VHD failed to mount for you – try list volume and see which volumes are available then select volume volumenumber to select it, then you should be able to continue with the drive letter assignment.

11

Comment from trialUnplugged
Time: Saturday 24 October 2009, 2:59

Great! I got it to work! Thanks for the feedback, guys! I’m typing from a new win7 vhd within a winxp partition!

You guys rock!

12

Comment from kharagpur consulting group
Time: Saturday 24 October 2009, 8:30

thanx that really helped me a lot, was stuck up with it

13

Comment from Anonymous
Time: Wednesday 4 November 2009, 23:31

Take a look at this video. Demonstrates a utility setting up a Windows 7 bootable VHD on an XP system.

http://www.portlock.com/support/training_videos/LeapFrog_XP_to_Windows_7.aspx

14

Comment from Anonymous
Time: Wednesday 4 November 2009, 23:32

Sorry forgot my email address the first time…

Take a look at this video. demonstrates a utility setting up a Windows 7 bootabld VHD on Windows XP.

http://www.portlock.com/support/training_videos/LeapFrog_XP_to_Windows_7.aspx

15

Comment from Pierre
Time: Sunday 15 November 2009, 3:35

Thanks for the blog! Since you installed this on your work laptop, could you tell me whether it was easy to remove? Is there a way to only have the boot menu show up if you press a certain key during bootup so that if a technician reboots my machine they don’t see it and blame me?

16

Comment from Garry Martin
Time: Tuesday 17 November 2009, 22:56

Hi Piere, it is very easy to remove, just use the last command in the post and this reverts back to the standard NLTDR. There is no way to stop it appearing in the boot menu though.

17

Comment from Alexey
Time: Thursday 26 November 2009, 6:01

Hi

Is there any way to boot vhd from the network share?

18

Comment from Mark Wilson
Time: Thursday 26 November 2009, 9:30

@Alexey – I don’t believe that VHD boot is supported from a network share; however, based on a conversation I had with Garry (and as yet untested), you might be able to use the VHD as an iSCSI target and, if your network hardware supports it, boot from that.

19

Comment from varun
Time: Tuesday 9 February 2010, 12:35

When try boot Win 7 vhd on xp machine after selecting windows 7 from boot menu it starts show start windows 7 and after 2 second bloue dump error comes and it restarts. VT is enabled.System coniguration : 2gb RAM , 75 gb hdd, 2 partitions c=20gb and d=remaining.
Please help Urgent.

20

Comment from Mark Wilson
Time: Tuesday 9 February 2010, 12:41

@varun – you shouldn’t need Intel VT for this – the disk is virtualised, not the operating system instance. If you’re getting a BSOD, what does it say? Chances are it’s unsupported storage (SATA drivers), or HAL (non-ACPI).

Write a comment

Please note the rules for comments and the privacy policy and data protection notice. I'm sorry but, because not everyone sticks to the rules, I've had to implement some spam prevention measures - if you're experiencing difficulties leaving a comment, please let me know.





The following XHTML tags may be used: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>