Sunday, May 24, 2009

Procrastinations…and Why XP can’t be VHD booted under W7

As has recently become a curious pattern, I’ve continued to allow myself to be distracted with “off-list” tasks.

These are not to be confused with “honey-do’s” which are those items performed at the last minute as requested by dearest Lavie and Alvis.

No, these are when I get a brilliant idea that isn’t on my weekend project list, and when started, will distract me with singular determination.  When I look up a whole day has passed.

Bother.

Such was Saturday when I took on trying to configure Alvis’s hand-me-down laptop to dual-boot Windows 7 RC and XP.

Background

Flush with my success in getting both our Vista laptops to dual-boot Windows 7 RC by using the new “boot from VHD” feature, I decided that Alvis’s laptop was next.

Her laptop is a smaller model. Still big-enough to be a laptop and not a “netbook” but much smaller than the monster laptops that Lavie and I use (monster in size, not necessarily performance BTW..).

Unlike our laptops that were already running Vista, her laptop is running XP.

Because the XP boot loader is different from Vista/Win7 I had to take a different tack.

The Operation

Alvis’s laptop has a single partition.  So (using one of my custom PE 3.0 boot disks) I captured a WIM image of it using ImageX.  Took about 1 1/2 hours to complete.  Girl’s got a lot of icanhascheezburger images downloaded on it…  WIM was dumped to a portable USB drive.

Next I re-formatted the drive and dumped Windows 7 RC (32-bit) on it.  It does have a Turion64 processor so I could have gone 64-bit like I did successfully on the other laptops, but it only has 1 GB  of RAM so I didn’t want to push things.

Installation went on in about 30 minutes; and in another 30 I had the basic configuration done.

Next I followed my previous steps in GSD How To: Dual Boot Windows 7 on Vista via VHD... post and created the VHD file for the XP system to go.

I then used my PE disk to re-boot the system, figured out what drive-letter the VHD file was reporting in on, and then reapplied the ImageX WIM back into the VHD file.  Took about 35 min.

Reboot and….

it went directly into Windows 7 RC.

Troubleshooting

Turns out I had to do some additional bcdedit work to get the Windows 7 boot loader to correctly see and offer the XP VHD drive.  Stuff I didn’t have to do in my previous VHD dual-booting work.

I used a combination of bcdedit command-line work and XdN Tweaker GUI tool to keep things organized.

Specifically this part:

bcdedit /set {guid} device vhd=[locate]\windows7.vhd

Once I got it all together and rebooted, the boot loader now offered me both the Windows 7 system and the XP (VHD) system.

However, once the NTLDR process kicked off inside the XP VHD, I would get a boot.ini error and the load would tank.

Soo…?

Turns out (DOH!) I should have not taken the time to even try this.

  1. The Windows 7 boot loader is an updated version of the Vista boot loader.
  2. You can replace the Vista boot loader file with the Windows 7 and not have any issues.
  3. The Windows 7 boot loader supports booting from VHD…the Vista one does not.
  4. The XP boot loader is completely different than the XP one.  Not even close.
  5. The XP boot loader, like the Vista boot loader does not support booting from a VHD.

So while the handoff can take place to the XP OS inside the VHD, once there the XP system doesn’t know (lack of driver support) how to handle using the VHD wrapper as a physical volume.

So until someone can take the time to work out tricking (or modifying) the XP OS files to mount and access the VHD file like a physical drive, it doesn’t appear you can boot any other system in a VHD file using the Windows 7 VHD booting scheme unless it is Windows 7 (or Vista if you have exchanged the original Vista boot loader with the Windows 7 version).

I’m not a Windows server guy, but if any of the Windows Server versions share a boot loader with Vista/Windows 7, I suspect they would also work in a VHD.  That leaves out XP, Windows 2000, and the Linux cousins. (As far as I know at this point.)

But wait.  How come we can install XP in a VHD file and launch it just fine in Virtual PC?

The Virtual PC application wraps the VHD around it's hardware abstraction functions so the XP NTLDR doesn't actually realize it is operating in a VHD. It still thinks it is a physical drive.

No problems.

It’s a different situation when asking XP to haul up itself from within the VHD with no hardware abstraction to assist.

The Windows 7 boot loader is more sophisticated and can handle this VHD drive/driver functionality internally just fine without any additional assistance.

Vista can be "tricked" into working by swapping out it's boot-loader version with the kissing-cousin found in Windows 7. 

At least that's the way it seems to me.

Remediation

So in the end I had to reformat all the work I did on Alvis’s laptop, then reapply the original WIM image I took back.

It went without a hitch and was back in it’s original state with no harm done in about 25 minutes.

Thoughts on the Windows 7 experience

I will say that, like our other laptops (a Compaq Presario CQ60-215DX Notebook PC and a Gateway MT6451 notebook), I had zero (0) issues with Windows 7 RC while it was installed directly on Alvis’s laptop (a Compaq Presario V2575US model in case anyone is interested).  All three appear to be 100% compatible out of the Windows 7 RC installation box experience.  Including drivers for both 32-bit and 64-bit OS versions.  That is great news.

So while I can’t (VHD) dual-boot Alvis’s system like I did for ours, I know it works fine and will be another candidate for upgrade when the final release comes out.

That also brings me confidence that even the old Shuttle desktop system might be up to the Windows 7 upgrade task.  It’s still chugging along on XP Home right now.

I’m really looking forward to moving to Windows 7.

I was willing to accept Vista on our laptops, since they shipped that way.  But while OK, I’ve always been left with the nagging feeling that it just isn’t as polished in overall performance as I would like.

Win7 seems to have cleared out the remaining cob-webs.

Additional VHD Booting Resources

So that was the bulk of my Saturday daylight hours.

And the night-time hours?

Well I had to finish migrating my work laptop system from a Dell Latitude D610 to a D630 unit.  And that was a whole different story….

Cheers.

--Claus V.

No comments: