Since I maintain a Darwin partition on my system, I use GRUB legacy to choose which OS I want to play with. But, then, due some of my tweaking, it stopped working. Ouch. Even if I selected it, it wouldn't boot and would return to GRUB's menu. Irritating, to say the least.
The solutions presented there are bizantine from a Unix P-o-V. The necessary steps to fix it are just to:
- Make sure that the hard disk bootloader (that is, the MBR
of your HD) contains GRUB's
stage 1loader. Warning: don't just
ddit to your HD's file, so that your system can "forget" the partitions that you have.
- Make sure that the partition bootloader (something that is
peculiar to the x86 arches and which, I as a user of other
platforms, didn't know that existed) is set to Apple's
boot1h. This time, you can just
ddit to the first sector of the partition where Darwin/MacOS X resides.
- Teach GRUB to set its snippet to run Darwin with
root (hd0,0)(or whatever partition contains Darwin), tell it to make the partition active with
makeactive, and tell it to load the partition bootloader with
- (Optional) Edit
/Library/Preferences/SystemConfiguration/com.apple.Boot.plistto contain the elements
<string>mach_kernel.foo</string>to point to whatever is your kernel of choice.
- (Optional) If you make changes under Linux, with the
hfsplusmodule, it is highly recommended that you unmount your filesystem and run the
fsck.hfsplusfrom the hfsplus package that I maintain in Debian (and which is mirrored by Ubuntu, but Debian's is more up-to-date, as I have uploads rights there).
- (Optional) Test it with QEMU, to see if it will work.
This was a nice learning exercise, to be honest.