Howto: Setup Ubuntu on MacBook Air without a SuperDrive 21

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

First step

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.

https://help.ubuntu.com/community/Installation/FromUSBStick

I’de suggest to use the isotostick.sh script to do it, worked good for me.

Second step

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
  • Touchpad
  • One mousebutton
  • FN key and associated keys

iSight camera

The iSight camera should work out of the box! Simply install the package called “cheese” and try it out

Wireless card

Here you need some additional stuff. Go to your closest Hardy Heron repository and download the ndiswrapper packages(ndiswrapper-common, ndiswrapper-utils) and also get the “unrar” package.

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:

/etc/init.d/mouseemu restart

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! :)

21 thoughts on “Howto: Setup Ubuntu on MacBook Air without a SuperDrive

  1. Reply Kai-Uwe Jan 14, 2010 12:59

    Which Ubuntu version did you successful install?

  2. Reply Kristian Jan 14, 2010 13:04

    Thats a good question…think I used Hardy on this tutorial.
    Should work with the new Jaunty as well.
    You might wanna use the Mactel PPA over at launchpad.net, they have some kernels and patches if things don’t work as they should.

  3. Reply Kai-Uwe Jan 15, 2010 11:06

    On a MacBookAir2,1 your step two does not work. rEFIt does not boot from that.
    As I understand, converting a bootable CD into a hard disk partition is not simple:
    http://www.sysresccd.org/Sysresccd-manual-en_How_to_install_SystemRescueCd_on_harddisk
    Looking at the hex representation of the created partition on disk, the GRUB loader sits
    far away from the MBR.
    So I wonder how booting a 1:1 ISO-image copy from a hard disk can work. I assume here the
    ISO on USB is binary the same as on CD.

  4. Reply Kai-Uwe Jan 15, 2010 11:08

    Oouch, I meant the GRUB boot loader sits far away from the start of the partition on disk (not the MBR).

  5. Reply Kristian Jan 15, 2010 11:19

    If you successfully created a (working)usb-stick with the iso image, and use dd if=… of=…, it copies the whole usb, every single byte exactly as it is on the usb. If done successfully, and the usb-stick image is working, you will be able to boot from it in rEFIt. Have you checked that your usb is working correctly?

    If GRUB sits far away from the start you might have installed the usb-stick incorrectly – try it on another computer to see if it works.

  6. Reply Kai-Uwe Jan 15, 2010 12:28

    You are correct. The script does more than I first expected.
    It converts the ISO CD image into a hard disk image.
    However I have trouble getting the Ubuntu CD running.
    The isotostick.sh script is not cross Linux ;-)
    Thanks for your hint.

  7. Reply Kristian Jan 15, 2010 12:31

    If i can recollect there are several ways of creating an image. If you have another computer running ubuntu, theres a tool implemented in the system administration are called “USB Startup Disk Creator” or something, which creates usb bootables easy as rice..also a program called unetbooting-something, easy GUI software which does the same. Good luck :)

  8. Reply Kai-Uwe Mar 31, 2010 13:28

    In the end I have bought the superdriver and installed openSUSE-11.2.
    Read more on my blog: http://www.behrmann.name/wind/hardware/mba_100323.html

  9. Reply Tob Apr 18, 2010 22:35

    To easypeaselly install Linux (any distribution), create your USB bootable stick with UNetbootin (http://unetbootin.sourceforge.net/) and then do the “sudo dd if=/ …”.

    You will be able to boot ANYTHING ;)

  10. Reply MacBook Pro with a broken Cdrom drive Mar 4, 2011 09:50

    This WORKED! Thank you, i was able to install Ubuntu 10.10 using this method! Thanks!

  11. Pingback: Macintosh/ linux issues

  12. Pingback: Installing Ubuntu 10.10 on Mac Air | miniGeek.org

  13. Reply Nizzy Oct 26, 2011 07:10

    I don’t have HFS+ in the select menu in mine. Why is that?

    I have the latest MBA.

    thanks

  14. Reply Nizzy Oct 26, 2011 07:17

    I learned that HFS+ is the older name for Mac OS Extended, but still how much space should we assign?

  15. Reply Kristian Oct 26, 2011 08:16

    Hi Nizzy,

    which part are you talking about? You shouldn’t need to create any HFS+ partitions, only ms-dos ones.

    HFS+ is just the technical name for the OS X partition setup, you’ll see your OS X partitions as HFS+ in Ubuntu.

    Hope this helps :)

  16. Reply Ilya Mar 14, 2012 13:59

    Hello to everybody!

    I have a problem with copy from usb flash: dd if=***** answer is
    dd: /dev/disk1s1: Resourse busy

    anybody know what i have to do??

    and if i try to boot from usb, it starts and in 5 seconds crash((
    Boot error.

  17. Reply Ajith R Nair Apr 16, 2012 11:38

    nice information here
    check this out too
    http://tinyurl.com/7g6btz3

  18. Pingback: Installing Ubuntu on Mid 2012 Macbook Air | Don't Shoot The Albatross

  19. Pingback: Installing Ubuntu on Mid 2012 Macbook Air | 4 Fun

  20. Reply Ade Malsasa Akbar Nov 24, 2012 12:23

    Hello, is it faster if Ubuntu installed in Mac?

Leave a Reply