- Download Fedora 26 iso, create a usb bootable media
- Use
diskutil list
to figure out which drive is the usb, on macbook pro with 1 hardrive, the usb is/dev/disk2
- 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) - Use
dd
(a low levelcp
) to write iso content into the usb drive,sudo dd if=~/Downloads/Fedora-Live-Desktop-x86_64-20-1.iso of=/dev/rdisk2 bs=8m
, 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) - Use Disk Utility to shrink Mac's harddrive to create partition for the subsequent fedora installation
- Boot to recovery mode (cmd+r) and disable SIP (terminal -> csrutil disable; reboot).
- Boot to OS X.
- Download Refind and install it (sudo ./refind-install).
- Reboot with the fedora USB stick, and boot Fedora.
- click on "next steps" and install Fedora on the newly allocated partition, at the end it'll reboot
- 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 downCmd + 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 - 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) - now on start, you'll be given the option to select the OS to boot into, awesome!!
sudo vim /etc/rc.d/rc.local
put the following into the file
#!/bin/bash
echo 2 > /sys/module/hid_apple/parameters/fnmode
and enable the rc.local file
sudo chmod +x /etc/rc.d/rc.local
sudo systemctl enable rc-local
sudo systemctl start rc-local
Mac's hardware is customized for OS X, so it's like to have small issues with Linux. Things that I have run into
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..
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
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
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
Update on the state of Linux on MacBook Pro-2016.
How has the experience been so far?