Wednesday, April 13, 2016

How to install Ubuntu on a MacBook

I do own an old MacBook 2009 at home.  It's age is showing up mostly with the latest version of OS X, El Capitan.

As an experiment, I wanted to try out Ubuntu on the MacBook.  I already use it on my old PC Laptop and it works like a charm.  So I took my already formated USB drive with Ubuntu 16.04 on it and booted the old Mac...  Nothing happened...

After some research on the web, I discovered that I had to create a bootable USB drive specifically for the Macbook.  I don't know why as as bootable drive is a bootable drive, but I followed these instructions:

The key is to convert the ISO file into an IMG file.  Then you need to copy the IMG file to the USB drive using some strange command from a terminal in OS X.
sudo dd if=/path/to/downloaded.img of=/dev/diskN bs=1m
If you follow the instructions, step-by-step, it's really easy.  The convertion from ISO to IMG does take a few minutes and "burning" the IMG file onto your USB drive can take around 30 minutes.

Once that done, insert your USB drive into your Macbook and reboot.  Make sure to press and hold the ALT key to invoke the bootable options.  Select your USB drive when it shows up and Ubuntu should start booting.

I skipped the installation of a multi-boot selector like ReFit (  I find it easier to select the OS to boot using the ALT key trick than install another custom tool.

Of course, I tried the Live version first to ensure that my hardware would be properly supported.  All was working as expected beside the fact that I had to install a propriatary driver for my wifi card.

After the initial testing, I went back to OS X to resize my hardrive partition to make some room for a 20 drive and a swap space.  You can do this by using the Disk Utils tools in OS X.  Then another reboot to return to the Live version of Ubuntu and start the installation process.

Usually, partitioning is done automatically by Ubuntu.  In this case, I had to create the partitions manually, select the proper mount point before completing the installation process.  30 minute later, I was rebooting the Macbook in Ubuntu, from the newly created partition.

The main issue I faced was that I needed again the Additional Drivers to enable my Wifi connection.  I had to manually copy the Debian package from the USB drive using "sudo dpkg...".  If I remember well, I had to install "dkms.deb" before installing the package drivers found in the USB installation drive.

Once I got the Wifi working, everything was working well.  Actually, it felt like a brand new computer as it was so fast and so smooth.  The only issue I am currently facing is using the iSight webcam with "ffmpeg".  The webcam does work with Cheese...  Oh yeah, make sure to install all updates from 16.04 before continuing...

I almost forgot, you need to install another package to enable your iSight webcam (search for isight in the repositories).  There is a small procedure to follow but it quite easy to follow.

The installation process was not as easy as on my PC Laptop, but considering the benefits, it was worth it. My Ubuntu MackBook is running perfectly, much better than under OS X.

By default, the computer is booting directly into Ubuntu.  When I want to switch to OS X, I reboot it while pressing the ALT key and then select the OS X partition.  For some strange reasons, I have to do a complete shutdown to reboot into the other OS.  Just restarting seems to keep the last OS used even when using the main partition using the ALT key.

If you feel that your old Macbook is good for the scrap, try it with Ubuntu first.  It does give a new live to your old pal.