http://polishlinux.org/reviews/macbook-and-linux-beauty-and-the-beast/
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
refit
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
maclinux
Pic 2. Linux on a MacBook Pro.
(picture from odi.ch)
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 |
Deion |
PCLinuxOS 2007 |
- Blocked keyboard in GRUB
- Sound, ACPI and X.org works fine
- iSight camera treated as a scanner
|
Mepis 6.5 64 bits |
- Keyboard works in GRUB
- ACPI, graphics works
- Sound doesn’t work
|
Fedora 7 KDE LiveCD |
- Blocked keyboard in GRUB
- ACPI, graphics works
- Sound doesn’t work
|
Ubuntu 7.05 Frywolny Fulmar (PL) |
- X.org doesn’t show up (lack of VESA driver?)
|
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/sdaX
with 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!