MacBook and Linux: Beauty and the Beast
[ Sunday, 17 June 2007, riklaunim ]
MacBook and MacBook Pro are the new powerful laptops from Apple that use Intel processors instead of PowerPC ones. When you buy a MacBook you get OS X Tiger pre-installed on it. But, you can still install GNU/Linux on this beautiful box. If you want to know how, read on the article.
MacBooks and other Apple computers don’t use BIOS that can be found on regular PCs, but a custom solution called EFI. This involves using one extra partition that contains data required to boot the system. EFI makes Linux installs bit harder. We are limited to four partitions, and two of them already in use, so we have to carefully plan new partitions. Apple laptops are quite popular and have a good reputation among Linux hackers. Thus, Linux support for MacBooks is rather good, and it constantly improves. It can be guessed that withing a year or two Macbooks will be the bet supported laptops to run Linux on them.
About the hardware
![]()
Pic 1. rEFIt
(picture from keshi.org)
I’ve used a MacBook Pro with a 15,4″ display. This model comes with the following hardware:
- CPU — Intel Core 2 Duo 2,16 GHz
- Memory — 1 GB RAM
- Hard Drive — 120 GB
- CD/DVD Drive — SuperDrive (DVD+R DL/DVD+/-RW/CD-RW)
- Interfaces — 1 x FireWire 400, 1 x FireWire 800, 2x USB 2.0, Expreass-Card/34
- Ethernet card — Marvel Yukon E8053 10/100/1000BASE-T Gigabit Ethernet
- WiFi — AirPort Extreme 54Mb/s (802.11g) [Atheros]; Bluetooth 2.0+EDR built-in
- Graphic card — ATI Mobility Radeon X1600 (MacBook - Intel GMA 950, new MacBooks Pro have nVidia card)
- Other — iSight video camera
The laptop looks very nice and solid. PC users will find a bit different keyboard that needs some time to get used to however.
Linux support
- There is no problem with basic support for MacBooks – Linux will run on them.
- MacBooks Pro use ATI (now nVidia) graphics cards which do not have open drivers (yet?).
- Sound works in general, however in my tests it worked only on PCLinuxOS out of the box.
- Ethernet works on newer kernels. Marvel has even a kernel 2.4 module for it.
- WiFi is based on Atheros chipset. In the “Pro” version the chipset is newer and Linux support isn’t stable yet – you need a development version of
madwifi-ng - ACPI works, hibernate can be set up but it needs some work and a fresh version of kernel and X.org
In my tests I used four LiveCDs: PCLinuxOS 2007, Fedora 7 KDE LiveCD, Ubuntu 7.05 Frywolny Fulmar (Polish version of 7.04) and MEPIS 6.5 64 bit. First Place goes to PCLinuxOS as it was the only distribution that supported the sound card. It also found iSight camera (taking it for a scanner :P). Second place goes to MEPIS and Fedora – no sound on them out of the box. Last place goes to Ubuntu as it couldn’t start the X server. The error message was a bit odd, and it looked like X.org didn’t have a vesa driver. All of them use GRUB to boot the system. However, only on MEPIS keyboard was active in GRUB. Inactive keyboard is a known issue and it showed up in other tested distributions. None of them supported the WiFi card (no madwifi-ng) out of the box.
| Distribution | Description |
|---|---|
| PCLinuxOS 2007 |
|
| Mepis 6.5 64 bits |
|
| Fedora 7 KDE LiveCD |
|
| Ubuntu 7.05 Frywolny Fulmar (PL) |
|
How do you install Linux on MacBook?
If we want to really install the beast, first we need to resize the main partition from OS X. In Terminal execute:
diskutil list
You need to find the name of the second partition. It should be disk0s2. To resize it execute:
sudo diskutil resizeVolume disk0s2 40G
Where 40G is the size after resizing. Free space can be used by your distribution’s installer.
In order to install Linux on MacBook you have to install two applications on Mac OS X:
When you install rEFIt (boot manager like grub) you have to turn it on. In Terminal execute:
cd /efi/refit
./enable-always.sh
BootCamp can be used to create windows partitions, resize OS X main partition. rEFIt is a boot manager allowing you to choose a system to boot. It also allows to boot Linux from CD or DVD.
Some other notes to keep in mind:
- Do not install GRUB/Lilo in MBR, install it to
/dev/sdaXwith Linux only - Do not mount or alter the EFI partition (first one)
- You may encounter some problems with GRUB installation. Use the latest version of GRUB.
- The keyboard may be locked on GRUB screen. Set a time limit
- After the installation rEFIt may not see installed Linux – synchronize MBR in rEFIt menu.
In general, installing Linux on a MacBook is not recommended for a newbie. The support is improving but it’s nothing close to “ready for desktop” yet. If you are an advanced user, not afraid of the command line, you will easily get it to work. And it works great when all is set up!
In the net
- Gentoo Linux on Apple MacBook Pro Core2Duo
- Installing Gentoo on my MacBook
- Apple MacBook on Gentoo Wiki — a big one
- Ubuntu on MacBook
- Mactel-Linux.org
By the way, use Google ![]()
Subscribe to RSS feed for this article!
20 Comments
- A hyperlink: <a href="polishlinux.org">GNU/Linux for everyone!</a>,
- Strong text: <strong>Strong text</strong>,
- Italic text: <em>italic text</em>,
- Strike: <strike>
strike</strike>, - Code: <code>
printf("hello world");</code>, - Block quote: <blockquote>Block quote</blockquote>
















i came very close to buying a regular macbook for fedora7 use, but it seemed like support was lacking - i had read horror stories about the screen not working, the unusual keyboard and mouse/trackpad being a bit of a trial and the whole non-bios issue was horrible.
not to “diss” your review, but is it a bit simplistic if you’re just using livecd’s?
I actually got the sound to work on my Macbook using Ubuntu (v.6) live cd. It took me a while, but I realized the the audio was coming out the “Line In” port. Not sure what that did to me system…
@simo: He was simply using the live cd’s to test the distros before installing.
Many OSes have problems with USB-mounted keyboards during pre-load phases - I dual boot Windows at home, and if I cold shutdown Windows (or it crashes), my USB keyboard doesn’t work in GRUB or POST and I have to go hunt down a PS/2 to select Windows again so I can get my keyboard working.
I’ve had great luck with Ubuntu and MacBooks, on a more suggestive note.
Great combination!
ahah!
Anybody able to get past the ubuntu feisty fawn + vesa problem?
I was able to get the keyboard working in the boot loader only about 1/5th of the time by rebooting it until it worked. It seems completely random, and it is very annoying.
EFI is not a custom interface. It is a PC standard, just like the BIOS. It’s just new.
http://en.wikipedia.org/wiki/Extensible_Firmware_Interface
the tests are limited as I only had access to a MacBook in the shop
I have a black macbook 2ghz 120gb HDD 1Gb RAM dual boot with fedora 7 only the wireless and the isight didn’t work out of the box, i used the mad-wifi drivers for the wireless it’s working without any problems, i know there are drivers for the isigth i tell you guys later if that work.
“i came very close to buying a regular macbook for fedora7 use”
The MacBooks and the Pro’s are very expensive! I can’t see why you would buy one to run Linux on it. I hope you meant Fedora alongside OS X.
You’re rigth macbooks are exprensive but my other choice was a thinkpad T61 wich is more expensive than my macbook, i been using only fedora 6 for about a year in my desktop i want it to try osx and i put fedora just for the fun of it.
EFI is not a ‘custom solution’, it is the new firmware standard from Intel that is fairly widely used in servers, all Itaniums, and some desktops.
The graphics on all these machines _should_ be well supported by the binary drivers that are released by both ATI and Nvidia, and I believe that there are decent 2D/3D open source drivers for ATI, and there are definitely solid open source 2d drivers for nvidia cards. Did you even try the binary drivers?
Usually, X11 configuration needs some tweaking to get things to work. I don’t think I’ve ever installed a Linux distribution and been happy with X11 default configuration (even when it did work).
The only thing that your review tells me is that you are not really familiar enough with Linux to make things work properly, and that clearly Linux is needing some usability work to better cater for users like yourself. I am a long time Linux user, and probably don’t necessarily appreciate how esoteric Linux makes some aspects of system configuration, so please don’t take this as a criticism.
There appears to be excellent progress with improving X11, and within the next year, expect to see much better hardware detection/support. Have a look at the development plans on freedesktop.org for some more info.
EFI is not limited to 4 partitions. I think GPT allows 128. If it was, you really can only have a single OS per disk, since you need an EFI boot partition, a partition for the root file system, and a partition for swap at minimum (and on Itanium boxes, I always have a separate partition for user apps, and home directories). There would be no point in switching to EFI, if there was this type of technological regression.
You don’t need an “EFI boot partition”. EFI will boot from any common filesystem, like hfs+ (I do it every day). It’s just some arcane requirement Intel came up with. I guess it’s for future use. Apple doesn’t even use it.
Right about GPT having 128 possible partitions, but with Windows added, you also have an MBR record, and thus only four will work with that kind of dual-boot. (see my post down farther)
Expected out of the box for new hardware (expecially if you using a Santa Rosa MacBook Pro) shouldn’t be expected in Linux. I like to see people trying Linux on MacBooks though. My First Gen MacBook will have most distros install on it with only a handful of tiny problems. This may not be the best test in my humble opinion of the value of a distro unless you’re absolutely never used a command line before.
Also of note, rEFIt or BootCamp.
EFI is an open standard. Anyone can implement it.
http://www.intel.com/technology/efi/main_specification.htm
But I am not aware of any stable/mature opensource implementations…
Hi,
did you actually test with the NEW macbooks? The santa-rosa/nvidia macbooks?
You say sound and acpi works with pclinuxOS. The current semi-official status is, that the most recent alsa does not fully work(VERY quiet by default, speaker+mic with tweaking, see my homepage). The suspend2ram does not fully recover. The display stays black and vbetool doesn’t help, maybe a problem with display brightness(for which there is not driver yet).
So if you really get this working on the santa-rosa macbooks, tell us how.
I tested “old” with ATI. When they get new MacBooks and have some time they’ll told me that they let me know and I’ll do some more tests, but probably not a install, just LiveCD…
What about the special version of Elive for MacBooks computers ? is not on the list
http://elivecd.org/gb/Download/MacBook/
Hey, is there a linux snob that can help me figure out how to get more than 4 partitions on a macbook pro, triple booting PCLinuxOS, OSX, and windows xp?
I have Mac OSX, SimplyMEPIS 6.5, and Windows XP all booting wonderfully on a MacBook. I did not get similar results in my MEPIS testing. My graphics and sound worked wonderfully. However, the keyboard works only about a third of the time in Grub (not an issue for me: I use rEFIt to boot to one of the three OSs in EFI, so I only need Grub to get to MEPIS). Wireless can be worked out with MadWifi, so it’s not too big of an issue.
Oh, and don’t use BootCamp. rEFIt is so much better.
David, there is not any way you can have more than 4 partitions and still run Windows. Microsoft OSs cannot handle more than that (which is why it sucks). You can triple boot with Linux this way:
Clone your Mac partition to an external hdd (Mac OS will not install, but will run on a Microsoft partition scheme [MBR]). Wipe the MacBook’s hdd. Boot to the Apple recovery/install CD. Use the Disk Manager to parition as such: 1-dos (for Windows), 2-dos (for Linux), 3-dos (only a couple of GB for swap), 4-Mac journaled (hfs+). Instal Mac OSX on the 4th partition. Install rEFIt on the Mac partition so EFI will boot into the rEFIt graphic OS selector from now on. Reboot to the Linux CD and run GParted or some similar partition editing software. Make the first partition NTFS, the second ext3, the third one swap, and leave the hfs+ partition alone!!! Very imperative!!! Now install linux on the ext3 partition and enable the swap partition. Reboot and install Windows on the first partition (imperative because the MBR partition scheme requires NTFS or FAT32 as the first partition to install the record on). You should now be set with triple-boot. rEFIt should automatically detect all three OSs.
If you want to share files, there are drivers for Mac and Windows to read and write ext3 files, and most Linux distros can now read and write to NTFS and read hfs+.
Have fun! and back up your stuff first.
Oh yeah, and make sure you clone Mac OSX back to the hfs+ partition right before installing rEFIt by booting to the external disk. I forgot about that.