The first thing you do when you get a new Mac is…

Work smarter, better, and faster with weekly tips and how-tos.

…to install Ubuntu on it! Well, not true actually, but I thought it would still make a good title for a blog ;). The standard machine upgrade at Atlassian these days seems to be a shiny new MacPro. They’re some of the sexiest machines I’ve had the pleasure to develop on. 4 cores and 4GB of memory really don’t bog down all that often.
There was one problem however: OS X. Now don’t get me wrong. I think OS X is a beautiful operating system, and in my opinion it is probably the best operating system out there (Note: I’m not trying to start a flame war here. This is entirely my opinion). However, I’ve been using Ubuntu (and Windows previously) for a long time now to develop software. As such I found the key-bindings on the mac quite painful and there were various other aspects of the Mac, that made me feel I wasn’t being as efficient as I could be.
A few people had installed Ubuntu on their Mac’s before me and didn’t seem to have any problems with it, so I thought I’d give it a go.

Requirements

Bootcamp

rEFIt

Bootable Ubuntu CD

Installation

I’d been using my Mac for about 2 months and had quite a bit of information (sources, firefox & thunderbird profiles…) that I needed to move over to Linux if this was meant to be successful. The first step was to free up some disk space. Somehow I managed to consume about 150 Gb of hard disk space which I managed to cut down to about 30 Gb. The next step was to install Bootcamp in order to resize my OS X partition to create some space for Ubuntu. This was surprisingly easy to do, except for the fact that it failed a couple of times with an error that ‘Some files could not be moved’. After shutting down all applications and a restart everything worked fine though. I split my disk into 70 Gb for OS X and 170 Gb for Ubuntu.
Once the partitioning was done I installed rEFIt, a nice little bootloader that allows you to select different operating systems on startup. Once this was done, I inserted the Ubuntu CD restarted and selected to boot from the CD with rEFIt. I decided to start the installer in safe-mode, as I’d heard of some display issues with running the installation in normal mode. The remaining part was simply a standard Ubuntu installation and upgrade. I decided to keep my home directory on a separate partition from the main Linux installation. This turned out useful later. Once everything was installed, I could access my Mac partition in read-only mode from Ubuntu and copy all my files over. Firefox and Thunderbird were especially easy, as all you have to do is start them up with the –ProfileManager option and map a profile to your old profile directory. The next time Firefox/Thunderbird startup they will have remembered all your settings and plugins (Firefox even started with the same tabs open that I closed it with in OSX the last time!).

Result

I’ve been running Ubuntu without problems for a couple of months now. I can still boot into OSX should something go horribly wrong with my Linux installation. The total time taken for this little endeavour was surprisingly little. I spent about 2 hours without any major hassles or problems running through the entire installation. Sound works too.
I recently installed a 64bit version of ubuntu to take advantage of the full 4Gb of memory. I didn’t do this originally, because a couple of people mentioned a lot of problems with 64bit ubuntu. Because I had my home directory on a second partition, this upgrade was really simple. I simply deleted the partition with the 32 bit installation, and when ubuntu started up, it picked up my home directory right away. I’ve since not had any problems whatsoever with the 64bit version.

Feedback

Now, of course an OS change as radical as this attracted some interesting comments from our local population of MacHeads (the Confluence team):
Jens Schumacher:

Blasphemy!!!

Matt Quail:

The easiest way to solve the driver problem is to shut down the Mac, insert OS X disk one (it came with the Mac) and reboot while holding down the C key.

James Dumay:

Enjoy your key bindings and bastardised UNIX.

Steve Smith (our Sys-Admin):

Are you sure I can’t convince you over to the sysadmin side? It seems a shame to let such talent go to waste.