MacBook Air crunchbang linux install continued: notes on wireless drivers, overheating

Hello all you nice linux people! Probably you are not here for the poetry? I did intend to write a follow-up on what does and does not work on my MacBook Air crunchbang install but intentions are about the most unreliable predictors there are so here is a skeletal What I Have Done So Far.

I have not booted the #! install in more than a month and so not only is this is from notes and memory (and after a few more lines it will just be notes!) but this is pretty much as far as I have gotten. My record with finishing projects is not all that impressive, but I am hoping to do better at sharing how I get things started, as I do lots of that! Hope this bit is useful in some way.

So. Most things work reasonably well out of the box. The graphics seem a bit quirky but serviceable–mostly a few flickery window drags–so looking for driver specifics is on the list. I am not much of a gamer, but I do create graphics both moving and not, so if I aim to convert to linux throughout the house–and I kind of do, but it is not the most important thing in my life at the moment–I will have to find ways to get them up to snuff. But the biggest problems after install, according to my own idiosyncratic hierarchy of technological needs were:

1. Wireless did not work.
2. Machine seemed to run hot, and the fans would stay quiet until all at once they were trying to fly the computer off the tv tray.
3. Trackpad right click was very fickle and multitouch gestures were few and far between.

The good news: wireless was easy to fix.

The still working on it news: lm-sensors worked to get me some information and while the heat is not overwhelming if I confine my work to mostly text, browsing graphic-intensive websites with iceweasel will run the cpu past 80C way too quickly. And when I tried to use Dropbox the long first sync also sent the temps soaring, so I disabled the app for later recommissioning. And the fans just sit there (almost) the whole time. So that will be the next puzzle to solve.

The bad but probably not crucially so news: my notes reveal nothing as to whether the trackpad clunkiness has been resolved in any way. I think I remember getting a consistent right click out of it at some point but I did not record what I had changed. When I next have a moment to boot up and do some forensics, I will write down what I find out.

So the rest is directly from my notes and free of narrative excess (mostly), but if you are attempting to put crunchbang on a MacBook Whatever, I suspect you will be able to follow them without much problem. If something makes no sense, leave a comment and I will try to clarify.

And hey, do you like poetry, cultural theory, history of ideas, experimental prose? Click some of the links I have up! I am of the rare art-lit-nerd-geek species. These crunchbang posts were almost absolute in their randomness but I might do more anyway because there should be more randomness in general.


Code Legend

'$' denotes command line input as normal user
'#' denotes command line input as root


Notes on wireless:

$ iwconfig
lo no wireless extensions.

$ lspci -vvnn | grep 14e4

Network controller [0280]: Broadcom Corporation BCM43224 802.11a/b/g/n
[14e4:4353] (rev 01)
links to several drivers that provide support for Broadcom devices

this one worked first and immediately


Update the list of available packages and install the firmware-brcm80211 and wireless-tools packages:

# aptitude update
# aptitude install firmware-brcm80211 wireless-tools


[I downloaded packages from
as well as from
but have not needed this package so far]


As the driver may already be loaded, reinsert the module to access installed firmware:

# modprobe -r brcmsmac ; modprobe brcmsmac

crunchbang froze here but after restart
wireless found local network immediately so I stopped doing things.

After restart:

$ iwconfig
lo no wireless extensions.

wlan0 IEEE 802.11abgn ESSID:"myfriendswifi"
Mode:Managed Frequency:2.457 GHz Access Point: ss:aa:ff:ee:tt:yy
Bit Rate=65 Mb/s Tx-Power=19 dBm
Retry long limit:7 RTS thr:off Fragment thr:off
Power Management:off
Link Quality=70/70 Signal level=-39 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:45 Invalid misc:190 Missed beacon:0


Notes on motherboard sensors, temps:


check if lm-sensors is installed. if not:
$ sudo apt-get install lm-sensors
or install from synaptic/aptitude
$ sudo sensors-detect

followed directions at web page
got results!
not sure what to do with them...
but everything looks cool enough except for the group
returning 200+C; suspect their scaling factors are borked since nothing is
boiling as far as I can tell


useful information?:
# sensors-detect
Intel digital thermal sensor... Success!
(driver `coretemp')

Client found at address 0x4b
Probing for `National Semiconductor LM75'... Success!
(confidence 3, driver `lm75')
Probing for `National Semiconductor LM75A'... No
Probing for `Dallas Semiconductor DS75'... Success!
(confidence 3, driver `lm75')
Probing for `National Semiconductor LM77'... Success!
(confidence 3, driver `lm77')

Client found at address 0x4c
Probing for `National Semiconductor LM75'... Success!
(confidence 3, driver `lm75')
Probing for `National Semiconductor LM75A'... No
Probing for `Dallas Semiconductor DS75'... Success!
(confidence 3, driver `lm75')

Client found at address 0x4e
Probing for `National Semiconductor LM75'... Success!
(confidence 3, driver `lm75')
Probing for `National Semiconductor LM75A'... No
Probing for `Dallas Semiconductor DS75'... Success!
(confidence 3, driver `lm75')


root@machine:/home/pseudonym# sensors
Adapter: ISA adapter
Physical id 0: +56.0°C (high = +86.0°C, crit = +100.0°C)
Core 0: +56.0°C (high = +86.0°C, crit = +100.0°C)
Core 1: +55.0°C (high = +86.0°C, crit = +100.0°C)


Adapter: ISA adapter
Exhaust : 1997 RPM (min = 2000 RPM, max = 6500 RPM)
TB0T: +32.5°C # Enclosure Bottom 0 / [Battery TS_MAX Temp]
TB1T: +32.5°C # Enclosure Bottom 1 / [Battery TS1 Temp]
TB2T: +31.0°C # Enclosure Bottom 3 / [Battery TS2 Temp]
TC0C: +51.8°C
TC0D: +50.8°C # [ CPU 0 Die Temp ]
TC0E: +53.8°C # ? CPU ?
TC0F: +55.5°C # ? CPU ?
TC0P: +47.8°C # [ CPU proximity ]
TC1C: +48.0°C # CPU ?
TC2C: +48.0°C # CPU ?
TCGC: +48.0°C # GPU ?
TCSA: +49.0°C
TH0F: +249.0°C
TH0J: +249.0°C
TH0O: +249.0°C
TH0o: +28.0°C
THSP: +48.2°C
TM0P: +47.2°C # Memory Bank A1
TPCD: +57.0°C
Ta0P: +50.8°C # Ambient
Th1H: +34.5°C # Heatsink
Tm0P: +48.8°C # Memory Controller
Tm1P: +51.2°C # Memory Controller
Ts0P: +29.0°C # Palm Rest Temp


[ codes looked up in ubuntu macbookair 4,1 monster thread--recent if not especially authoritative ]

As you can see, lm-sensors finds lots of temperature readings but unless you know exactly what each code means, discerning what they are is not always easy. I have looked for a straightforward list of sensor codes but have yet to find one. I do not know if these are particular to Apple–or even particular to the MBA 4,1–or if these codes are at all standardized. If someone else can enlighten us, please do so in the comments!

Dual Booting Crunchbang Linux and OS X Lion on a MacBook Air 4,1



[teel, dear:
I usually prefer doing things the hardest way possible, especially since ‘easy’ usually involves a kludge of one kind or another.]

For reasons that are obscure and interesting only to myself and possibly other ambivalent OS X users who may not be eager to give up their rights to use their devices the way they want to, a few weeks ago a bee entered my bonnet and refused to leave until I got one of my Macs dual-booting into one of the “minimalist” Linux distros. Although my eventual obsession is still unsatisfied–to dual boot my iMac, leaving the current OS X system alone except for trimming it down as much as possible–I did reach an intermediate goal last week: dual-booting the MacBook Air that does not hold much crucial data first, to see how possible and how tricky such a thing might be.

I decided on crunchbang (#!) Linux after considering Arch and Slackware and deciding that maybe I should go with a slightly less DIY distribution so that I could keep the number of mysteries down to a manageable number at least until I knew a little more about the processes required to get an EFI-loading Mac to boot into Linux at all.

I have used crunchbang for several months on a weak-willed little netbook, and it does quite well with it, or at least way better than it did under Ubuntu. But then, Ubuntu was my First Linux, and so I did get a little carried away with all the free software and tried to install pretty much everything on that puny little netbook, until it began to freeze with every movement of the cursor or click of the mouse.

But that is another story. I ended up wiping the netbook drive and putting crunchbang on it and I like using it quite a bit. crunchbang is based on Debian, so there is a ton of support available at various websites and many, many pages on the internet detailing how to do almost everything.

crunchbang itself has been for me a perfect “intermediate” Linux distro. It tends to work well out of the box on most machines, but much configuration is still done by editing config files rather than using GUI tools, and it does not come with wizards or even much instruction on what to do once you see the desktop. However, it does give you a desktop to start with, so it might only be mildly frightening to anyone uncomfortable with the command line.

To find out how to do most things on crunchbang it is necessary to consult the internet. But the crunchbang user forums are notoriously friendly and I can say that I have been able to find almost everything I have needed for day-to-day operation either there or at I am old, and used to reading linearly-organized manuals to find out how things work, but this modern business of googling everything is beginning to charm me quite a bit. A hunt for information can keep me entertained all day, and discovering which search terms will get me what I want is at least half of the fun in my universe.

And so I undertook to find out a bit more about my computer than how to change my window theme. This, then, is my account of How I Did It, offered in the hope that it might be useful to others.


So the current going options for booting an EFI-based Mac into Linux appear to be three:

1. Create a hybrid Master Boot Record (MBR) on the EFI partition and use BIOS like in the old days;

2. Install rEFIt or rEFInd to mediate between Apple’s EFI boot manager and whatever bootloader one decides to use for their Linux installation. I think one can go either to EFI or BIOS from there, but either way I did not like this solution aesthetically.

3. Since aesthetics is generally my guide when there are no particularly compelling and outstanding ethical issues–and I took care of those mainly by choosing a Debian distro–I followed my nose and went looking for ways to make the Apple’s native EFI boot manager talk directly to an EFI-enabled boot loader on the Linux side.

Number three is the least straightforward way to go, but it leaves you with the most straightforward boot process. I think maybe all my years with Apple hardware have allowed a certain minimalist design fascism to take root in my brain, so I cannot stand to employ even one more component than I think I should need, and I will persevere(ate?) until either I get what I want or I cry myself to sleep from exhaustion. I try to keep this tendency of mine on a short leash, but when there are no harmful consequences to be had, it can be fun to let it dictate how I spend my time.

For a little while. Well, it only took five days, which is not that bad I guess except that I am disabled and do not have a day job and so those five days were pretty much dedicated to eating, sleeping, visiting the bathroom, and trying to get my MacBook Air to boot into crunchbang. And feeding the cats, of course. And putting my feet up when one of them wanted a lap. And scooping out their litter boxes. And pulling together my end-of-the-month pennies to get them a couple more cans of wet food.

But you sorta get the picture maybe.


Rather than detail the process from start to finish (my install log is up to 5100 words and still going and lacks a narrative arc) I am going to copy and paste the successful parts. Or the successful parts so far. So be aware of these two things:

1. This is not a procedure that I have tested all in one grand swoop yet; it is a procedure that I have worked out from my very circuitous experience. It could be tested. I considered testing it. But once I achieved my main goal of booting into crunchbang without rEFIt/rEFInd or BIOS, I could not bring myself to wipe the install and confirm the process as a procedure. But: I did wipe the Linux partition and start all over just before the install that worked, and I did approximately the same things I had done before. Until I came to those places where I needed to do something different, of course.

2. I still have some issues to resolve. I did get my right-click working the next day. My wifi card is still not showing up in Network Manager but I have not looked very far for it yet. I have not optimized graphics performance. My biggest problem now is that I think the machine runs hot under crunchbang, but finding a way to get readings from the hardware sensors to see if that is really the case is proving challenging.

This, then, is approximately what I expect I could do again to do it again:

Back up everything interesting on the MacBook Air, of course! And after trashing a bunch of old unused files.

Create a Recovery HD image for OS X Lion on a USB key. Apple offers a software tool for this and instructions on how to use it:

Note: my hard drive was encrypted and this interfered with the function of the Recovery HD image. Because I was in a hurry to see if I could get crunchbang to work, I unencrypted my disk and went from there. If I ever plan to leave the house with my computer again, I will look into re-encrypting it.


General information about UEFI and its commercial hardware implementations:

Information specific to running Linux on the MacBook family of machines:

Successful EFI boot mode installs on MacBooks:

A MacBook Air 4,2 install of Debian:
Practical link: provides concrete steps to follow

A Debian install on MacBook Air 5,1, written in both French and English:
Not much different from the above link, but shored my belief that this could be done.

Debian EFI boot mode on a Macbook Pro:
This link showed me the light, dropped the scales from my eyes, and pointed out that the grub-install script is a crucial component in installing grub. Heh.

All those empty spots that haven’t been filled in yet:

I kept noticing that when I needed to do some intricate command line task that I really did not quite understand, Googling the subject invariably brought up links to this site. So I link the index page here. These are the pages I found most useful myself:
Tools for partitioning disks that use a GUID Partition Table
Which EFI bootloader do I want to use?
Ubuntu install with rEFInd, but also good partitioning guidance


Downloaded here:

I copied the .iso image using dd in OS X:

First show locally mounted disks to determine identifier for USB key

$ df -hl

This shows filesystems and their names; useful if you have a bazillion devices mounted. My USB partition was /dev/disk2s1

Unmount USB partition(s)
I just used Disk Utility to do this. Choose the partition in the left pane, click ‘Unmount’.

Then in terminal, write the image to the unmounted partition:

$ sudo dd if=crunchbang-11-20130119-amd64.iso of=/dev/disk2 bs=4194304; sync

wait a little while. For me, this returned:

187+1 records in
187+1 records out
787480576 bytes transferred in 347.709451 secs (2264766 bytes/sec)

Note: I originally used “4M” for the bs flag in dd, ie, bs=4M
But that returned ‘bs: illegal numeric value’, so I converted the figure to bytes, geekily using powers of 2 to get the fancier number. That made it happier.

Note note: Commenter Johnny points out two points that make using dd a little faster and possibly less annoying: to avoid the ‘bs: illegal numeric value’ error, make that ‘4M’ (upper case ‘M’) a ‘4m’ (lower case ‘m’)  unless you enjoy typing in long numbers that may or may not be elegant depending on your definition or elegance. And in fact ’16m’ will probably work fine on most current USB keys.

The other point: identifying the disk you are writing to as ‘rdisk’ instead of just ‘disk’ will speed things up quite a bit. That is, if you are writing to disk2, for instance, use something like ‘of=/dev/rdisk2’. I have used this before and it is much more efficient. Something about raw disk pointers, but other than recognizing what ‘raw’ and ‘pointer’ mean, I don’t know precisely how this works. But it does! The day it fails I will probably look it up in some greater detail.


It’s partitioning, so back up everything you would cry about if you lost it. I resized my OS X partition twice without incident, but there are no guarantees!

You can resize the OS X partition using Disk Utility:

Highlight the target drive.
It can in fact be your current startup drive!

Click the “Partition” button above the right pane.
This button only appears when you have chosen the whole drive.
If you have highlighted a partition, rather than the whole disk, you won’t see it.

Your OS X partition will be shown with a shaded portion representing existing data.
If this partition has those three diagonal lines in the bottom right corner, then you can resize it. If it does not, you might have an encrypted drive. Me I had already unencrypted mine. See above.

Click and drag on that corner to resize the partition.
Highlighting a partition will tell you its size. Highlighting the new, emerging partition will tell you size of space you are proposing to free up.

You can add however many partitions you want here, which may be a little easier than waiting until you are on the command line, where you are headed anyway. Or you can write your changes to disk without doing much more to the new partition. This is what I did:

Left about 18GB data-free space on the OS X partition
Chose MS_DOS(FAT) as the format for the new partition

Make sure that when you click the “Options…” button that “GUID Partition Table” is chosen. If you have OS X on the disk already, it should be already. I checked anyway. Several times.

Name the partitions in such a way that you will remember what you were planning to do with them when you see a partition map on the terminal. Or not. Live life on the edge if you like.

When you have things how you want them, click “Apply”.

Hold your breath if you have found that this appeases the partition gods.

Using GPT fdisk tools to reliably divvy up and label your new partition(s)

As outlined at, the GPT fdisk tools will create partitions on GPT disks such that the partition boundaries will line up properly with the data boundaries on the disk. This is better, but if you need more precise reasons to do this and they are not already clear in any of the above links, bug me and I will try to find the relevant links in my browser history.

A link to download GPT fdisk tools is here:

They will install and run on Linux, FreeBSD, Mac OS X, and Windows.

gdisk and cgdisk are similar. I used both of them at different times, but prefer cgdisk. If you need your hand held a bit more tightly or need protection from yourself when trying to destroy hard drive data, it may feel more comfortable than gdisk. I like cgdisk because it displays all of the commonly-used commands in a menu at the bottom of the screen, and that helps me not to have to keep calling up a command list because my short-term memory gave out long ago and to me ‘delete’ and ‘erase’ are not distinct but only one of them will do anything in gdisk or cgdisk.

You can find an outstanding guide to using cgdisk by visiting
It’s flawless. Just follow the instructions; they are way better than anything I would try to write here.

For reference, this is what my screen displayed just before I told cgdisk to write my changes to disk:

Part. #     Size     Partition Type               Partition Name
           3.0 KiB   free space
1        200.0 MiB   EFI System                   EFI system partition
2         83.6 GiB   Apple HFS/HFS+               littleBlackHat
3        619.9 MiB   Apple boot                   Recovery HD
         128.0 MiB   free space
5          8.0 GiB   Linux filesystem             linux
         128.0 MiB   free space
6         20.4 GiB   Microsoft basic              data share

As you can see, I left 128MB of space around the new partitions. It is said by many that Apple hardware really likes it when you do this, but I did note that Apple themselves left no space between their partitions. Nonetheless, as a gesture to the Apple gods, I put those spaces in, because I was tired of googling for accurate info and figured I could sacrifice the space for good luck.

The EFI partition and the Apple partitions were already there. Leaving them alone is the best way to not disturb them.


The main idea here is to install crunchbang without installing the version of grub that the installer will choose for you. After that, I boot up from the LiveUSB image and then chroot into my new system and install grub-efi-amd64. Then comes some fancy footwork on the command line that will place an .efi target on the existing system EFI partition so that it appears as a startup disk choice when you boot with the Option key held down.

That is basically what is going on here:
but I changed a few things and actually forgot some steps but it worked anyway so I did not have to go through all this one more time. I will detail what I did. I may or may not know precisely why or how any particular step works the way it does, but I have many more hunches now than I did last week at this time, so feel free to ask!


Power off MacBook Air
Insert USB with #! Waldorf image [“#!LiveUSB” is what I am calling it]
While holding down the Option key, press the Power button

After a few seconds, you will see a screen that offers you a choice of what system to boot. Mine labeled the #!LiveUSB as “Windows” and its icon was a generic yellow USB drive icon. I was also offered my existing OS X system and the Recovery HD, which exists to help you to reinstall OS X Lion if something gets borked. I chose Windows even though normally I would not.

You can also connect to your wireless network while on this screen, but my MacBook Air has never played will with my Netgear wireless router, and I guess they weren’t speaking to each other just then, because the little wheel kept spinning but I was never able to connect. So I plugged in a USB to Ethernet adapter when I needed internet outside of OS X.

When the crunchbang Live menu appears–as it has for me perfectly everytime I have booted the #!LiveUSB–choose “Install”.

Note: the trackpad did not work throughout the Install process, but:

Arrow keys will move the cursor through possible choices
‘Esc’ will go back to the last screen
‘Enter’ aka ‘Return’ will accept whatever changes you made on that screen and advance to the next.

Follow the prompts (language, keyboard, hostname–these you can set however you want) until you reach the screen where it asks you about choosing and partitioning your disk drive.

Choose “Manual”

If you have not manually partitioned a for a Linux install before, this can look a little intimidating, but if you got through the cgdisk procedures, you will do fine. These are very similar. Also, as with cgdisk, you can fiddle with your partitioning scheme for days if you want. All your changes are stored; nothing happens to your disk until you tell the installer to go ahead and write the partitions, and it gives you fair warning.

I put the whole crunchbang installation on one 8GB partition to keep things simple and so setting up my partitions was also relatively simple:

Choose 8GB partition
Mount as: / [root, in other words]
Format: ext4
Bootable: Yes
Name: someCoolName

I did not create a swap partition after having read repeatedly that with 4GB or more of RAM it is not necessary. And it is also written that solid state hard drives do weird stuff with swap partitions.

If you do not create a swap partition, the installer will ask if you meant to do that and prompt you to go back to the partitioning menu. You may politely turn it down and move on.

Once you have allowed the installer to write your partitions to disk, you can continue until it asks you where to install the grub boot loader. It does not immediately give you the choice not to install it at all, but if you press ‘Esc’ it will take you to a scrolling menu of install steps. Skip over those having to do with any sort of boot loader, then choose the following step and press ‘Enter’. Unfortunately, I cannot find in my notes what step is next on the list, but all I knew then was that I wanted to skip the boot loader installation, and it was clear at the time how to do that.

Then just finish up the installation according to your own lights, and then shut down to proceed.


This is the tricky part, but also the fun part. I installed grub-efi-amd64_1.99-27 after downloading the necessary .deb files directly from a Debian package mirror.

Otherwise, crunchbang will try to install an earlier version, and since this package is still evolving, I wanted the latest I could get. The earlier version might work for all I know, but somewhere in the middle of multiple failures I decided to grab the newest one and so that is what I worked with from that point on.

grub-efi-amd64_1.99-27 is mostly installation scripts as far as I can tell, and it depends on several packages that will not be installed on crunchbang by default, so I downloaded those, too.

The dependency chain–and thus install order–is:
efibootmgr [not kfreebsd-amd64]
grub-common (= 1.99-27)
grub-efi-amd64-bin (= 1.99-27)
grub2-common (= 1.99-27)
grub-efi-amd64 (= 1.99-27)

I put those on a FAT-32 USB stick. Mounting it was also tricky but fun.

But first:

Boot into #!LiveUSB to modify your new crunchbang system

With #!LiveUSB inserted, hold ‘Option’ while powering up.
Choose the #!LiveUSB (“Windows”, in my case) as startup disk.
Choose “Live Session” from menu.

You will need internet for the first bit of work, so plug ethernet in if that is where your internet comes from.

You start inside the #!LiveUSB system, but you want to work in your newly installed system.
chroot can help you with this. I have cribbed this procedure from xaos52’s most excellent post:
I reproduce parts of it here for some small convenience.

You first need to look for the location of your new crunchbang install. You can open GParted to see this easily, or you can deduce it by thumbing through:

$ ls /dev

If you open GParted, it is a good idea to note where the system EFI partition is, too. Most likely it will be sda1, but computers are devious beasts!

Once you know, you can

Use chroot to work from inside your new crunchbang install:

Prepare the target. A number of directories in the system you booted into need to be “forwarded” to your new crunchbang install in order for it to function correctly after you have chroot’ed into it. You will also be working as root for some time, so have your wits about you to whatever extent your existing data is important to you.
Remember also to replace the [x]–brackets and all–in sda[x] with the correct number for your new system partition–i.e., /media/sda5 if you installed to sda5.

$ sudo su
# TARGET=/media/sda[x]
# mkdir -p $TARGET
# mount /dev/sda[x] $TARGET
# mount --bind /dev $TARGET/dev
# mount --bind /dev/pts $TARGET/dev/pts
# mount --bind /proc $TARGET/proc
# mount --bind /sys $TARGET/sys
# cp /etc/resolv.conf $TARGET/etc/

Then chroot into your new system:

chroot $TARGET /bin/bash

From here, my procedure is synthesized using the ideas at

Some of the instructions are lifted directly from one or the other of them, and it is worth looking over what they each do to get an idea of what you might need to do.

Update, upgrade, and install a couple of utilities

Since you are now “inside” your new installation of crunchbang, and its root directory is your working root directory, it is a good time to

# apt-get update
# apt-get upgrade

These will also help you with setting up your .efi target:

# apt-get install hfsprogs icnsutils

Mount the USB key with grub-efi-amd64 packages inside of the new system

Make a place to mount the USB holding the grub packages:

# mkdir -p /target/usb

Now you need to go back to the #!LiveUSB system to fetch the USB:


Drops you back out of chroot.

Mount the USB stick inside your new system
(mine is called “rentMe”; replace that with whatever name of yours shows up in /media with:
$ ls /media) :

# mount --bind /media/rentMe/ /media/sda5/target/usb

Return to your new install:

# chroot $TARGET /bin/bash

Mount the system EFI partition inside your new system and install grub-efi-amd64

An fstab entry for the system EFI partition will help with mounting it later:

# echo $(blkid -o export -s UUID /dev/sda1) /boot/efi auto defaults 0 0 >> /etc/fstab

Then mount it:

# mkdir /boot/efi
# mount /boot/efi

Tell your kernel what the EFI variables are:

# modprobe efivars

This gave me the error

efivars: Unknown symbol efi_enabled_facility (err 0)

but still seemed to work ok. If you skip this step, the install of grub-efi-amd64 could fail.

Install grub-efi-amd64 from /target/usb in depency chain order:

# dpkg --install /target/usb/efibootmgr_0.5.4-3_amd64.deb
# dpkg --install /target/usb/grub-common_1.99-27_amd64.deb
# dpkg --install /target/usb/grub-efi-amd64-bin_1.99-27_amd64.deb
# dpkg --install /target/usb/grub2-common_1.99-27_amd64.deb
# dpkg --install /target/usb/grub-efi-amd64_1.99-27_amd64.deb

Edit /usr/sbin/grub-install:

Look for « xfat »
and remove the block of code that looks like:

if test "x$efi_fs" = xfat; then :; else
    echo "${efidir} doesn't look like an EFI partition." 1>&2

Run grub-install:

# /usr/sbin/grub-install

Now copy /boot/efi/EFI/debian/grubx64.efi to a spot where the system EFI will find it:

# mkdir -p /boot/efi/System/Library/CoreServices
# cp /boot/efi/EFI/debian/grubx64.efi /boot/efi/System/Library/CoreServices/boot.efi

Consider the consequences of trusting the wisdom of fools

This is where
details steps to bless the boot.efi file, but I was so excited to see grubx64.efi actually appear where it was said to appear–I had been looking for it in vain for over 48 hours–I skipped right past them and backed out of the fresh install to the LiveUSB, shut down and rebooted. I only realized I had done this after I was booted into my new, working MacBook Air crunchbang system! At least one other person has commented on that page that no blessing is needed, so I dunno if it does something crucial that I am missing, or not. If you have not yet looked at that page, now might be a very good moment to take a break and then visit to decide for yourself whether you want to rely on my dumb luck.

You can also stop and put a distinctive icon on the EFI target if you don’t want to see a generic hard drive icon:

# rsvg-convert -w 128 -h 128 -o /tmp/icon.png /usr/share/icons/gnome/scalable/debian-swirl.svg
                                              [or /path/to/some/other/image/file.svg]
# png2icns /boot/efi/.VolumeIcon.icns /tmp/debian.png
# rm /tmp/debian.png

Back out to the #!LiveUSB and unmount everything you mounted however long ago it was:



Checking the value of $TARGET is a good idea:


If it is still assigned /media/sda[x], then

# umount -l $TARGET/dev/pts
# umount -l $TARGET/dev
# umount -l $TARGET/sys
# umount -l $TARGET/proc

And also

# umount -l $TARGET/target/usb

Now you can shut down the #!LiveUSB session and shut down.

Praying to whatever beings you find to be congenial to technological issues certainly cannot hurt.


If all went well and the wind is from the west and the moon either waxing or full you should be able to remove the #!LiveUSB now and boot into the crunchbang system on your hard drive.

To do this you will still need to hold the ‘Option’ key down while booting. This takes you to the EFI boot manager’s startup disk menu; otherwise you will boot directly into OS X.

My crunchbang system shows up on that menu as ‘EFI boot’; if you put a custom icon on it before restarting, that should also appear, rather than OS X’s generic hard drive icon. Choose it, hit ‘Enter’, and look on breathlessly as crunchbang Linux puts itself together on your Mac.

The crunchbang welcome script will lead you through a few more steps to customize your install. The only difference is that updating your repository locations and then upgrading your system should not take very long at all, since you already did that before installing the grub EFI bootloader.

One more caveat: when I try to do a system-wide upgrade using apt-get, it defaults to trying to DOWNGRADE grub-efi-amd64. Just be aware of that. There is at least one way to tell it not do that, but I have not yet investigated it, or any others, to the point that I am comfortable upgrading with apt-get. Synaptic is installed by default in crunchbang, though, and allows you to control exactly what gets installed by checking and un-checking boxes, so for now I am using that to get packages needed to tweak my installation.

That is all for now! Hope this was useful in some way!