Thursday, December 20, 2007

The best of three worlds

Yay! After thinking about re-installing OS X, Ubuntu and finally adding Windows XP to the mix, I played around for about 9 hours and finally was able to install Windows XP together with Mac OS X and Ubuntu 7.10, so triple-booting is now standard here! That's Windows XP for games and the usual website compatibility testing, then there is Ubuntu for all development and "default work environment" stuff and finally Mac OS X for some other useful things. All three OSes boot really quick from rEFIt, and it's much better than any virtualization can ever provide. Sadly, triple-booting is a little tricky, and especially Windows is very picky about when it decides to boot and when it doesn't (most of the time today, it didn't ;).

The trick is to get the GPT-to-MBR mapping to produce a partition table that has the Windows XP partition as last entry and be sure to let the Windows XP setup (the blue console-based one) reformat the partition - or else you will get media errors or the famous hal.dll error. Hints on how to do all this can be found here and here. You will probably not want to have swap partition, but only three "real" partitions: One for Mac OS X, one for Linux and one for Windows (in that order!). The fourth of the four partitions the MBR can have will be the EFI partition. All other partitions beyond that cannot be seen by MBR/BIOS-based OSes (like Windows). Linux and Mac OS X will "see" the GPT partition table, but I don't know if GRUB or Lilo can successfully boot off GPT partitions or if they still rely on the "bootable" partition to be accessible through the MBR.

I somehow followed the guides and did much trial-and-error, because I didn't start from scratch but wanted to keep my OS X partition and Ubuntu partition. But it is possible to get it working. If you have backups of all your data and all installation media ready (and a fast internet connection for the updates), I recommend wiping out the entire MacBook and starting from scratch by restoring Mac OS X and then following the triple-boot guide described above. And don't forget: The Windows XP partition has to be the last one in the MBR. And the partition has to be re-formatted by the windows installer to boot after the first restart. This can be accomplished by zero-ing out (using dd) the first one hundred megabytes of the Windows partition before starting the XP install.

After all, it's worth the hassle. All three mainstream operating systems on one machine is really helpful. And you won't ever go "ah, a great application, but not for me - I don't have {Windows|Mac OS X|Linux}". Yep - the best of three worlds.

No comments: