OpenSUSE 12.1 on a 2011 MacBook Air
There are not a lot of guides out there on how to install OpenSUSE on any Mac. And the few guides that I’ve found on installing other Linux flavors on the MacBookAir4,2 (which is how the 2011 MBA identifies itself with dmidecode) are all incorrect in many subtle ways. So I figured I should write my own. This one is targeting the somewhat experienced Linux person. Installing Linux on a Mac may not be something a complete beginner should try. So in several of the steps I am not trying to give you every little detail and command option as I am assuming you know how to use dd or how to find out which device your USB stick shows up under…
First you need to decide whether you want to keep MacOS around. It’s easy enough to do – just shrink the Mac partition using disk utility and create a FAT partition in the free space – that’s the partition you will then later replace during the install.
While booted into MacOS, install rEFIt on your MBA. This will take two reboots before it works, but then you should get the boot manager at start.
Next, ignore all the guides showing you various scripts to create bootable USB sticks for the Mac. They all try to use some sort of FAT partition and that does not work. All it takes is to dd the iso image of one of the install CDs (I chose the Gnome Live Image) onto a USB stick. Reboot your MBA and rEFIt should show you the USB stick as one bootable device (USB sticks get a strange rectangular orange badge on their logo – not sure how that is intuitive).
On the boot screen pick Installation and type nomodeset into the line for additional boot arguments; this will avoid using the Intel gfx mode setting in the install kernel which doesn’t play well with the MBA – instead it will run in VESA 1024×768 mode which is fine for installation. Hit return and after a short while you should see the graphical installer start.
Install as usual; if you decided to go for dual boot be careful with the partitioner. For me the default suggestion included reformating /dev/sda1, the EFI partition. Probably a bad idea. But you can simply pick Create Partition Setup and then chose the partition that you want to replace (the FAT partition we created earlier). And then everything seems to work smoothly. I first tried btrfs but sadly with the new kernel we’ll build in a moment that hung my computer twice – so I reinstalled with ext4. I decided to go with an LVM based solution that encrypts data on disk – that seems to be the sane approach. YaST for some reason decided to leave most of the space unused and created only a 20G root filesystem and a rather small 2G swap volume. So I manually expanded those to more reasonable values (6G of swap as I often use virtual machines and all the rest of the space for the root filesystem as I don’t want a separate home partition).
The install runs fairly smoothly after that. One hickup is that after the first reboot you can’t pick nomodeset – so you get broken graphics. Simply ignore this – YaST will start in text mode and finish the installation. After that you can reboot and once again type in nomodeset and have working graphics.
Next we need to install some packages and get you the latest kernel. Connect to your wireless network, start YaST and install at least git, gcc and make plus gsynaptics (for the touchpad).
Get the latest kernel. Right now this means top-of-git as even 3.1 is too old (you need changes that were added during the merge window). As this guide ages you can take 3.1-rcX or a later kernel.
git clone \
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Linus created a fairly cut down kernel config that I edited a bit more and which seems to work well so far – I haven’t played with all the devices (bluetooth, camera, etc), but the basics are there. Feel free to download that kernel.config, copy it to linux/.config and run make oldconfig – you should be able to use it as a starting point for your configuration.
Build the kernel, install it and its modules:
make
sudo make modules install
sudo make install
Edit the /boot/grub/menu.lst file to remove the vga= entry at the end of the kernel boot parameters, make item 0 (the new kernel) the default and reboot. You now should have a full resolution display and get rewarded with the full Gnome 3 experience (I still am not a huge fan of Gnome 3, but I told myself I just need to give it more time).
Login, open a terminal and setup sound.
alsamixer -c0
It seems that by default the outputs are mutted. Curser right and then m to unmute. ESC to exit.
Open System Settings (in Gnome3, click on your name in the upper right corner) and select Mouse and Touchpad. Turn on the features you want (like two finger scrolling).
I personally don’t like having to press fn to get to a function key, so I added
echo 2 > /sys/module/hid_apple/parameters/fnmode
to /etc/rc.d/boot.local which gives you function keys by default and special keys by pressing the fn key. The mapping for the special keys is still wrong (need to figure out how to fix that), but it’s just a few minor changes: F12 still gives you Eject even though there’s no optical drive, the volume keys are just one to the left of the labels, the screen brightness keys work, the others don’t seem to do much useful, yet. I definitely want to get the keyboard backlight keys to work.
I still don’t love the way the touchpad works (selecting text is a pain without real buttons, middle and right click are just weird, etc). I haven’t played with the webcam or bluetooth. But at this point I’d say the MacBook Air is functional with OpenSUSE. And it is a beautiful and very light machine…
Update: Linux-3.2-RC1 is out and it contains the changes needed to support the MBA, including the keyboard fix. I also updated the kernel .config file linked here to make it play nicer with the SUSE infrastructure (which really wants dm_mod to be a module) and to support kvm, tun/tap interfaces and ethernet bridges. We are getting there…
Comments(12)
Thanks for sharing! I hope this will give the Linux Desktop on a Laptop the uplift it needs for the coming next 10 years. Will the Desktop/Laptop really go away?
If you’re not comfortable with dd, the SUSE Studio people have written a simple GUI for getting the .iso onto the USB stick. Instructions are here:
http://en.opensuse.org/SDB:Live_USB_stick
Cool, I’m very interested to mba as an HQ ultrabook for Linux, so I’ve a couple of questions for you, is the wakeup as fast as in osx? what about the power consume?
Could you post some 3d and web (es v8 v5) benchmarks with both OSes?
http://grigio.org/10_resources_test_your_mobile_web_browser_buying_tablet
Did You enable touchegg to recornize the multitouch gestures? How many fingers does it recrnize?
https://code.google.com/p/touchegg/
Thanks for sharing
I’ll admit, I haven’t run any benchmarks (nor am I really likely to ever do that – why waste my time?). Wakeup is fast, battery life is decent (about 6h in my tests without much load – 3.5h if doing lots of kernel builds :-) )
And no, I definitely did not play with multitouch gestures. I dislike the multitouch behavior as it is – give me real buttons back…
the new EFI boot in OpenSUSE 12.1 wasn’t an option?
I installed openSUSE 12.1 as per the instructions. I love it. Boot time is < 17 sec from power on to login screen in KDE4.
But the FaceTime camera on my late 2011 MBA doesnt work.
I get the message:
libv4l2: error turning on stream: No space left on device.
Any ideas?
[...] a Mac that is a pure guess for me. I did find a nice write up that might be useful for you here: OpenSUSE 12.1 on a 2011 MacBook Air | Community Matters Thank You, Remember that little in Life is certain, including any advice you may get from me, [...]
This is what i did:
Install opensuse using th dd method
Install and configure grub efi, so the boot process is smoother and faster
Install the kernel 3.2 from the Tumbleweed repo, it works great
Install the broadcom-wl wifi driver.
Kernel 3.3 and 3.2 don’t allow broadcom-wl to compile manually:
unknown field ‘ndo_set_multicast_list’ specified in initializer
And, I can’t find a broadcom-wl package in tumbleweed, factory, or any other place I have tried for 3.2?
Looks like I’m not the only one having trouble finding a current 3.2.x kernel broadcom-wl match:
http://forums.opensuse.org/english/get-technical-help-here/tumbleweed/470989-packman-tumbleweed-will-fail.html
Any suggestions? I could use 3.1.9 and compile the touchpad support, etc. but I’d rather use 3.2.
Cheers,
Pete
I don’t use any external drivers – the brcmsmac in the upstream kernel works just fine. So I’m running whatever is Linus’ latest, at this time 3.3-rc3. But I had no problems running 3.2, either.
Well done, Dirk. I might have to try this some day. :-)
Hi,
This has been a great article for me. I have successfully installed openesuse 12.1 on my macbook air. I installed the most up to date kernel using YaST, the method above proved unsuccessful. This gave me full touchpad functionalitly.
However I seem stuck in 1024×768 resolution. Nothing I try will allow me to move to 1440×900. I’ve updated the xorg-X11-driver-video package tweaked xorg.conf.d to use better drivers (this just gets me logged in in text mode) all to no avail.
Would anyone have a suggestion as to where I am going wrong?
Thanks
es