A simple drive image copy wouldn't work because of the rather large bad spot. I tried to use the Windows 2000 tools to search for and patch bad sectors, but as near as I can tell, that tool is entirely decorative, because it had no effect whatsoever.
That means I have to use xcopy to transfer the data. That's OK, I know how to script that. And, as it turns out, transferring the data was the easy part. The hard part was getting Windows 2000 to boot when I was done.
In the end, here was my successful recipe:
- Install Windows 2000 from scratch on the new disk
- Let it reformat the disk
- Choose a system directory name OTHER than my original one
- Boot this new, barebones Win2K
- Mount the old hard disk (with a life-saving PCMCIA-to-2.5"-IDE adaptor)
- Xcopy all of the old data (except for the bad directory)
- Modify boot.ini to include both Win2K's
Here's where I start cursing Microsoft. At this point, it will boot the new (temporary) installation. It will boot the OLD (xcopied) installation up to the point where it asks for my user name. At that point, it tells me there is no swap file, and it can't create one, so it won't let me log in. However, if I have the bad hard disk attached, it boots just fine, but it uses Win2K and the swap file from the bad disk!
After a bit of hacking, I discovered there is a registry entry that maps disk serial numbers to drive letters (HKLM\SYSTEM\MountedDevices). The temporary install had C: mapped to the new drive, and E: mapped to the bad drive. The xcopied install had those reversed, so when it went to find the pagefile on C:\pagefile.sys, it wanted to talk to the old, bad drive. I swapped those two registry entries, and now everyone is happy.