Installing Linux on the MacBook Pro 8,2

2018 Adventure

This went pretty well. Progress!

I am not going to write this up now. Notes.

Follow the blog post i have on Pinboard. Basically easy though.

Fedora 27. 64-bit!

Format a USB stick to GPT rather than MBR. Then copy ISO with dd. Why does format matter given that it then gets imaged? Does it?

Installer works fine.

Full disk encryption.

Custom disk setup > click button to get default layout > change all file-bearing filesystems to XFS.

In fresh state, cannot boot due to graphics switching fuckup. In GRUB, edit the kernel command line to tell systemd not to start alsa-switch (WTF). It asks for ctrl-x to exit, but won't recognise ctrl; 
F10 works. Once in, do systemd mask alsa-switch to make it permanent.

Read all about it:

(Later edit: this problem came back with kernel 4.18, and the alsa-switch thing doesn't work. dmesg still shows "client 1 refused switch" type stuff. Is there a way to find out what the naughty client 
is? Maybe "lsof /dev/snd/controlC1"? Anyway, add "radeon.modeset=1 i915.modeset=0 radeon.dpm=1" to the kernel command line to disable integrated graphics entirely, which gets booting working again, at 
the expense of using more power and heat. Fans don't go mad in September, might have been an issue in the summer. Add to GRUB_CMDLINE_LINUX in /etc/default/grub, then run grub2-mkconfig -o 
/boot/efi/EFI/fedora/grub.cfg, to make this permanent.

I evidently have an Ask Fedora account, but can't remember how to get in. OpenID i think, and presumably Stack Exchange OpenID? Ah yes: URL has to be http, not https, ie "".

update everything.

wireless driver comes from RPMFusion:

install the kernel headers and driver AFTER a full update so it builds for the right kernel!

generate SSH key following Secure Secure Shell. install nosh.

DevTools repo. needed to tweak SSH config. needed SSH_AUTH_SOCK=0 to work around fucked up keychain - need to look into this.

install cinnamon. there are two @-targets for Cinnamon, unclear if different. think i needed to reboot before Cinnamon showed up in the chooser.

graphics permanently on Intel integrated graphics. to do:


to check what graphics in use:

DRI_PRIME=1 glxinfo | grep -i opengl

much tweaking of config via control panels:

mouse and trackpad > touchpad > tap to click = off, click actions = emulate mouse buttons (click in bottom right of pad gets a menu), reverse scrolling = off

context menu on start menu > configure > turn off accelerator keys

in general, to turn off an accelerator, double-click the background of the field (!) then press backspace

keyboard > layouts > options > position of control key = right alt

keyboard > shortcuts, delete almost everything in case it conflicts with IntelliJ (leave alt + tab; ctrl + alt + wacko key things for logout etc; can leave anything involving print button), then set:

- windows > tiling and snapping > push tile in each direction = command + arrow
- windows > toggle maximisation state = command + space
- windows > inter-monitor > move window to left/right monitor = command + shift + arrow
- workspaces > switch to right workspace = command + tab (like a big alt-tab)
- workspaces > switch to left orkspace = command + shift + tab
- system > lock screen = ctrl + alt + eject (like ctrl + alt + insert at work)

to invert fn key:

echo 2 | sudo tee  /sys/module/hid_apple/parameters/fnmode

haven't verified the modprobe config bit yet.

tried picking a Cinnamon theme but that was a shitshow, because there are completely separate bits of themes for panel style, window widgets, etc. at least pick a light theme.

install inconsolata and configure terminal to start login shells.

2011 Adventure

This looks like it's going to be fun. The bad kind.

What i did (pass 1):

  1. Used Boot Camp Assistant to partition the disk; i allocated half to OS X and half to 'Windows'. I declined to actually install Windows once the partitioning was done.
  2. Downloaded Fedora-15-x86_64-Live-Desktop.iso to an existing Fedora (13) machine.
  3. Installed the livecd-tools package on the Fedora machine.
  4. Put a suitable USB stick in the Fedora machine (it came up as /dev/sdc1) and reformatted it with mkfs -t vfat /dev/sdc1. The reformatting probably wasn't necessary, in hindsight.
  5. Installed the LiveCD image on the stick with livecd-iso-to-disk --mactel --format /path/to/Fedora-15-x86_64-Live-Desktop.iso /dev/sdc (sdc rather than sdc1 this time).
  6. Observed that the resulting stick was not mounted by either OS X or Linux. Presumably, Linux doesn't like the lack of an MBR partition table, and OS X is just being snotty.
  7. Plugged the stick into the Mac, and rebooted with option held down to enter the boot manager.

The consensus seems to be that the steps are:

  1. Repartition the disk with Boot Camp (or Disk Utility - is there a difference in the outcome?), creating a FAT32 partition.
  2. Use a Linux installer to destroy the FAT32 partition and create something sensible (probably an ext4 root partition, and an LVM partition for everything else)
  3. Install Linux
  4. Use rEFIt to sync the MBR and GPT (whatever that means)

Somewhere in there you install rEFIt.

I think it might actually be possible to do this more simply. The important outcomes are (a) there are four partitions, viz EFI System Partition (FAT32, actually), OS X (HFS+), /boot (ext4), / (LVM); (b) that the disk has a valid hybrid GPT/MBR; (c) that there is some software somewhere that can choose between OS X and /boot. Apparently, the modern version of OS X's Disk Utility (and Boot Camp Assistant) will create a proper hybrid GPT/MBR, and are capable of creating the partitions. They presumably won't format them correctly, not knowing about LVM and so on. So, you can do the partitioning and partition table incantations in OS X, and then just install Linux (including reformatting the partitions) onto them. As long as you don't repartition from Linux, the Disk Utility-created GPT/MBR will be valid. The Mac's normal firmware boot manager will then be able to find and start OS X and Linux. Although apparently Linux will have a Windows icon. rEFIt provides an alternative boot manager, but it's not necessary. At least, that's my theory.

Mount everything noatime. Put /tmp on a tmpfs somehow.

Later on: