A brief description of installing Debian Testing/Wheezy on a MacBookAir4,2 on 19th of January 2012. By Ulrik.

I wanted a Mac OS X/Debian dual-boot configuation so an EFI-only boot was fine. With inspiration from [0].


While the idea seemed simple to me, I don't know if this way of configuring EFI boot is recommendable in practice.

OS X Preparation

In Mac OS X: Resize boot partion (live and nondestructive) so that free space is left at the end of the drive using Disk Utility. It will automatically move OS X's rescue partition as well, which is just fine.

I installed gdisk [1] and added a linux partition out of the free space, not creating any file system.

I also made sure the latest firmware update (2.2 at the time) and OS X update (10.7.2 at the time) were applied, which they were from the factory.

Preparing Installation Medium

I downloaded the testing snapshot netinst iso for amd64 [2] and inserted a usb stick to erase and fill with the installation ISO. Using the instructions from [0], you simply copy the ISO onto the usb stick using dd.

I also prepared a second usb stick for firmware from [3], but in the end it did not work automatically (because of using double usb sticks?) and I copied the firmware in place manually. The files needed are brcm/bcm43xx-0.fw and brcm/bcm43xx_hdr-0.fw from the package firmware-brcm80211_0.28+squeeze1_all.deb


Plug in the usbstick with the installation medium and boot holding the option key. Select "Windows" in apple's boot selection screen. The debian installer should appear.



I chose non-graphical install and the installation flowed as normal until the firmware prompt. I used a second getty (Alt+F2) to manually mount the second usb stick and copy the two firmware files (see above) into /lib/firmware. With that, recognition of my local WPA network was fine.

For Partitioning, I created an ext4 file system manually using a second getty, and let the installer use that as root partition and only partition. No swap, nothing.

For software selection, I deselected the desktop environment, leaving the base system and laptop tasks. (This instruction after discussing with a later user installing on MBA. This might be important for correct GRUB install later even though I can't see why).

For the GRUB installation, do not install into the "MBR"! I installed GRUB into the linux root partition. Then follows a complicated operation to install grub's efi boot.

Installing grub-efi-amd64

Again, see [0] as source.

Before allowing the installer to finish and after it installed grub, using a second terminal:

mkdir /target/boot/efi
mount /dev/sda1 /target/boot/efi  # This is the EFI system partition

cd /target/boot
mkdir ./efi/EFI/grub
ln -s ./efi/EFI/grub ./grub

Set up and enter the installation target in chroot

mount -o bind /proc /target/proc
mount -o bind /sys /target/sys
mount -o bind /dev /target/dev
mount -o bind /dev/pts /target/dev/pts
chroot /target bash

Inside the chroot

apt-get install grub-efi-amd64

Finally you should have installed an EFI target called /boot/efi/EFI/debian/grubx64.efi now. To make this visible in Apple's boot selector, copy it to /boot/efi/EFI/boot/bootx64.efi which is the fallback location for EFI boot.


Holding the option key at boot will now allow the choice "EFI Boot" which should start GRUB and allow debian to boot.

Post-install upgrades

The image I installed from was using Linux 3.1 and debian booted when installed into garbled graphics along the rim and too low resolution. Installing the 3.2 kernel from unstable immediately fixed it and no further configuration of resolutions was needed (not in X either).

For the trackpad to work with click-and-drags, I installed xserver-xorg-input-multitouch and made sure the synaptics driver was removed.


I enabled graphics card powersaving with an option to the i915 module, with a new file inside /etc/modprobe.d:

options i915 i915_enable_rc6=1

powertop also provides some further parameters that can be tweaked for power saving.


Skype didn't record the microphone properly, it seems it was detected as a stereo device. I created a new alsa device with swapped mic channels with this ~/.asoundrc:

pcm.convert_mic {
        type route
        slave {
                pcm "plughw:0"
                channels 2
        ttable {
                0.1 = 1
                1.0 = 1


Not a hardware error

The following appears in dmesg, it should be when the processor is throttled back from turbo mode after a short while and it is not an actual hardware error, as this link should explain: https://lkml.org/lkml/2011/11/14/239

[82852.333650] CPU1: Core temperature above threshold, cpu clock throttled (total events = 1855)
[82852.333653]  << more lines ... >>
[82852.334654] CPU3: Core temperature/speed normal
[82852.334660] CPU1: Package temperature/speed normal
[82869.935412] [Hardware Error]: Machine check events logged