Quantcast
Channel: Chris – cenolan.com
Viewing all articles
Browse latest Browse all 22

Installing Fedora 10 on a MacBook

$
0
0

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 “0×318″. 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!


Viewing all articles
Browse latest Browse all 22

Trending Articles