Saturday, April 26, 2008

Ubuntu 8.04 on Mac Mini

Update: please read my new post if you want to install Ubuntu 8.10 or 9.04.

So, Ubuntu 8.04 came out yesterday. I promptly got my Mini to not boot by trying to install it using the same procedure I used for 7.10. One day later, I figured out a (small) sequence of steps that yields a working dual-boot of Leopard and Ubuntu 8.04. Here's what I did:

  1. Use the Leopard (Desktop or Server) install disc to re-partition the disk to 1 partition, then install Leopard.
  2. Install Software Updates. Needs to be done twice.
  3. Start up Boot Camp, and resize your OSX partition. Quit Boot Camp when it offers to start the Windows installation.
  4. Download and install rEFIt: http://refit.sourceforge.net/
  5. Make rEFIt take over the boot process (it should do that by itself but that doesn't work for me):

    • Open Terminal
    • cd /efi/refit

    • ./enable-always.sh


  6. Optionally, switch the boot default to Linux: open /efi/refit/refit.conf in TextEdit, and uncomment the line saying #legacyfirst (at the very bottom)
  7. Reboot and insert your Ubuntu 8.04 disc. The rEFIT screen should pop up. Don't worry if you've never seen it before. You'll notice the difference.
  8. Start installing Ubuntu. Choose manual partitioning, delete the big FAT32 partition that Boot Camp created (leave the EFI partition alone though), and create the root and swap partitions in the free space.
  9. On the last install screen, click Advanced, and replace (hd0) with (hd0,2). This is necessary so that Grub installs in the right place.
  10. Upon rebooting, go to Partitioning Tool (second icon in the bottom row) in rEFIt. It will offer to update the MBR to reflect the EFI partition table. Accept. Then the Mini will reboot again.
  11. Power off the Mini. Then power it back on. Now you can boot Ubuntu or Leopard.
I know that the last steps look like black magic (pulled out of my behind). I didn't get it to work otherwise. These steps work. Please comment if you find a shorter sequence.

Asides from getting Ubuntu to boot, rEFIt is handy because it rescues you in case something blows up. When I bricked the Mini, I was running on Apple's boot loader. rEFIt was still be able to boot OSX, even when I messed up the grub install options.

Enjoy your Mini servers :)

8 comments:

  1. Hey there. I followed all your steps till this one:
    8. Start installing Ubuntu. Choose manual partitioning, delete the big FAT32 partition that Boot Camp created (leave the EFI partition alone though), and create the root and swap partitions in the free space.

    I deleted the big windows partition but what do you mean by vreate the root and swap partitions in the free space? I hit the new partition from the free space and I have a few options like:

    Location for the new partition(Begining or End)
    Use as (Exr3 journaling file system, etc..)
    Mount Point (/ , /boot , /home, / tmp, /usr , /var , /srv , /opt , /usr/local )

    Im really confused by this step.

    Thanks =)

    ReplyDelete
  2. Thanks. It worked perfect for me. With the latest installer for rEFIt there was no need to use the terminal commands mentioned.

    ReplyDelete
  3. I had to do the black magic (yanking the power cord) at two spots. The first was after installing refit. The 2nd was after letting refit change the MBR. After that everything worked and ubuntu booted. Gotta love black magic.

    ReplyDelete
  4. This does not apper to work right with Ubuntu 8.10, Any thoughts or help would be appreciated

    ReplyDelete
  5. I just followed your steps to install Ubuntu 8.10 on a Mac Mini using rEFIt 0.12. In step 10, the EFI console did *not* automatically offer to update the MBR; it just gave me a shell prompt. So I typed "gptsync" to update the MBR. Then I tried booting Ubuntu, but it hung. I then performed the black magic of powering off and on. Now everything works fine and I can boot either OS!

    ReplyDelete
  6. Sorry, but I was not able to try 8.10. My Mac mini was stolen a couple of months ago :(

    @adam - thank you very much for helping out everyone else! I promise to try the latest Ubuntu (8.10 / 9.04) as soon as Apple releases the new mini.

    ReplyDelete
  7. For Ubuntu 8.10 or 9.04, please read my new post.

    ReplyDelete