A few weeks ago, I installed Arch Linux (which is great) on a spare 5gb partition. The partition was before my main one, which is several hundred gigabytes. Arch Linux gained my favor quickly, and soon I was running out of space. Ubuntu was also still in charge of GRUB, something I hoped to change.
So this weekend, I repartitioned my hard drive, shrinking my Ubuntu partition in order to give Arch more room. The process involved copying all the Arch files to a new partition and the process was pretty easy. Then, I installed Grub2 through Arch. Also a very easy process. Somewhere in the mess though, Windows stopped booting, and it gave me a "Hal.dll not found" error when I tried.
I figured it was something to do with the boot sector on the Windows partition, and I wasn't scared. I started up a Recovery CD so i could access the XP Recovery console. Once there, I used fixboot on drive C: and rebooted. No dice.
Was this the right thing to do? Apparently not. Fixboot screwed up the partition table seemingly beyond repair: GParted now showed that I had one partition and that it was FAT. Uh-oh.
That's as far as I got on Saturday. On Sunday, after a bit of digging, I found out about a program called testdisk. What's more, I already had it: the GParted live CD/USB comes with it. I started it and it was able to successfully recognize my former partitions and it could read files from them. I tried, unsuccessfully, to write this data to the disk, but either testdisk failed or the disk was beyond repair, and nothing worked. Eventually I saw that my extended partition was exceeding the bounds of the disk, and an awesome tool called fixparts was able to fix it. Still no success on the file system reads, though. In the end (after several hours) I started backing up my windows partition to a USB HD. Thank you, testdisk!
I figured that Windows was too far gone, as it couldn't be read except through testdisk, so I dug out my 6 year old recovery DVDs (which have worked before when my hard drive died) but, to my dismay, the second one seems to have gone bad.
What to do?
I had a slipstreamed Windows XP SP3 CD laying around, which I didn't expect to work, but, lo and behold, it did. I'm currently in the process of re-copying all my old Windows files back to a newly-formatted drive. Hope this works out. You think I'd learn my lesson with partitions one of these times.