Ubuntu Intrepid 8.10 on MacBook Air
Posted: | 2009-03-08 20:06 |
---|---|
Tags: | Desktop Software, Debian, Hardware, Apple, Ubuntu |
Re-installing Mac OS X and Ubuntu Intrepid
This article documents my re-installation of Mac OS X and Ubuntu Intrepid, including hardware configuration and set up of the wireless card.
The good news is that the hardware support for the MacBook Air in Ubuntu Intrepid is fantastic and miles better than in Hardy. I managed to get everything I could think of working including the backlit keyboard, sensors and wifi.
This assumes you've read:
Requirements
To be able to follow this guide you'll need:
- MacBook Air
- Linux-compatible USB Ethernet card
- Wireless and Ethernet internet connections
- USB CD-ROM or MacBook Air SuperDrive
Mac OS X Preparation
Install Mac OS X and Free Space with Boot Camp
Install Mac OS X (I click the Customize button and un-tick virtually everything to save save and make it quicker) then once it is installed use Boot Camp in the Applications->Utilities folder to free up space for Ubuntu.
During previous experiments I found that if you set up the partitions as part of the Mac OS X installation and then install Ubuntu into one of the partitions the Apple boot menu won't boot Linux which is why the Boot Camp approach is recommended.
Once Boot Camp has finished re-partitioning you can reboot.
Install rEFIt using the .mpkg installer
Rather than relying on the slightly restrictive Apple boot loader I use rEFIt. Download the 0.12 version as a .dmg, mount it under OS X and install the .mpkg file.
http://refit.sourceforge.net/#download
The instructions suggest that rEFIt will be used instead of the Apple version. This isn't the case, you first need to run these commands in a terminal and enter the password for your user account when prompted:
cd /efi/refit ./enable.sh
Get Ubuntu Intrepid Ibex
Download and burn the Ubuntu Desktop installer for Intrepid 8.10. Since this is a MacBook Air, use the 64bit version.
http://www.ubuntu.com/getubuntu/download
If you use the Server version you won't get a proper setup even if you try to manually install GNOME etc afterwards.
Burn the ISO to a CD by loading Applications->Utilities->Disk Utility and clicking the Burn icon on the toolbar.
Now reboot and while the Mac is booting, hold down C to boot from the CD.
Installing Ubuntu Intrepid
When you install, plug in a USB network adaptor so that the installer can access the internet if it needs too. Choose the English Language and select the Install option from the menu. You'll boot into a GUI environment. Follow the steps in the wizard setting up a swap partition of about 2.5Gb and an ext3 filesystem with a mount point of / in the remaining free space.
Choose the United Kingdom Macintosh keyboard. It isn't right but it will mean the local keyboard and plugged in external ones both behave in the same wrong way so you only need to re-learn one set of keys.
Once the installation is complete you'll be able to reboot. If you are using rEFIt, you'll see the rEFIt boot menu, select the Penguin icon with the arrow keys and you'll boot into Ubuntu. If you are using Boot Camp you need to hold down the Alt key when you turn on the MacBook Air to select the OS to boot, choose Windows (it will actually be Linux).
Configuring Ubuntu
Keep the USB network adaptor plugged in during the first boot of the installed OS and once you log into the GNOME desktop you'll get a hardware notification icon asking if you want to install the Broadcom STA drivers. Click yes to use the restricted drivers.
Once they are installed add this to the end of /etc/rc.local just before the exit 0 line so that the required modules are loaded each time Intrepid boots:
rmmod ssb modprobe wl
Now edit /etc/modprobe.d/alsa-base and add this to the end to set up sound:
options snd_hda_intel model=mbp3
Now run:
sudo depmod -a
and reboot.
Once you've rebooted you'll hear the login sound (since sound is now working) and a notification message will pop up saying that wireless networks are available (the wireless card is now working too). Click on the bubble, choose the wireless network and enter the password.
The mouseemu package isn't needed and the Ubuntu instructions recommend you remove it:
sudo apt-get remove --purge mouseemu
Next you'll need to upgrade your installation to use the latest versions of the packages used during the installation:
sudo apt-get update sudo apt-get upgrade
Better Hardware Support
To get better hardware support there are some more things you can do.
To get support for the accelerometer, backlit keyboard more you need the hal-applesec package but this requires some setting up. First make sure you have these lines in /etc/apt/sources.list:
deb http://ppa.launchpad.net/mactel-support/ubuntu intrepid main deb-src http://ppa.launchpad.net/mactel-support/ubuntu intrepid main
After this, you need to import the GPG key to authenticate the mactel PPA as a valid software source:
sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 7A6BC20C4FE04DADD10837608DB7F87A2B97B7B8
After changing the sources list, the package list needs to be updated again:
sudo apt-get update
Now install some extra software:
sudo apt-get install hal-applesmc gnome-power-manager lm-sensors
To get the sensors to work add the applesmc module to your /etc/modules:
applesmc
Then modify /etc/default/acpi-support, setting ENABLE_LAPTOP_MODE to true.
Finally, run depmod again and reboot:
sudo depmod -a sudo reboot
After rebooting, you can view the fan and temperatures using the sensors command. The hardware backlight keys (F5 and F6) work and the screen and keys will automatically adjust their brightness. With applesmc installed, the accelerometer is supposed to work too but I haven't tried it yet.
Note
I didn't follow the instructions for mucking around with the keyboard and my Caps lock key doesn't work. Not sure if following the instructions would fix it.
That's it. You now have a really good Linux set up on a MacBook Air!