I looked all over the net for a guide on how to setup Ubuntu on a MacBook Air without buying the SuperDrive, but couldn’t find anything. So I hade to do it the hard way, figure it out myself!
What you need is:
- MacBook Air
- External drive of some kind with enough space for a Ubuntu install disk
- Ubuntu Hardy Heron image
You need to start out by creating a bootable Ubuntu disk. I’ll do a quick guide on that, if it doesn’t work, theres a lot of guides out there that could help you out. Forget it! I’ll just post a link.
I’de suggest to use the isotostick.sh script to do it, worked good for me.
So you’ve got a disk or a stick with a Ubuntu Hardy Heron image on it, whats next?
First we need to partition the harddrive on the MacBook Air. I suggest using the “Disk Utility” in OSX, works quick and is easy. What you need to do, is use the disk utility to create TWO additional partitions. HFS+ allows resizing, so the data on your disk will not be lost.
Just choose your main harddrive, and then the tab called “Partition“.
Then add 2 new partitions
Choose the second partition on the left side
Choose the tab called “Erase“
Format the disk as MS-DOS, shouldn’t take long.
Now we’ve got 2 extra partitions – let’s move on to the fun stuff!
Our next task would be to copy the external disk/stick to the second partition on your system. This should be named disk0s3(HAVE TO CHECK). We need to copy it byte by byte, so the whole boot sector and stuff is added as well.
First you have to figure out what the external disks address is, I presume it is /dev/disk1s0, then run this command in a terminal window:
dd if=/dev/disk1s0 of=/dev/disk0s3
This could take a while, depending on your harddrive and external drives size. Go make a cup of coffee, or order som food.
When this is done, we can move on to even more exciting stuff!
Step three – booting and installing
First things first!
Before you start installing anything, you should install rEFit.This i a bootloader so you can choose between OSX and Ubuntu AND it helps you start the Ubuntu installation. It should be a fairly easy installation to do, just follow the guide on the webpage.
When that is done, we can start thinking about Ubuntu again. When you boot now, rEFit shoud come up so you can choose between OSX and a Windows-ish like icon. Before you do anything, choose the icon underneath which is called “Setup partitions” or something like that.
This should ask you a yes or no question, where you clearly answer YES. What it does, is to activate your fat-partition and makes it bootable.
I now recommend a reboot.
When you now get to the rEFit menu again, choose the windows-ish icon. THIS SHOULD START YOUR UBUNTU INSTALLATION IF EVERYTHING WENT WELL.
Step four – Installing Ubuntu
I presume that this step is know to everyone by know. Just a couple of reminders for the installation.
Rember to NOT touch the partition which holds the Ubuntu installation files!
You can use that partition as a /home mount later if you want, but for now you need it to install Ubuntu.
Step five – Complete the shit
Now your installation should be done, and on your next reboot, rEFit should show a nice linux logo and a not so nice OSX logo. This means it recognize theres a linux partition on the system. So far so good.
Try booting your new linux partition!
It should now work, if not, try to shutdown your computer and then try again. If it still doesn’t work – try post a comment or something, could be something wrong with my guide.
What works and what doesn’t?
The main concerns on the MacBook Air is the following:
- iSight camera
- Wireless card
- One mousebutton
- FN key and associated keys
The iSight camera should work out of the box! Simply install the package called “cheese” and try it out
Transfere these packages to your new Ubuntu installation using your external harddrive and install them. Also transfer over the drivers for your wireless card from your FIRST OSX CD. The drivers are located in /boot camp/drivers/broadcom. And the file you are looking for is broadcomxpinstaller.exe.
Use unrar to extract the broadcomxpinstaller.exe with this command:
unrar x broadcomxpinstaller.exe
You should now have a .inf file named bcmwl5.inf. Execute the following commands:
sudo ndiswrapper -i bcmwl5.inf
sudo ndiswrapper -l
sudo ndiswrapper -m
sudo modprobe ndiswrapper
IMPORTANT! You may already have loaded the ssb-module – YOU NEED TO REMOVE IT!
The ssb module stops the ndiswrapper from accessing the wireless card.
Remove the ssb module using this command:
sudo rmmod ssb
sudo rmmod ndiswrapper
sudo modprobe ndiswrapper
Then add ndiswrapper to /etc/modules:
sudo gedit /etc/modules
That should do it! You might need to blacklist the ssb module, or remove it on every reboot – up to you;)
Touchpad and right click
One thing you might not be used to, it the one button mouse on the MacBook Air. To work around this problem, install the package called “mouseemu”.
After installation, add these lines to /etc/init.d/mouseemu :
MID_CLICK=”-middle 125 272″ # Command key + mouse click
RIGHT_CLICK=”-right 29 272″ # Control key + mouse click
#SCROLL=”-scroll 56″ # Alt key + mouse movement
SCROLL=”-scroll 125″ #Scrolls while holding Command button
TYPING_BLOCK=”-typing-block 300″ # block mouse for 300ms after a keypress
After edting this file, remember to restart the service:
Feel free to tweak this settings as you like. You can also use the “showkey” command to figure out keycodes.
That should be about it!
Feel free to leave comments and suggestions – this guide is not flawless, so any feedback is appricated, thanks!