I nearly had a cerebral hemmorhage and/or suicide today. You know how it is when it comes to data/computer loss... Anyway, I thought I would share my story, so the same thing doesn't happen to you.
At the office, I have a 120GB hd, and 1/3 of that is reserved for Fedora, while the rest goes toward Windows XP. Grub lets me choose between them at boot time. Today, while making a backup to prepare for FC3 installation, I noticed that my free space was only like 2gig. All the postgresql stuff required by Grass, and 15gig of sonar data adds up pretty fast. So I decided that I would get a new 2nd hard drive, and let Windows have back the space I took for Linux.
Loaded up Partition Magic, the NTFS resizer, and removed my Linux root and swap partitions. Then extended NTFS to cover the whole drive, except for the 20gig I left as Fat32, for data transfers. Reboot, and there ya go.
Except I forgot about grub! It was still there in the MBR. And when it couldn't find Linux anywhere, it started to get angry. I could not boot into Windows to save my life. All the Linux stuff was backed up on an external hd, but the Wincrap hadn't been backed up in months. All I could get was a boot menu that said "grub>", and I didn't have any clue what to do with it. "help" gave a list of fun commands, but since all of them required some sort of device string, which I didn't know, I was pretty much screwed.
So I broke out the windows installation disk. After it loads all the setup files, it asks you if you would like to install or repair. If you choose repair, and know the administrator password, it will give you a limited prompt. You can't do everything dos or windows from there, but Thank God there is a "fixmbr" command. Windows (not surprisingly) found something strange in my MBR, and was only too happy to replace it. After that, I was able to boot into windows and start a fresh backup with no problems.
The moral of the story (without bashing Microsoft) is that you should always remember grub when adjusting your partition table. I'm sure there is a way to remove grub painlessly, but I sure as heck didn't find it today. Fortunately, MS is aware that this sort of thing happens, and includes the tools you need on the install cd.




