Fedora 20 on a Macbook 8,2

These are my notes on installing Fedora 20 on my Macbook. After testing the Live version with an USB flash drive I was pretty impressed on what worked out of the box, I wanted to make my Macbook a dual boot system.

I’ll be adding more notes as I use the system more often.

1. Creating space

Of course we need to have some space left on our hard drive. My disk was totally occupied with a FileVault 2 encrypted filesystem with Mac OS X Mavericks installed. I assumed the encrpyted part was going to hurt when trying to resize the partition, but to my surprise this was not the case.

Simply start the Disk Utility, select the disk and choose “Split this partition in two”. After that you get the option to divide the space. I just took 50GB to hold my initial installation for Fedora.

2. Installing Fedora

With the Live USB drive in place, I rebooted the Macbook and hold the “Option (alt)” key. This gives you the option to boot from the USB drive.

Choosing “Fedora media” gave no errors at all, and when it’s done booting you get the option to either Try Fedora or Install to hard drive.

I picked the Install option and needed to select a destination to which to install. I had to delete the “Fedora” partition the Disk Utility in Mac OS X created for me when I split the OS X partition. After that I had 50GB free to install Fedora.

During installation I had no problems, and it finished without errors.

3. Booting the first time

Remove the USB drive and reboot. It will now load Grub and as a default boots the latest Fedora kernel. The menu also has entries for Mac OS X, but they don’t seem to work (more on that later…).

If you need to boot Mac OS X, just hold the Option key again whilst rebooting. This gives you to option to boot Fedora (Grub) or Mac OS X.

4. Wifi

Wifi doesn’t work out of the box. Do yourself a favor and bring the Macbook online using an ethernet cable. To enable wifi I did:

wget http://www.lwfinger.com/b43-firmware/broadcom-wl-5.100.138.tar.bz2
tar xjf broadcom-wl-5.100.138.tar.bz2 
export FIRMWARE_INSTALL_DIR="/lib/firmware"
b43-fwcutter -w "$FIRMWARE_INSTALL_DIR" broadcom-wl-5.100.138/linux/wl_apsta.o
reboot

After the reboot wifi is enabled! Click in the top right corner and click on Wifi to set it up further.

5. Integrated vs discrete graphics

My Macbook comes with two GPU’s. One hot running energy slurping AMD/ATi type, and the cool not so energy hungry Intel one. I’m not interested in games or programs that demand a lot of graphic power, so I wanted to disable the AMD GPU and just use the Intel.

This took me the most time to figure out, but in short this is what needs to be done.

Install the intel driver:

yum -y install xorg-x11-drv-intel

Configure Grub-efi:

cp -R /usr/lib/grub/x86_64-efi/ /boot/efi/EFI/fedora/

Open /etc/default/grub.conf and add:

GRUB_PRELOAD_MODULES="iorw"

Open /etc/grub.d/10_linux and find two strings with “set gfxpayload=”. Add these lines under there so they look like this:

          echo "        set gfxpayload=....."
          echo "        outb 0x728 1"
          echo "        outb 0x710 2"
          echo "        outb 0x740 2"
          echo "        outb 0x750 0"

After this, run the makeconfig:

 grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg

Reboot!

This disables the AMD/ATi card, leaving you with just the Intel card. This saves you a lot of heat and energy.

The down side: my external display is not working anymore. I can select it in the Display options in the configuration screen, but it doesn’t get a signal.

6. The solarized color scheme in gnome-terminal

As a Linux admin I usually spend a lot of time staring at terminal emulators. I really dislike looking at bright windows all day, so I took some time to find a nice color scheme.

My favorite as of now is the solarized color scheme:

Screenshot from 2014-02-06 10:15:04

To enable it I took the following steps.

Download the directory colors file:

cd
wget --no-check-certificate https://raw.github.com/seebi/dircolors-solarized/master/dircolors.ansi-dark
mv dircolors.ansi-dark .dircolors
eval `dircolors ~/.dircolors`

Now for the gnome-terminal scheme:

sudo yum install git-core
git clone https://github.com/sigurdga/gnome-terminal-colors-solarized.git
cd gnome-terminal-colors-solarized/
./set_dark.sh

If you get an error about the “Default” profile not being available, just clone the “Unnamed” profile and name it “Default”. Then run the ./set_dark.sh script again.

Restart your terminal and behold a nice dark terminal.

7. Solarize vim

A large portion of the time I spent staring at terminals I’m actually using vim. Which looks really nice with the solarized theme:

Screenshot from 2014-02-06 10:26:05

To enable it:

Get the theme:

cd
wget https://raw.github.com/altercation/vim-colors-solarized/master/colors/solarized.vim
mkdir -p .vim/colors
mv solarized.vim .vim/colors/

Add this to your ~/.vimrc file:

syntax enable
set background=dark
colorscheme solarized

Now when you start up vim the color scheme will be enabled for you.

 

 

 

 

 

 

 

5 thoughts on “Fedora 20 on a Macbook 8,2

  1. Thanks, this worked great for me, but I found I needed to
    yum -y install grub2-efi-modules
    before running
    cp -R /usr/lib/grub/x86_64-efi/ /boot/efi/EFI/fedora/

    • Hi,
      On F22 I had to do this as mark said:
      yum -y install grub2-efi-modules
      cp -R /usr/lib/grub/x86_64-efi/ /boot/efi/EFI/fedora/

      However on reboot I got a blank screen. I found that if I took “nomodeset” out of the kernel line in
      /etc/default/grub.conf

      it then worked.

      best,
      Rod

      • I was getting a blank screen too, but all it was is the brightness of the monitor seemed to default to the lowest setting.

Leave a Reply

Your email address will not be published. Required fields are marked *