Skip to content

Instantly share code, notes, and snippets.

@olpoco
Last active March 3, 2018 10:24
Show Gist options
  • Star 7 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save olpoco/e1df071816c9486e1b31 to your computer and use it in GitHub Desktop.
Save olpoco/e1df071816c9486e1b31 to your computer and use it in GitHub Desktop.
Installing Fedora 23 on Macbook Pro Retina 2016, and attaching Airport Extreme

Installing Fedora on Macbook Pro retina

  1. Download Fedora 23 iso, create a usb bootable media Follow instructions here Basically,
  2. use diskutil list to figure out which drive is the usb, on macbook pro with 1 hardrive, the usb is /dev/disk2
  3. umount the disk using diskutil unmountDisk /dev/disk2 or use Mac's Disk Utility (just umount, don't eject, umount removes it from directory structure and eject disconncet it altogether)
  4. use dd(a low level cp) to write iso content into the usb drive, sudo dd if=~/Downloads/Fedora-Live-Desktop-x86_64-20-1.iso of=/dev/disk2 bs=1m, this will take a bit of time, make sure you wait until it's done, additionally compare the size or checksum to make sure all has been copied (not that necessary since if it weren't copied, it'll err at boot time)
  5. use Disk Utility to shrink Mac's harddrive to create partition for the subsequent fedora installation
  6. and reboot and hold Option key, it'll give you option to boot using the usb drive
  7. click on "next steps" and install Fedora on the newly allocated partition, at the end it'll reboot
  8. once rebooted, it'll boot directly into fedora (you can't boot into mac anymore), this is because Fedora installed grub as bootloader which doesn't recognize OS X, don't panic, you can reboot and hold down Cmd + R, which will boot into Mac's recovery, at which point, you can choose Mac's partition as default startup disk, see here, do that
  9. once you are in Mac OS again, install rEFInd, a boot manager that'd allow you to select Mac partition at boot. It sounds complicated, but really you just have to 1) disable Mac's SIP 2) download and run the ./refind_install script, detailed instructions here, and then reboot. (you could also install it before installing fedora at step 5 but it'll be overwritten when Fedora is installed)
  10. now on start, you'll be given the option to select the OS to boot into, awesome!!

issues

Mac's hardware is customized for OS X, so it's like to have small issues with Linux. Things that I have run into

Wifi

Once I close the lid, wifi turns off and never turn on again, I get it back up by removing wifi's kernel module and re-add it. somewhat a hack but it works

rmmod brcmfmac; modprobe brcmfmac

brcmfmac is Mac's wifi driver from Broadcom, I found it by doing lsmod | grep 802, (lsmod list all kernel modules, grep 8021 to look for strings containing 802 because 802.11 is the wifi standard). rmmod removes the module and modprobe add the module. The wifi problem still turns up during shutdown, so I normally remove the module before shutdown..

Airport Extreme shared disk

I have an Airport Extreme with an external hard drive attached to it as a network drive. It's got 1TB so I can dump all my stuff and access from all my computers at home. Airport Extreme supports both apple's AFP file transfer protocol and Microsoft SMB/CIFS protocol. Linux can mount SMB drives, so awesome we can just mount it as external hard drive. I setup the shared drive using mac's Airport Utilities and selected device password as password protection (basically means the password is same as wifi password). Time to mount it on Fedora! The mount command I used is

sudo mount -t cifs -o username=sheldon,uid=1000,gid=1000,sec=ntlm "//10.0.1.1/Mr NetworkDrive" ~/ExternalHDD/

-t cifs tells it to use CIFS standard, uid and gid tell it mounted folder's user and group (since you are running with sudo as root, by default it'd mount as root). It'll ask for password (same as wifi as we set it up as "using device password". sec=ntlm is very important, as it looks like Airport extreme only supports ntlm(v1)?? To let it mount automatically, I added this to /etc/fstab

//10.0.1.1/Mr\040NetworkDrive   /home/sheldon/ExternalHDD       cifs    username=sheldon,password=password,uid=1000,gid=1000,sec=ntlm  0       0

note that if you have space in the drive name you need to replace it with \040 in the fstab file

play videos

I wanted to play avi file with vlc, so I had to install rpmfusion(a repo that contains "software that the Fedora Project or Red Hat doesn't want to ship"), and dnf install vlc

remap keys

https://wiki.archlinux.org/index.php/Apple_Keyboard swap COMMAND and ALT

echo options hid_apple swap_opt_cmd=1 | sudo tee -a /etc/modprobe.d/hid_apple.conf

@dariusz21p
Copy link

Does F23 suspend and hibernate on this MAC?
Is Fn key functional?

thank you for sharing your experience ;)

@alian
Copy link

alian commented Jun 15, 2016

How is battery life on it?

@olpoco
Copy link
Author

olpoco commented Feb 9, 2017

suspend doesn't work :(

@raulsaeztapia
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment