Installing Linux on a Mac

NOTE: This guide was written before the release of Apple’s Snow Leopard. I have since had real problems upgrading to Snow Leopard while Linux and Refit are installed. If you’re planning on upgrading soon, then put off dual-booting Linux until after the upgrade.

This is a, hopefully, useful guide to installing Linux on an Apple Mac, based on my own experiences. It is largely Ubuntu-based but can be adapted fairly easily to work with other distributions.

Make Some Space

At the moment, your Mac OSX installation sits on a partition that takes up all the space on the hard disk. Apple provide a tool called Boot Camp Assistant to resize this partition in order to install Windows, but we’re going to use to install Linux instead.

If you’re running OSX 10.5 (Leopard), then Boot Camp Assistant will be in your Applications folder, under Utilities. If you’re running 10.4 (Tiger) or under then you’ll need to download a copy.

Once in Boot Camp, you can resize your Mac OS X partition and put a Windows partition where you’ve freed up some space (32GB is ample). Once it’s finished, it’ll prompt you to enter a Windows XP / Vista installation disc. Quit out of the program at this point.

Install Refit

Mac’s use a special kind of chip when booting on the machine. This is what Apple use to ensure that OS X is running on a Mac. Because of this, we can’t use a standard Linux bootloader like LILO or GRUB. Instead we need to download and install Refit. Once installed, you can restart your machine and you should see the Refit boot screen before botting into OS X.

Download and Burn Ubuntu

Download the installation ISO from the Ubuntu site and burn it to a disc. Keep the disc in the drive and reboot the machine. This time, in Refit, you’ll see an extra option to boot Linux from disc. Choose this option and you’re inside the Ubuntu installer.

Modify the Partition Table

Go into advanced partition management and delete the “FAT32″ partition that was created by Boot Camp. Create a Linxu “ext3″ partition in it’s place, leaving a bit of space for a swap partition (see how much swap here). Create the swap partition in that space and then continue with the installation.

Finish the Installation

That’s it. Ubuntu should now be installed, so eject the disc and let the system restart. On the restart, Refit should kick in again and offer you to boot OS X from the hard disc or Linux, now also from the hard disc. Once inside, there’s a few other bits and pieces to take care of.

Wireless Adapter

Most newer Macs come with a wireless adapter created by Broadcom that is not supported by default. It’s essentially a generic chip that requires firmware to be loaded onto it in order to run. Due to licensing restrictions, this firmware can’t be distributed with the Linux kernel or any distribution.

This would be a bit of a problem if it weren’t for our existing Mac OS X installation that has the firmware already. We’re going to use a program to extract the firmware from our OS X installation and then save it so we can use it withing Linux.

You’re not going to be able to use your wireless card at the moment, so connect up to your router using a cable, open Terminal and issue the following commands:

sudo apt-get update
sudo apt-get install b43-fwcutter

This will download and immediately run a tool to extract the firmware and install it in the right place. Once this is finished, use the wireless network monitor in the top-right hand corner of Gnome to connect to your wireless network.

  1. No comments yet.

  1. No trackbacks yet.