Installing Ubuntu 8.04 on a Mac Pro / by Your Name

We got the opportunity to buy some high-end development machines for work and we decided to get Mac Pros from Apple. In my case it's replacing a cheap HP Pavilion computer which I've been using quite happily with Ubuntu for the past year. It was pretty clear for me that I will stick with Ubuntu for work even though I'm a Mac person at home and used to work with Macs in the past (FYI: I've never owned a PC at home).

My Mac Pro has the following configuration. Please note the two Hard Drives and Displays. The following instructions are specific for the combination of multiple Hard Drives and a Mac Pro which is a problematic configuration (at least when it comes to Ubuntu 8.04) and it took me a while to figure out to get it work.

  • Two 2.8GHz Quad-Core Intel Xeon (8 cores total)
  • 8GB of RAM
  • 320GB HD (Bay 1, Mac OS X)
  • 500GB HD (Bay 2, Linux)
  • ATI Radeon HD 2600 XT 256MB
  • 2x 23" Apple Cinema HD Display
  • AirPort Extreme Card
For a more detailed walkthrough see here but the steps are essentially as following.
  1. Forget BootCamp if you've two Hard Drives
  2. Start your Mac Pro from the Ubuntu 8.04 LiveCD
  3. Launch the Installer
  4. Select /dev/sdb as installation disk and format it in ext3. That's the second 500GB HD in Bay #2.
  5. Ignore the warning regards a swap partition (you can add swap-files later)
  6. Click on Advanced and choose either (hd1) or /dev/sdb for Grub. The default setting is (hd0) or /dev/sda and you *do not want* to install the bootloader on the 320GB HD with Mac OS X!
  7. Install
Here is the tricky part which took me a while (about 20 re-installs) to figure out. The Mac Pros do some stupid (?) remapping of the drive names. The drive you choose to boot from becomes automatically (hd0) even though it's the second drive. We must hence fix Grub's menu.lst now or you won't be able to boot Ubuntu automatically!

You have the following two choices.
  1. Boot from the LiveCD and mount the Linux drive or...
  2. Re-Boot the Mac Pro, hold the option key, select the Windows drive (the Mac Pro considers everything that is not HFS formatted as some kind of Windows volume [1]) and wait for Grub to fail. Type the following commands which will boot your Ubuntu you've just installed:
  • grub> root (hd0,0)
  • grub> kernel /vmlinuz root=/dev/sdb
  • grub> initrd /initrd.img
  • grub> boot
Once you've logged in open a Termnal window and type the following commands:
  • cd /boot/grub
  • sudo cp menu.lst menu.lst.bak
  • sudo gedit menu.lst
There should be three entries that look very similar to the ones you've just entered into Grub manually (see above). Look out for root (hd1,0) and change them all to root (hd0,0). Re-Boot your Mac Pro again, hold the option key and select Windows. Ubuntu 8.04 should start on its own this time and we're done! :-)

You might want to install rEFIt if you don't want to hold the option key every time and don't want to call your Ubuntu "Windows". I personally don't care since 99.9% of time I'm running Linux on the Mac Pro.

[1] Update (10/13/2008): The Windows volume thingy seems to be a feature of the BootCamp partition tool. I had to reformat the Mac OS X drive with the Disk Utility application and the Windows volume disappeared.