Archive

Posts Tagged ‘supergrubdisk’

Migrating old XP+ computers to virtual machines

October 28th, 2009 4 comments

Since my current laptop (2004) is pretty much on its last legs and I don’t feel like wasting or looking for my XP windows keys, I figured I would just migrate my laptop. Similarly, my desktop that was built in 1999 (Pentium 4 A – no hyperthreading) with 512 Mb of ram and non-functional USB ports and dead sound card, has some useful data on it I figured I might as well start with that and see how much of a hassle it would be to backup those systems. I figured the best way would be to some how ‘dd’ a hard disk and then run it in VirtualBox. However, I remember reading something about problems with Windows “memorizing” hard disk information and in general ‘dd’ is super slow.

Luckily I ran across this Lifehacker article via a quick google search. It doesn’t contain much information, except that it mentions this new (Oct 9,2009?) SysInternals tool called ‘disk2vhd’ which supposedly makes imaging windows drives a piece of cake. Some other Ubuntu googling searches resulted in similar recommendations but also noted that there could be some IDE/SATA driver issues and that you had to fix these driver issues “apriori”. I won’t go into the details since it seems all of this can be fixed in the image afterwards.

So I went about my way, running ‘disk2vhd‘ on 2 windows drives which totaled 50+ Gb. This went smoothely on my abandoned desktop and it took about an hour or two to create the VHD. I copy over the VHD, which took a few more hours (did it overnight). However, when I tried to run the VHD in virtualbox it said I had a grub error (error 21). I figure this has to do with the fact that the MBR points to grub, which lives on the hard disk I didn’t image. Anyways a quick google resulted in grabbing SuperGrubDisk. I just ran it, and selected the “Win” option as I had no intention of creating a dual boot VHD system. This fixed the grub problem.

Windows XP started booting up and then I ran into the infamous “0x0000007B” boot BSOD issue. It has something to do with windows not liking a difference in IDE hardware. At this point another quick google seemed to indicate I would have to do the “apriori” fix step. However, I wasn’t about to go spend another 8 hours trying to backup my computer as I already spent enough time trying to make it work. Luckily I ran across this confusing forum post, which hinted that the Ultimate Boot Cd for Windows (UBCD4Win) had something called “Fix_hdc” that could possibly fix the drivers issue. Luckily I had a copy of a UBCD4Win iso lying around. So I load up UBCD4Win iso and find ‘fix_hdc’ and just selected the “Usb option”.

Magically, it seemed to do the trick, and after a reboot of the virtual machine, everything worked flawlessly.

Summary:

  1. Run “disk2vhd” from SysInternals on the drives you want to image. (Optionally, run mergeIDE and so forth to possibly avoid step 3.
  2. If you had some multi-boot grub setup and grub doesn’t live on the same partition (which it probably doesn’t), use a grubrecovery disk such as SuperGrubDisk.
  3. If you get the “0x0000007B” BSOD error during boot, just grab UBCD4Win, boot it up, and then run Fix_hdc. It should be in Start>Programs>Registry Tools>FIX_hdc>Fix Hard disk/USB

Overall, the process was fairly painless. Mostly just clicking a few “auto” buttons. Virtualbox seems to run well, and so far the experimental 3D drivers seem to play relatively nicely. I’ve watched some movies through VM and played a few games (none of them super resource hungry). Music seems to work fine. Ironically, when I ran Windows 7 earlier this year, the audio did not play smoothely, and video clearly didn’t work. Seems that windows media player plays video much more jerky than VLC which is less noticeable. I don’t remember off-hand what my old vlc settings were though, so I can’t comment much.

I’d say the conversion was a definite success, and I will do the same with my old computers so I will have access to software that I can no longer fine that I had installed on my old machines. At any rate, I now have a “working” backup of my old system which can run in several VM packages (VirtualPC, VirtualBox, VMware). I’m fairly certain that such formats will continually be updated (virtualization seems to be the future of everything), and thus it should be possible to keep a copy of my old machines with me on my new computers in the future.