Fedora 15 on a Mac: Optimizing

I love Fedora. I believe it to be the best Linux distribution out there. Consistent features optimized for the GNOME desktop environment make one heck of a package. However, I believe that I should write a small tutorial about the problems one may encounter with Fedora installations on a Mac and how to solve them.

I have installed Fedora on both a Macbook pro late 2009 with an nVidia 9400 inside and an iMac late 2006 with an ATI Radeon X1600 Mobility.

First of all, ensure that your system is up to date, and that you have installed the Fusion repositories for use with the YUM package manager.

Part 1: Fedora Unbootable?

This part also applies to Ubuntu and many other distributions when installed on a Mac.

Using rEFIt, after installation, you may end up with an unbootable system. Even after you have synchronized partitions. The solution is simple, although I haven’t been able to figure out why this happens.

Start up the computer, run rEFIt’s partitioning tool, even if your disks donot need synchronizing. Then, exit the partitioning tool, and shut down your system. Make sure you DO NOT JUST REBOOT your system. Shut it down, wait a few seconds, then start it up, and choose linux as your boot OS. Your Linux installation will start properly.

Part 2: Common Problems and Solutions:

Flash Support on both 32 and 64 bit systems

Flash support is a bit tricky, especially if you have a 64 bit system, like I do. Adobe currently offers a 64 bit Flash version for use with Linux, but I wouldn’t recommend anything that is in beta stage from Adobe. Their betas are often unstable. There are also free alternatives to flash for Linux, like Gnash, but I also don’t recommend it, because due to patent issues, you have to download additional codecs for Gnash in order to see flash videos with MP3 sound on them, AND to download a web browser that uses Gnash instead of Flash. There is also LightSpark, but I haven’t used it.

Anyway, let’s proceed with the installation instructions. To begin, refer to the Adobe site at http://get.adobe.com/flashplayer/. Select YUM for Linux to download, and confirm (or the .tar.gz version for the 64 bit alpha; see bottom).

This will download the adobe-release-i386-1.0-1.noarch.rpm file. Installation of the repository file adobe-linux-i386.repo to /etc/yum.repos.d/ can be performed by installing the .rpm file. Issue the following command within the directory where you have downloaded the repository rpm file. Open the file and install it, or use the “rpm” command to install it.

You will also need to import the key from adobe. You can do both the installation and the key import using the following:

This will create a repository file in order for you to fetch the packages using yum.

For 32-bit Fedora, in the same terminal, using using root priviledges, run the following command.

For 64-bit Fedora, in the same terminal, using root proviledges, run the following command:

Open Firefox, go to youtube, and enjoy your videos. Please note, however, that you will not be able to use flash with Chrome… yet.

Flash for Chromium on Fedora

Once you have installed flash, you will notice that it won’t work with Chromium. That’s because Chromium and Firefox consult different directories for their plugins. You need to create a symbolic link for the flash plugin from its original installation directory to the Chromium directory. That way it will be updated each time you update the plugin.

Restart Chromium and you are all set up to see flash Video.

Fedora 15 bad font rendering

That’s the most important problem of all. After upgrading to Fedora 15 from 14, I noticed that fonts were not rendered correctly. It seemed as if they had jagged edges on one application, and a blurry lens on top on the other. Seems that in Fedora 15 autohinting is disabled, and also some other functions are enabled. These problems are results of what may be stepping stones to a better system, but for the time being, we have badly rendered fonts on Fedora 15.

I found the solution in downloading the packages for my distibution in http://www.infinality.net/blog/

Simply speaking, this patch makes Freetype’s (http://www.freetype.org) Truetype interpreter perform Truetype hinting instructions in the Y direction only, and skip the X direction. This produces a nice visual result at smaller resolution, like those typical at sizes commonly used on the computer screen. This patch is not perfect, and needs some work on certain fonts, however, in my opinion it renders much, much better than the native truetype hinting contained in legacy fonts.

The truetype instructions in legacy fonts were designed with the idea of bi-level (monochrome) hinting in mind, not subpixel (antialiased) hinting. To make these fonts display nicely in the subpixel world, the MS TT interpreter in Windows XP and later works around this by ignoring certain Truetype instructions contained in the font (probably among other things). This patch attempts to duplicate that functionality. Modern free fonts like Liberation and DejaVu also look good with this too, because they were designed with subpixel hinting in mind.

Another benefit to this is that it is modifying the default (native) hinter of Freetype, which all programs would use by default (if not overridden by other fontconfig settings). This means that oo.org, WINE, Xft, Qt and just about everything else will be using this by default, and rendering fonts the same good way.

Download the packages that correspond to your system, install them, and reboot your system. Enjoy your brand new font rendering system!

Enabling Wireless

On both my machiines wireless was disabled due to lack of drivers. Installing the akmod-wl package from the rpm-fusion repositories will fox this little annoyance. Reboot necessary!

Erroneous

Part 3: X86_64 Problems and Solutions

Skype Support for x86_64

Skype is 32 bit only for the time being, so you will need to download additional plugins in order to make it work. Fedora 15 already includes Skype in their default repositories, so you can install it from there. Then, with root administrator proviledges install the additional plugins using the following command:

Now Skype will be able to run. I have noticed that running skype the first time after each reboot slows down the system so much that it appears as if it has locked up. Relaunching the application fixes that until you reboot. That problem mostly occured with Fedora 14, I haven’t experienced it with Fedora 15, but I thought I should mention it. 

Part 4: GRUB/EFI/rEFIt problems

Erroneous boot option in rEFIt menu

In some cases (in all my computers, at least) after Fedora 15 installation or upgrade, you will be given an additional option to boot from: EFI/redhat/grub.efi . This partition is a bit tricky to eliminate, and sometimes (not all) is a valid boot option, as it opens a GRUB shell to give commands. However, in most cases it doesn’t work, and even if it does, it is unnecessary, as it resides in the false partition. In order to cope with the problem, let’s explain some things, in order to understand what it is:

What rEFIt does when booting, is to search all available partitions for /efi , /boot, /grub folders and anything similar. Those folders are located inside visible or invisible partitions inside your computer. In order to access them, you must mount the appropriate EFI partitions that reside at the start of each disk (and in some cases between partitions). And then, you must delete the appropriate files.

 

The file you seek is at the path /efi/EFI/redhat/grub.efi in an EFI partition. Which one? I don’t know the configuration on your computer, so I can’t tell. I have 2 macs with Fedora, a Macbook Pro witj OS X and Fedora only, and a desktop iMac with 3 external disks, one of which has 2 partitions with OS X installed in each one, and my internal HDD with Fedora and OS X installed. I use rEFIt in both of them and I have faced the exact same problem in both of them. But in each computer, the files I needed to delete were on a different place.

You can do this this using OS X, but it it may be tricky for intermediate users, especially if you must cope with ext4 filesystem, which is not natively supported (and installing ext4 support from 3rd party macfuse drivers proved to be a pain in the butt). So we are going to do it with Fedora directly.

Log into Fedora and open Disk utility. Select each one of your hard disk drives and locate the EFI partition (in some HDDs there may be two). Mount each one of them. Into each one of them, look for the folder named EFI/redhat. If it exists, delete it. Reboot, and if all went well, you won’t be seeing the erroneous boot option anymore! It was that easy, but I thought I should first explain what you are doing, because different configurations may need slightly different steps. 


This article will be updated soon with more specific information as to how to solve problems with Fedora on a Mac.