How I installed Fedora 27 on my High Sierra Macbook Pro 15'

ioannis valasakis
5 min readDec 29, 2017

--

(and yes, I have a functional Wi-Fi!)

Tux loves Apples.

This is a quick and sexy guide on installing Fedora 27 on a 2014 15' Macbook Pro. Many people are intimidated by Linux and partitioning hard drives but in all honesty there’s nothing to be scared (although to be fair it wasn’t my first time installing Linux; I still remember the moment I installed it on my iPod 120Gb device.

Yes, fellow reader, you read correctly that’s not an iPad but a 10 years old iPod with 240Gb hard drive, at times you didn’t have to pay an extra £100 tupgrade from 32 to 64Gb space.

Oh, yeah; that iPod!

Approach this as a curated list of links and genius ideas around the World Wide Web. Link or add your own on the comments.

1 — macOS, getting the required files

First step is to use your browser and GetFedora. I opted for the latest version (currently 27). A fancy script is happy to recognise your macOS and offer you the “Fedora Media Writer”. This is a tool for downloading the required Fedora image file (about 1.5Gb), while also used to build a USB Live distro.

While waiting for the download, fire diskutil and create a new 15–20Gb partition on your hard drive. If you have High Sierra you’ll need to choose the option ‘Partition’ (and confirm that you’re sure you need this) and create an extra FAT32 (the file system doesn’t matter at this stage as you’re going to re-format later anyway).

2— WiFi

As there’s no out of the box support for the Broadcom 4360 WiFi network adapter you need to connect to Ethernet or (if you’ve no spare Thunderbolt to Ethernet connector) use your mobile phone in USB Tethering mode. Of course that depends on the phone maker but it should be somewhere around Settings, Data/Internet. Don’t forget that for this option you shoulnd’t enable MPT mode (in my case it was the camera mode).

Try out if your connection is up:

[wizofe@earthsea ~]$ ping www.google.comPING www.google.com(ham11s01-in-x04.1e100.net (2a00:1450:4005:800::2004)) 56 data bytes
64 bytes from ham11s01-in-x04.1e100.net (2a00:1450:4005:800::2004): icmp_seq=1 ttl=53 time=57.3 ms

Whoot. We ‘re online.

Now you ‘re ready to install the Broadcom 4360 drivers. Here’s a tutorial from jamespamplin Github repo.

Jamespamplin WIFI guide for Fedora

3 — Graphic Card

I am going to talk about my graphic card (NVIDIA GK107M, or as usually known GT 750M). If you have a different card then please follow the instructions but try to google which is your required drivers.

Follow this guide to install the propietary video drivers from nVidia and disable the open source Nouveau. In my case, I decided to stay open source as I am using Linux for developing purposes (if I need Video and Photo Editing, I switch to macOS anyway ;))

4 — Larger console font (for the virtual terminal)

With the high dpi Retina screen, the Visual Console has really tiny font size and it’s impossible to work in. I am tooking about the full screen terminal and not the GNOME console. You can reach it by using the combination Ctrl-Alt-F[2–6].

Here’s an except from Martin’s Blog:

First, I generated a custom font file from one of the TTF fonts installed on my system (in this case from Google Noto):

sudo mkdir /boot/grub2/fonts
sudo grub2-mkfont -s 36 -o /boot/grub2/fonts/NotoSansRegular36.pf2 \
/usr/share/fonts/google-noto/NotoSans-Regular.ttf

This font can now be used in /etc/default/grub:

GRUB_TIMEOUT=5 
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT="gfxterm"
GRUB_CMDLINE_LINUX="..."
GRUB_DISABLE_RECOVERY="true"
GRUB_FONT="/boot/grub2/fonts/NotoSansRegular36.pf2"

Basically, I added the GRUB_FONT entry which points to the font to use. In addition, I had to change the GRUB_TERMINAL_OUTPUT from console to gfxterm.

Note: The remaining entries must remain as they are! Only edit the two variables.

Finally, the GRUB configuration can be regenerated.

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

To increase the font size for the Linux console (Ctrl+Alt+F[2–8]), first install the terminus fonts:

sudo dnf install terminus-fonts-console

Now, change to a TTY and use the setfont command to load one of the fonts. You will find them in /usr/lib/kbd/consolefonts/. For me, the ter-m32n font works quite nicely:

sudo setfont ter-m32n

To make this font the default console font, edit /etc/vconsole.conf and adjust the FONT entry:

KEYMAP="gb" 
FONT="ter-m32n"

5 — Upgrade Fedora

Fedora is here to stay!

Simply run:

dnf --update

After this update the wifi is going to break again but the only thing you need to do is run:

akmods --force

and this will reload the required kernel modules.

6 — Setting up vim

Two of my favourite plugins for Vim are Vim Sensible and SpaceVim. To install sensible you need the Pathogen plugin manager. Pretty easy to install:

mkdir -p ~/.vim/autoload ~/.vim/bundle && \
curl -LSso ~/.vim/autoload/pathogen.vim https://tpo.pe/pathogen.vim

now create a .vimrc file in your home folder (preferably with …vi!) and add the following (input with ‘i’ and close and save with :wq)

execute pathogen#infect()
syntax on
filetype plugin indent on

now to install ‘sensible’ run:

cd ~/.vim/bundle
git clone git://github.com/tpope/vim-sensible.git

In addition I will link my .vimrc file to my github so you can get some ideas of my setup. Feel free to build on it, although I *love* the theme of vim sensible!

  • airline (for the status line)
  • w0rp/ale (for on the fly lint checking)
  • plugged (plugin manager)
  • goyo (for distraction free writing)
  • lightline (for status line sugarcoating)
  • tcomment_vim (gcc for commenting a line; sweet)
  • easymotion (to move around with ease)

Here is a nice blog with definitely the most useful vim plugins ever:

http://sherifsoliman.com/2016/05/30/favorite-vim-plugins

If you are interested on how to use vim8 as an IDE for coding have a look at this really cool article as well. As a reference I am using the following plugins:

7 —Linux basics

It is out of the scope of the guide to provide a Linux tutorial although if you are really starting now, have a look at this nice and simple introduction to Fedora Linux by David Farning:

8 —Future

Future planned articles are an Introduction to Linux device drivers, experimenting with microcontrollers and sensors (Atmel Mega AVR, Arduino, Raspberry Pi).

I am also writing a re-make of the Cambridge Computer Lab tutorial of how to make a simple Operating System (in Assembly Language) using Raspberry Pi 3.

Hope to see you again soon and feel free to drop me a line for any ideas, additions or kudos ;)

--

--

ioannis valasakis

linux 🧙‍| embedded | medical imaging | c | rust | julia | sensors | 🥞 | films 📽️ | swimming 🏊‍| swing dancing🕺🏼