Ubuntu Hard Drive Management on MacBook

Like everyone else, I used the /bin/false guide to install Ubuntu on my MacBook. Either I did something wrong or there was/is an error in the guide because lilo was installed to the MBR of /dev/sda and not the third partition, /dev/sda3, like specified in the given lilo.conf. I think the error in the guide is as follows:

Run the command
lilo -b /dev/sda

So, even though the lilo.conf specifies boot=/dev/sda3, the boot specification is overridden by the command above, installing lilo into the MBR of /dev/sda.

Luckily this still works… unless you try to resize a partition. I resized my Mac OS X partition to make it smaller by disabling journaling on it, resizing it with gparted, and then re-enabling journaling. It worked except something weird happened to the partition table and even though my Linux partition was still intact, I was unable to boot it. It actually turned out my lilo.conf was pointed to the wrong boot map. It had nothing to do with lilo being installed in the MRB but it made me realize there was an error in the /bin/bash guide to begin with.

How to fix the MBR?

  1. Install lilo correctly into /dev/sda3 by simply running lilo with the given /bin/bash lilo.conf.
  2. Run lilo -u /dev/sda to replace the MRB with the one lilo backed up in /boot/boot.*.
  3. If lilo complains about a timestamp mismatch, check the timestamp on the /boot/boot.* and make sure lilo is trying to replace the MBR with one backed up from your original Mac OS X install. If the timestamp is correct, run the lilo command with the -U flag to ignore the timestamp.
  4. Reboot. Make sure the refit entry for the MBR lilo is gone and the refit entry which exists for Linux is on the third partition. If not, you did something wrong and you should leave a comment for help.
    None Found