Saturday, January 15, 2011

Installing Fedora 14 on Macbook Air (2010)

My laptop is the 2 Gb of RAM, 128 Gb SSD Macbook Air (Late 2010) model. The following is the set of steps I took to get Fedora 14 Live (i686) working on it.

(Note 1: If you have the 4Gb version, you should use Fedora 14 x86_64.)

(Note 2: I have an external optical drive, but you should be able to boot fedora via flash drive).

(Note 3: You will also need the USB ethernet adapter to install udpates, nvidia and wireless drivers)

Step 1 - Partition Drive:

On Mac OS X, use Bootcamp (under Applications -> Utilities) to re-partition the drive non-destructively. Once you select how much you want for your 'Windows' partition, tell Bootcamp you will install Windows later.

Since I only have 128 Gb drive, I picked 30 Gb for Fedora, which is plenty.

Step 2 - rEFIt:

Download and install rEFIt on Mac OS X. This will allow your mac to give you a menu driven boot OS option once Fedora is installed.

Step 3 - Booting / Installing Fedora:

Reboot your Mac and hold the 'c' key to tell the computer to boot from the CD.

On your GRUB screen, hit tab, and add: nomodeset parameter to boot without loading GUI boot screen.

Install Fedora Live.

Make sure GRUB gets installed on whatever device your /boot is mounting. Mine is /dev/sda3

Step 4 - Fixing rEFIt OS Loading:

Once you install Fedora, and reboot your Mac, rEFIt will give you the Linux option for booting, but once you choose it will fail.

Reboot again, and once you get to the rEFIt screen, pick the rEFIt shell, and run:

gptsync

That will fix it.

Step 5 - Update system:

Once logged into Fedora, and your are plugged into the network (using the USB ethernet adaptor), open terminal and update system:

su -
yum update

Step 6 - Install RPMfusion repos:

Install free and nonfree rpmfusion repos. See instructions.

Step 7 - Install nvidia drivers:

On terminal install drivers (from rpmfusion repos), as root:

yum install kmod-nvidia xorg-x11-drv-nvidia-libs.i686

reboot.

I did change the fonts on my desktop from whatever the default was down to 8, as on this macbook air display it seems to take a lot of room on the screen. To change fonts on GNOME: System -> Preferences -> Appearance -> Fonts tab.

Note 4: I did find out the DPI which the nvidia driver run on the macbook air is a bit too high. I changed it back to 96dpi, and it feels much better now.

To change it:

Go to the NVIDIA X Server Settings, save a copy of xorg.conf on your home directory. Than add:
Option    "DPI"  "96 x 96"
Under the Monitor section. Restart X.

With this change, you will probably have to put your Font Sizes back to 10, I upped mine to 9.

Step 8 - Install broadcom wireless drivers:

black list current broadcom drivers, as they don't seem to work, as root:

echo "blacklist b43" >> /etc/modprobe.d/blacklist.conf
echo "blacklist ssb" >> /etc/modprobe.d/blacklist.conf

Install drivers (from rpmfusion repos):

yum install kmod-wl

reboot, NetworkManager will detect wireless and network availables (it may take 10 - 15 seconds for it to show up).

Step 9 - Enable touchpad:

Two finger scrolling, mouse click with touchpads can be enabled by going to:

System -> Preferences -> Mouse -> Touchpad tab.

Step 10 - Fixing Sound:

Sound is detected by default, but not correctly, as root:

echo "options snd_hda_intel model=mbp55" > /etc/modprobe.d/sound.conf

reboot.

Now, you need to unmute the speakers via the terminal. As your user:

alsamixer -c0

Make sure "Front sp" and "Surround" are not set to MM, and the volume is high. I usually set mine up in the 90s.

Hit 'Esc' to exit. As root:

alsactl store 0

To save settings.

Final Thoughts:

1. Bluetooth just works.

2. Brightness and Volume buttons just work. Actually, gnome detects the brightness button, but the display doesn't seem to dim. When using the brightness button, I can see the values under /sys/class/backlight/mbp_backlight changing, but nothing happens to the display. The only very *lame* work around I've found so far is that if you close your lid (suspend) and open it back up (resume), the brightness will come back at around 50%, which is easy on the eyes (at least at night).

/var/log/messages content related to brightness:

Jan 15 20:21:36 bean2 kernel: [ 2711.573264] video LNXVIDEO:00: Restoring backlight state
Jan 15 20:38:34 bean2 kernel: [ 5.209737] applesmc: - Model without light sensors and backlight

Also, compiling and installing pommed to try to solve this issue did not work for me.

- Found out a bit more about this problem. See: https://bugzilla.redhat.com/show_bug.cgi?id=650949

- Brightness work with VESA driver, which basically is Fedora running with nomodeset and without nvidia RPMfusion drivers.

- The nouveau drivers only gets loaded when running Fedora w/o nomodeset (and nvidia RPMfusion drivers). This option currently doesn't work at all.

3. Fn+Delete to behave as a PC delete button just works.

4. Closing the lid (suspend/resume) just works. It does take 10 - 15 seconds for the wireless to kick in.

5. I haven't been able to find any sources online that have instructions that would let one install Fedora on a mac and completely wipe out Mac OS X. As far as I know, rEFIt needs to be installed on the Mac OS X partition for boot to work.

6. I am running kernel: 2.6.35.10-74.fc14, and since I am very happy with it, I recommend adding 'exclude=kernel' to your /etc/yum.conf. To avoid your wireless and nvidia drivers from breaking. Sometimes, it takes a few hours or a day or two until pre-compiled drivers for new kernels are available under rpmfusion.org

7. iSight camera just works.

3 comments:

A guide to remembering japanese characters said...

Do you know know how much the battery lasts in comparison with native MAC OSX?

anderson said...

I didn't leave it installed long enough to test it... sorry... but it wasn't horrible.

Jon W said...

Hi, thank you for posting this walk through, it has been very helpful. I am new to doing dual boots so I am having trouble understanding some of it. Where it says:

"On your GRUB screen, hit tab, and add: nomodeset parameter to boot without loading GUI boot screen."

I'm not exactly sure what a GRUB screen is and so I tried to wing it but I could not find a place to enter the word "nomodeset". I stopped there because I didn't want to mess anything up.

Also I am not sure how to tell what device my boot is mounting based on your example:

"Make sure GRUB gets installed on whatever device your /boot is mounting. Mine is /dev/sda3"

Thanks for the help.

Jon