Installing Fedora 10 on a MacBook

This guide will help you through all the steps necessary for installing Fedora 10 on a MacBook Santa Rosa. This guide is currently aimed at Fedora 10 x86_64 but will also work on i386 version (adjust as necessary). Most of the steps equally apply to pre-Santa Rosa models too.

These instructions will work with the MacBook 3,1 (Late 2007) and newer but will NOT work with the new aluminium MacBooks since they have different hardware (especially the graphics card). These instructions are not suitable for the MacBook Pro either!!

This guide is based largely around my previous guide for Fedora 8, and again much credit goes to the people who created the original Ubuntu wiki guide.

What works and what doesn’t?

There are a few things that need fixing (covered in detail below) but the following all work “out of the box” with Fedora 10: video/graphics, compiz effects, firewire, CD/DVD reading and writing, function keys (brightness, volume etc), sound, and ethernet. Even the new “plymouth” graphical boot screen works fine once activated.

I have yet to try the infrared or connecting an external monitor. Everything else works with the tweaks described below, except for suspend and hibernate which seem generally pretty broken in F10 (as it was in F9 too). Update 7 November 2008: Suspend and hibernate are fixed with 2.6.27.7-134 kernel and newer. See bug report.

Basic installation instructions

If you’re new to installing Linux then these steps should help you. If you’re an old hand then skip below to view the post-installation steps necessary to fix the things that don’t “just work”.

  1. Update the MacBook firmware to the latest version. If you prefer, you may use the standard “Software Update” in OS X.
  2. Get your Fedora 10 installation DVD ready. Note: you should use the x86_64 version of Fedora 10 and that I have only tested this using the Install Media, not the Live DVD.
  3. Install rEFIt on OS X if you want a boot menu to select between OS X/Fedora to appear on every boot. This is highly recommended but optional – this guide assumes you have installed rEFIt. You can make Fedora boot by default and change the menu timeout by editing the “refit.conf” file (described on the rEFIt website).
  4. Use the OS X partition manager in Disk Utility to resize your OS X partition and make space for Fedora. On my 260GB hard drive, I shrank the OS X (hfs+) partition to 120GB to leave about 130GB for Fedora. Insert your Fedora 10 installation DVD in the drive and reboot.
  5. If you have rEFIt installed, then on boot you will be given the option to boot from the DVD, choose it. If you don’t have rEFIt installed, then hold down “C” to boot from the DVD.
  6. Install Fedora as usual, except:
    1. In the partitioner, select to manually edit partition table
    2. Create a 200MB boot partition with mountpoint ‘/boot’ (this will be /dev/sda3)
    3. Create a new ext3 partition with mountpoint ‘/’ – this will be your main Fedora partition on /dev/sda4. Make sure to leave 2GB free space after this partition for your swap partition
    4. With the remaining 2GB, create a linux swap partition – this will be /dev/sda5
  7. Finish the installation and reboot.
  8. If you installed rEFIt, you should have a choice between booting OS X and Linux. Use the arrow keys and Enter to select Linux.
  9. Log in to Fedora
  10. Follow the steps in the sections below to work around things that still do not work out-of-the-box in Fedora 10.

Post installation

Note: The wireless on the MacBook doesn’t work out of the box in Fedora, so you’re going to need an ethernet internet connection available until we get round to fixing the wireless later in this guide.

It is very important now to update your Fedora installation to the latest packages using yum. To do so:

su -
yum update

Once yum has finished updating, reboot, and then do a yum update again. Repeat this process until yum finds no more packages to update.

Fixing the wireless

The MacBook comes with a Broadcom 4328 wireless chipset. This is not supported by default in Fedora 10 and there are two options to make it work: using ndiswrapper and Windows drivers or using the new official Broadcom STA wireless driver. In this guide we will use the official Broadcom driver because it is easier and more reliable.

1) Enable the rpmfusion non-free repository.

The broadcom-wl and wl-kmod RPMs that we need are in the rpmfusion.org non-free repository which also requires the rpmfusion.org free repository. To enable these repos in Fedora simply do this:

su -c 'rpm -Uvh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm'

2) Update and install the driver package

Now that you have the appropriate repository enabled, to install the driver package we first ensure that we have the latest updates and then install the “broadcom-wl” package which will bring with it the required “kmod-wl” package:

su -
yum update
yum install broadcom-wl

That’s all there is to it. At this stage you may need to reboot in order to enable the new driver and any new kernel that was installed during the update. For more details or if you have any difficulties see this post.

When future kernels are released a simple “yum update” command should install the new kernel and also pull in the updated Broadcom driver for that new kernel.

Fixing the touchpad

(Thanks to bodom_lx for this tip)

The touchpad works out of the box but there is no way to right or middle click. Traditionally this was fixed by adding the appropriate options to /etc/X11/xorg.conf but the new xorg-server in F10 doesn’t use the traditional xorg.conf file. Instead it is configured through HAL fdi configuration files.

To create the appropriate file for configuring the touchpad:

su -
gedit /etc/hal/fdi/policy/appletouch.fdi

Copy and paste the following into the empty file:

<?xml version="1.0" encoding="ISO-8859-1"?>
<deviceinfo version="0.2">
  <device>
    <match key="info.capabilities" contains="input.touchpad">
      <match key="info.product" contains="appletouch">
        <merge key="input.x11_driver" type="string">synaptics</merge>
        <merge key="input.x11_options.SendCoreEvents" type="string">true</merge>
        <merge key="input.x11_options.HorizEdgeScroll" type="string">0</merge>
        <merge key="input.x11_options.VertEdgeScroll" type="string">0</merge>
        <merge key="input.x11_options.VertTwoFingerScroll" type="string">1</merge>
        <merge key="input.x11_options.HorizTwoFingerScroll" type="string">0</merge>
        <merge key="input.x11_options.VertScrollDelta" type="string">10</merge>
        <merge key="input.x11_options.HorizScrollDelta" type="string">10</merge>
        <merge key="input.x11_options.VertScrollDelta" type="string">10</merge>
        <merge key="input.x11_options.TapButton1" type="string">0</merge>
        <merge key="input.x11_options.TapButton2" type="string">3</merge>
        <merge key="input.x11_options.TapButton3" type="string">2</merge>
        <merge key="input.x11_options.ClickFinger1" type="string">1</merge>
        <merge key="input.x11_options.ClickFinger2" type="string">3</merge>
        <merge key="input.x11_options.ClickFinger3" type="string">2</merge>
        <merge key="input.x11_options.FingerLow" type="string">10</merge>
        <merge key="input.x11_options.FingerHigh" type="string">20</merge>
        <merge key="input.x11_options.PressureMotionMinZ" type="string">10</merge>
        <merge key="input.x11_options.SHMConfig" type="string">On</merge>
      </match>
    </match>
  </device>
</deviceinfo>

Save the file and reboot. You should now be able to right-click by using a two finger tap on the touchpad and middle-click by using a three finger tap. You can also right-click by holding two fingers on the touchpad and clicking the button, and middle-click by holding three fingers and clicking the button.

If you want to adjust any of the options (or add new ones) see “man synaptics” for an explanation of what they do.

Disable touchpad while typing

The placement and sensitivity of the MacBook touchpad means that it is prone to moving your cursor while you’re typing which is very annoying. We can fix this:

To disable the touchpad while typing use this command:

syndaemon -i 1 -d

This disables the touchpad for 1 second after you type something. This works well but if you go back and forth a lot it can be a hassle to wait that one second. NOTE you can use “.5” for half a seconf instead and it works much better.

Alternatively,

syndaemon -t -d

This disables tapping motions but not movement while typing.

Both work fine, and the one that works best for you will likely be determined by the type of computing you do. Try them both and decide for yourself.

Once you’ve found the one you want to use, add it as an application to start in your gnome session.

iSight camera

First of all, you will need a copy of the firmware from Apple. You can either download this here, or copy it from a Mac OS X partition. While the latter is usually preferred I can’t guarantee that the firmware distributed with your MacBook will be supported, so sometimes its easier just to download it.

To acquire the firmware, save the file AppleUSBVideoSupport to your home directory. Next, we need to convert the AppleUSBVideoSupport to a useable firmware file. The isight-firmware-tools will do this for us so we need to install that package:

su -c "yum install isight-firmware-tools"

Now, finally, we can convert the AppleUSBVideoSupport to a useable firmware file. From your home directory where you downloaded the AppleUSBVideoSupport file:

su -c ift-extract --apple-driver AppleUSBVideoSupport

Reboot and your webcam should be fully functionally. Test it with Cheese, Ekiga, or Skype2.

Bluetooth

Bluetooth works out of the box but due to some kernel bug it needs to be enabled properly first.

Edit /etc/sysconfig/bluetooth and make sure it says ‘HID2HCI_ENABLE=true’.

That’ll fix it on subsequent reboots. For now, just run ‘/sbin/hid2hci’ as root.

Apple SMC (Optional)

This is an optional but recommended step. The Apple SMC (System Management Controller) provides an interface to devices such as fans, temperature sensors, motion sensors, leds and controls these.

The applesmc kernel module is not loaded by default – I guess this is a bug. The correct way to load a module on boot in Fedora 10 is to create a .modules file in /etc/sysconfig/modules/ – here is how to do it for applesmc:

su -
gedit /etc/sysconfig/modules/applesmc.modules

Paste the following into the file:

#!/bin/sh

if [ ! -d /sys/devices/platform/applesmc.768 ] ; then
        exec /sbin/modprobe applesmc >/dev/null 2>&1
fi

Save and exit, then change the file permissions as follows:

chmod 755 /etc/sysconfig/modules/applesmc.modules

On next boot the applesmc module will load. Meanwhile, just do “modprobe applesmc” as root.

Plymouth graphical boot (Optional)

To activate the plymouth graphical boot you must edit /boot/grub/grub.conf and add your framebuffer resolution at the end of the kernel line. For the MacBook with Intel graphics the resolution that works is “0x318”. So, become root and edit the kernel line to look something like this:

title Fedora (2.6.27.5-117.fc10.x86_64)
	root (hd0,2)
	kernel /vmlinuz-2.6.27.5-117.fc10.x86_64 ro root=UUID=afb18b52-bfdf-49aa-95f0-234d3013f87d rhgb quiet vga=0x318
	initrd /initrd-2.6.27.5-117.fc10.x86_64.img

By default only the solar and text themes are installed. To add additional plymouth themes type:

su -
yum install plymouth-plugin-{fade-in,pulser,spinfinity}

Now you can try any theme you want like shown below, just replace pluginname with one of the following: solar, fade-in, pulser, spinfinity, text:

su -
plymouth-set-default-plugin pluginname
/usr/libexec/plymouth/plymouth-update-initrd

After that just reboot your computer to enjoy a lovely graphical boot.

What next?

Now your MacBook hardware should be fully functional so it is time to get busy adding the software you want and tweaking the system to your needs.

This guide by Mauriat Miranda is a great place to look for details of how to install common media players, codecs and fonts.

For the native 64bit flash plugin see this post.

Have fun!

39 thoughts on “Installing Fedora 10 on a MacBook

  1. UncleBob

    Download either of these (i386 or x64_86, whatever you’re running):

    ftp://fr.rpmfind.net/linux/fedora/releases/9/Everything/i386/os/Packages/xorg-x11-drv-i810-2.2.1-24.fc9.i386.rpm
    ftp://fr.rpmfind.net/linux/fedora/releases/9/Everything/x86_64/os/Packages/xorg-x11-drv-i810-2.2.1-24.fc9.x86_64.rpm

    then: sudo rpm -Uvh –force xorg-x11-drv-i810-2.2.1-24.fc9.xxx.rpm

    to stop auto updates from wanting to upgrade this driver, add this line to /etc/yum.conf:
    exclude=xorg-x11-drv-i810

    done.

  2. brewster

    @UncleBob:

    “Thank you very much!”

    Well, the hole Linux Kernel and Terminal-THING is pretty new for me but we have to keep going on in the development of our OPEN SOURCE SOCIETY…
    TUX will save this planet :-).

  3. Pavan

    Thanks for the instructions, I was worried about heating issues though. Does
    the laptop get hot while running Linux than Leopard/Tiger even if CPU scaling
    is enabled?

  4. Pingback: Wie jetzt, Leberwurst? » Blog Archive » Linuxify your MacBook…

  5. pipen

    Hey, thanks for the instructions… I have a slight problem with the touchpad….
    I’m not running GNOME, instead i am using Xfce 4 and apparently the problem seems related to Xfce not fully supporting HAL…

    Do you have any ideas about that?

  6. pipen

    After some further research I dont think the problem is Xfce related, however i am sitll unable to get the synaptics driver enabled and i have no idea why…

    i am going to configure it with xorg.conf while i find another solution

  7. Tiesel

    Hi,
    I first blew away Leopard with a fresh F10 x86_64 installation, that doesn’t want to boot.
    So: Is there any way to get around a re-installation of leopard and rEFIt ?

    Thanks,
    Tiesel

  8. MrMiNd1989

    Hi, I have a MacBook 2,1 and a problem with the iSight. The dark areas are green. If I turn off the lights it all become green! I tried both the firmware linked in the post and the one I took from my OSX partition.
    Any solution?

    1. Chris Post author

      @MrMiNd1989. I have the exact same problem on the MacBook 4,1. I found the solution on the ubuntu wiki:

      Green Capture Issue (Observed on Macbook 2,1 and Macbook 4,1)

      If testing the video input through gstreamer-properties results in a green-tinted image, try setting Default Input to ‘Custom’ and in the Pipepline box, enter the following:

      v4l2src device=”/dev/video0″ ! videoscale

      Click on Test to see if these new settings correct the issue. There is a bug report for this problem here.

      This fixes it for me.

  9. Chris Post author

    @MrMiNd1989

    Glad it works. I actually found that although the test works fine in gstreamer-properties and the settings are seemingly saved (they appear in gconf editor), the settings don’t actually get picked up by any apps that use gstreamer and even when you open gstreamer-properties again they have reset back to default. Annoying!

  10. MrMiNd1989

    @Chris. Yes I just discover it. And using terminal to open it it says there is an error with the settings and it can’t save them

  11. Kathryn

    Hi, i’m a newbie in fedora.. (by far) this is the best well written website i’ve found on installing fedora in macbook. :)
    I like to know if there is an easy (And secure) way to share files between the 2 os’s. I like to keep my files in os x (tiger), but be able to access them from fedora for read/write. Thanks for the helps!

  12. Kathryn

    Thank you so much for these well written instructions.

    I’m just running some issues connecting to the internet. (I tri boot my macbook 2.1, with fedora 10 installed) I followed the instructions on fixing the wireless. The upgrades were completed. However, everytime I try to connect to a server it won’t connect, and a message saying that “the server is disconnected”- when it is not. I can also see a list of servers, and the strength of signals. I did yum update again; but still failed to connect wireless. I also went into Network Manager to make it connect automatically – but i still can’t connect to the server.

    I’m simply trying to connect to my home router- there is no password (and i think) no firewall activated… so the connection should be easy but its’ not. I also try to connect to my university’s server- which fail too! :(

    Anyone has any tips?? Thanks for the help.

  13. Pingback: .ingin hijrah dari ubuntu ke fedora « BANDITHIJO

  14. Pingback: .Hijrah dari Ubuntu ke Fedora « BANDITHIJO

  15. Pingback: XunGa:

Comments are closed.