MacBook Pro (Santa Rosa) with Fedora 7
From Mactel-Linux
This document describes how to install Fedora 7 on a MacBook Pro (Rev. 3, Santa Rosa), so it can dual-boot with Mac OS X. It lists the steps to install and make Fedora bootable, as well as how to install drivers for video, sound, wireless networking, keyboard, touchpad and suspend/hibernate.
It is required that you can load the Fedora installation packages from something other than the internal DVD drive, by performing a network installation or by connecting a USB-based drive such as a hard drive, DVD drive or large flash memory. While you can boot from the Fedora 7 installation DVD in the internal drive, it is mysteriously not possible to install from that disc. This may be due to a known bug [1].
Since this document is a work in progress, it is possible that some of the steps are unnecssary, particularly in the drivers section. A dual-boot scheme is described, triple booting requires a different partitioning scheme. Most of the steps here are from other documents on this site, and from the Ubuntu forum, modified to work for Fedora 7.
Contents |
OS Install
Prerequisites
- 1. This procedure assumes that you have an external source which contains the Fedora 7 installation packages. Some possibilities include:
- An external CD/DVD drive, connected by USB, which contains the Fedora 7 installation disk(s). Depending upon the drive, it may be necessary to have two disks: one to boot from in the internal drive, and another with the installation packages in the external drive.
- An external hard drive, connected by USB or possibly Firewire, containing the DVD ISO images [2]. Another Mac in Target Disk Mode [3], connected with a Firewire cable, can act as an external hard drive, however the Fedora ISO image must be on a non-HFS formatted partition such as FAT.
- A network install by HTTP or NFS.
- Some other USB-connected memory large enough to hold the installation packages.
- 2. Bootcamp from Apple [4]
- 3. rEFIt, the boot menu and maintenance tool for Intel-based Macs [5]
Both the i386 and x86_64 versions of Fedora 7 have been reported to work with this procedure, although driver availability looks better for i386.
Installation
- In Mac OS X, install and set up Bootcamp as you would for a Windows installation. Skip making the driver disks. Make a temporary "Windows" partition the size of your intended Linux partition, for example 30 GB. Then reboot without installing Windows.
- Boot off of the Fedora 7 DVD by pressing "C" after the boot chime. From the Fedora installer, select "Install or upgrade an existing system (text mode)."
- When prompted "What type of media contains the packages", select the installation method you are using, e.g. "Local CDROM," "Hard drive," "NFS," etc.
- In the partitioning section, select "Create Custom Layout". Delete the new partition created by Bootcamp, it should be "sda3", type "Foreign". Add a mount point root "/" of type ext3 which becomes sda3, using all but the last 2048 MB or so, which is set up the swap partition, sda4. Don't touch partitions 1 or 2 at risk of destroying the Mac OS X installation.
- Other installation points. Install the software development library, since you'll be compiling drivers later. Use the GRUB boot loader. Install the boot loader to the first sector of the boot partition, not to the MBR.
- Complete the Fedora installation as you normally would.
- Reboot into Mac OS X, and install rEFIt. After reboot, the rEFIt menu should come up (two reboots may be required). Select the "Partitioning Tool", and allow it to update the MBR partition tables.
- Reboot into rescue mode from the Fedora DVD. As pointed out on the Macbook Pro with Fedora Core 6 and lvm page, you need to fix the partitions and reinstall GRUB by running the following commands:
chroot /mnt/sysimage
sfdisk --force -c /dev/sda 3 83
grub-install /dev/sda3
The command sfdisk may give a warning about the GPT tables, but it should reply with "Done". - Exit the rescue shell to reboot, and rEFIt should now show a Mac OS X and Linux boot option. Select Linux and allow the system to boot.
- At this point, you may or may not get a text login screen. If you see a blank screen and a seemingly useless computer, then gdm started, but failed to run properly. Reboot from the DVD in rescue mode and modify /etc/inittab to set initdefault to 3 to prevent gdm from starting at boot time:
id:3:initdefault:
When you reboot Linux, you'll get the text login screen. - Log in as root, and run a yum update and reboot to get the latest kernel and drivers.
yum -y update
Driver Configuration
Video
Getting non-accelerated video working is pretty simple. Log in as root and edit your /etc/X11/xorg.conf. Change the driver for 'Videocard0' to be 'vesa' instead of 'nv'.
If you want accelerated video, or need access to the external monitor, working drivers are available through yum. I'm not comfortable giving a step by step procedure for this, but it would be the same for the Santa Rosa MBPs as it would for any other Nvidia equipped system (from apple, dell or any other manufacturer).
Sound
Sound also wasn't too difficult to get working. Follow these steps from the Ubuntu forums. Note that the patch is no longer needed (it must have been absorbed into the main codebase).
cd /usr/local/src rsync -avz --delete rsync://alsa.alsa-project.org/hg/alsa-driver alsa rsync -avz --delete rsync://alsa.alsa-project.org/hg/alsa-kernel alsa cd alsa-driver ./hgcompile make make install (at this point I simply rebooted) /etc/init.d/alsasound stop lsmod [verify all snd modules are unloaded] modprobe snd-hda-intel
From here you'll need to run alsamixer to unmute the Master, PCM, and Line Out and possibly others.
Note that you'll probably need to recompile after every kernel upgrade.
Wireless
Wireless was also not so bad
cd /usr/local/src svn checkout http://svn.madwifi.org/trunk madwifi cd madwifi make;make install modprobe ath_pci
Again, you'll probably need to recompile for each kernel upgrade.
Keyboard
Under the i386 kernel, to get the display backlight and volume keyboard buttons to work, download, compile and install pommed, by Julien Blache, from the Debian distribution [6]. See the INSTALL file for directions. Compiling pommed requires several packages which may not have been initially installed with Fedora, see the comment below. The two client programs included in the pommed distribution, gpomme and wmpomme, do not seem to be required.
After copying the files as described in the INSTALL file, restart dbus, which under Fedora, runs as the service messagebus. To restart dbus:
/etc/init.d/messagebus restart
Setup the pommed daemon to be run as root when Fedora starts:
ln -s /usr/bin/pommed /etc/rc5.d/S96pommed
Reboot, or run pommed as root, and the display backlight keys should now work. To get the volume up, down and mute keys to work, edit your /etc/pommed.conf and replace the sound card section with the following:
audio {
# Use amixer or alsamixer/alsamixergui to determine the sound card
# and the mixer elements to use here.
# sound card to use
card = "default"
# initial volume [80] (0 - 100%, -1 to disable)
init = -1
# step value (1 - 50%)
step = 10
# mixer element for volume adjustment
volume = "Master"
# mixer element for muting the speakers
speakers = "Master"
# mixer element for muting the headphones
headphones = "Master"
}
The Fedora kernel does not include the applesmc driver which is needed to get the keyboard backlight to work. At least with the keyboard backlight off, you'll save a bit of battery power.
The x86_64 Fedora 7 kernel does not have CONFIG_USB_HIDINPUT_POWERBOOK=y in the kernel config file. As a result, pommed does not work by default with the 64-bit kernel.
Fedora Packages Required by pommed
Compiling pommed requires several additional packages, which are listed in the INSTALL file. These are available by yum:
yum install libconfuse yum install libconfuse-devel yum install libsmbios-devel yum install xorg-x11-server-source
If you didn't install the software development libraries when initially installing Fedora 7, then the following RPMs must also be installed. alsa-lib-devel, audiofile-devel, dbus-devel, zlib-devel and pciutils-devel. For example, install the first package as rpm -Uvh dbus-devel-1.0.2-4.fc7.i386.rpm .
Touchpad
The mac touchpad presents a couple of problems. First, there is only one mouse button. Second, it is super huge and super sensitive and inadvertent touching can move your cursor somewhere you don't want it.
Dealing with the single mouse button seems to be best handled by using the synaptics touchpad driver to set up two and three finger tap to emulate the middle and right mouse buttons. To do that you need to modify your /etc/X11/xorg.conf in three sections:
Section "Module"
Load "synaptics"
EndSection
Section "ServerLayout"
Identifier "single head configuration"
Screen 0 "Screen0" 0 0
InputDevice "Keyboard0" "CoreKeyboard"
InputDevice "TouchPad" "AlwaysCore"
EndSection
Section "InputDevice"
Identifier "TouchPad"
Driver "synaptics"
Option "SendCoreEvents" "true"
Option "Device" "/dev/input/mice"
Option "Protocol" "auto-dev"
Option "LeftEdge" "0"
Option "RightEdge" "850"
Option "TopEdge" "0"
Option "BottomEdge" "645"
Option "MinSpeed" "0.4"
Option "MaxSpeed" "1.2"
Option "AccelFactor" "0.1"
Option "FingerLow" "55"
Option "FingerHigh" "60"
Option "MaxTapMove" "20"
Option "MaxTapTime" "100"
Option "HorizScrollDelta" "0"
Option "VertScrollDelta" "30"
Option "SHMConfig" "on"
EndSection
If you want to disable your trackpad while typing (to prevent inadvertent taps and mouse movements), go to the System menu, Preferences, Personal, Sessions, and enter a new startup program. Call it "Synaptics Touchpad Lock" and enter the following:
syndaemon -i .5 -d
This locks out the touchpad until .5 seconds have elapsed from the last keyboard use. You can change this value to whatever works best for you.
I spent a lot of time trying to get mouseemu to work, but it doesn't seem to recognize or intercept anything coming from the touchpad or button. I'd rather have ctrl-click work for the right button, but that doesn't seem to be possible right now.
Suspend / Hibernate
The latest version of the kernel (2.6.22.7-85.fc7) seems to fix issues with suspend to ram. All I did was 'yum update' and then I was able to suspend the machine to memory. Hibernate (suspend to disk) still doesn't work and as far as I know may never work given the EFI partitions or other issues with the mac hardware.
Next Steps
I'm quite happy with my setup as it stands right now. I'd really like to get hibernate / suspend-to-disk working, but other than that, I have a pretty functional linux machine that will also boot MacOS.

