Maybe you dual boot. No, maybe you triple boot. Maybe you have a complicated partition scheme juggling multiple boot record tables, and it just isn’t working.
I use Boot Camp and rEFIt to dual boot between Mac OS X and Windows 7. I recently added Ubuntu to the mix. But rEFIt has trouble synchronizing the GPT and MBR records, and as result, Mac OS X and Ubuntu boot fine, but Windows boot fails with the message:
Windows failed to start.
Ubuntu’s GRUB overwrote the Windows boot loader, corrupted the GPT-MBR tables, and crashed the GUI every ten minutes. Now I remember why I used to install Ubuntu in a VMware virtual machine. It’s less hassle. I decided to uninstall Ubuntu, fix GPT-MBR for rEFIt, and fix the Windows MBR.
It’s worth trying to sync GPT one last time. Install gptsync, either with Synaptic/apt-get, or if you’re like me and Ubuntu fails to recognized either of your network interfaces, by manual download. Assuming you have only one hard drive, you will target /dev/sda.
$ sudo gptsync /dev/sda
Status: Analysis inconclusive, will not touch this disk.
Error: Not Found returned from gptsync.efi
Rats, that’s the same error rEFIt displays. We might as well use GParted to remove Ubuntu.
You’ll find GParted under System -> Administration -> GParted. After a few minutes, GParted will identify the partitions. If you decide to remove Ubuntu but keep Mac OS X and Windows, you’ll want to delete the ext4 partition then grow Windows to the remaining free space. Don’t forget to apply the changes.
The MBR still needs to be fixed. If you have a Windows or FreeDOS CD handy, you can reboot, use Repair mode, and run fixmbr. I don’t know whether FreeDOS comes with fixmbr, the website’s downright confusing. If you don’t have some sort of livecd with fixmbr, I recommend the ms-sys Ubuntu package. I’ve used it to remove Ubuntu and restore the Windows bootloader on two computers in the last week.
$ sudo ms-sys -m /dev/sda
Then reboot, use rEFIt to sync the GPT-MBR tables, and enjoy Mac OS X and Windows again. In the future, I’ll stick to virtual machines for Linux. Partitioning is not worth the trouble.