MikeyP.com MikeyP.com

Migrating XP with gparted

A few years ago, changing out hardware from underneath a Windows install was a sure way to ruin your OS. So when I received the parts for my new machine this week, I decided to try using various migration tools to get my data from the old machine to the new one.

Specifically, I used Microsoft's built-in Backup and Files and Settings Transfer Wizard tools to copy everything to a Linux network share, then restore to a fresh XP install. Surprisingly, these two tools managed to restore more than 90% of my original machine to the new install. And if I hadn't spent an hour or so playing with the new machine, I probably wouldn't have noticed just how screwed up my new system was, and how impossible it was to fix the restored config. The Backup app was interesting, and worth looking at again some day, but I'll never use the Files and Settings Transfer Wizard again.

I decided to take a chance and do a straight image from the old hard drive to the new one. I used the amazing Linux-based gparted live CD, and with a little prep work, everything worked out perfectly. Here's how I did it:

  1. With the original hard drive still in my original machine, I booted Windows and temporarily disabled most of my startup apps, particularly ones that relied on the machine config, such as online backup, virus scan, iTunes, etc. I used the autoruns utility to do this (another highly recommended tool from Mark Russinovich).
  2. I renamed the network name of the old machine, just in case both machines booted up on the network at the same time.
  3. I then properly shut down Windows, which is a critical step before using gparted. Otherwise, gparted will balk at the NTFS settings.
  4. I removed the old hard drive from the old machine and temporarily installed it in the new machine next to the new drive.
  5. I put the gparted live CD in the DVD drive and booted up the new machine.
  6. In gparted, I "copied and pasted" the two partitions from the old drive to the new one, and resized them to fill the new, larger drive. It took gparted about 20 minutes to copy the partitions.
  7. I reviewed the new partitions in gparted and noticed that the main partition (the new C drive) was not marked as bootable, so I set the boot flag.
  8. After removing the gparted CD, I powered down, removed the old drive and rebooted.
  9. WinXP booted up fine, though it took several minutes (presumably to realize it was running on all new hardware). The mouse was not active, so I pressed enter a couple of times to get the login password text box to appear, then logged in.
  10. Several "Found new hardware" dialogs appeared, asking to install new drivers. I tabbed and pressed Cancel on all of them (except for the mouse driver) so that I could use the hardware vendor's installer disks.
  11. When the mouse came to life, I opened up the Add/Remove Programs control panel and uninstalled all apps related to the old hardware (video card, motherboard, and sound utilities). Whenever I was asked to reboot, I clicked "Do not reboot".
  12. I inserted the CDs for the new motherboard drivers and video card drivers, and ran both install apps (clicking the "Do not reboot now" options after each install).
  13. After installing all the new drivers, I clicked the "Restart" button in the "Turn off my machine" dialog, and rebooted the machine. WinXP restarted normally, and booted much faster this time.
  14. I renamed the network name, and fired up autoruns again to re-enable the startup apps. While there, I also deleted any left over entries related to the old hardware.
  15. I rebooted one more time, and that was it! Everything else worked fine, and the WinXP config in the new machine works exactly as it did in the old one (except that it's significantly faster, of course).

I should note that I had to reauthorize the Connected Online Backup software, as well as authorize the new computer in iTunes. Which reminds me, I should also deauthorize iTunes in the old computer. I also presume that Windows Media DRM is probably out of whack, but I don't have (nor plan to have) any Windows Media DRM files.

Every time I fire up gparted, I get more impressed with it. It is a must-have boot CD. And it makes me smile to know that the best way to migrate a Windows install is with a Linux boot disk. :-)


Read more stories like this one...