For the past few months, I've tried running OS X as my main OS on my MacBook Pro Retina (late 2013). I eventually got tired of it, so a week ago I started trying to figure out how to dual boot Arch on this machine. This is a log of the steps that had to go through. (Before doing this, I reset OS X via the recovery partition, so this is a clean install.) The following additional pages may be helpful as reference:
- https://vec.io/posts/use-arch-linux-and-xmonad-on-macbook-pro-with-retina-display
- http://codylittlewood.com/arch-linux-on-macbook-pro-installation/
- https://help.ubuntu.com/community/MacBookPro11-1/Saucy
- https://wiki.archlinux.org/index.php/Installation_Template
- https://bbs.archlinux.org/viewtopic.php?pid=1363803
- https://wiki.archlinux.org/index.php/MacBookPro11,x
Boot disk
In OS X, download the standard Arch install ISO and rundd if=arch.iso of=/dev/sdXto create the boot disk.
Bootloader
We will use rEFInd because it seems slightly easier than hooking up GRUB to EFI. In OS X, download the rEFInd package and runsudo ./install.sh --alldriversEdit
/EFI/refind/refind.conf
and enable the scan_all_linux_kernels
option. (I also enabled textonly
mode because I thought the GUI looked tacky.) In the folder /EFI/refind/drivers_x64
, remove all the drivers except the one for EXT4. (Not sure if the last step is necessary -- can someone confirm?)
Partitioning, Part 1
While still in OS X, use the partition manager to resize your OS X partition. I left it with 50 GB, but this is up to personal preference. Note that OS X actually has 3 partitions (EFI boot partition, main partition, recovery partition), but it only shows you one of them.
Internet
Boot into your Arch live USB (rEFInd should be able to detect it automatically). You need an internet connection to install the base system. I used USB tethering via an Android phone, but other options may work as well.
Partitioning, Part 2
Usecgdisk /dev/sda
to set up /
on /dev/sda4
and /home
on /dev/sda5
. Then run
mkfs.ext4 /dev/sda4 mkfs.ext4 /dev/sda5 mount /dev/sda4 /mnt mkdir /mnt/home && mount /dev/sda5 /mnt/hometo create new EXT4 file systems on those partitions and mount them.
Base System / Partitions, Part 3
Run the following to set up the base system andfstab
:
pacstrap /mnt base base-devel genfstab /mnt >> /mnt/etc/fstabAt this step we have a basic working Linux system that you can
chroot
or reboot into:
arch-chroot /mnt /bin/bash
SSD Performance issues
We should edit/etc/fstab
to improve SSD performance:
/dev/sda4 / ext4 defaults,noatime,discard 0 1 /dev/sda5 /home ext4 defaults,noatime,discard 0 2The default boot options may cause the SSD to hang. Add the following line to
/boot/refind_linux.conf
to prevent this:
"Default" "ro root=/dev/sda4 libata.force=noncq"
Keyboard / Locale / Time
echo "somehostname" > /etc/hostname # set up keyboard layout and system locale echo "KEYMAP=dvorak" > /etc/vconsole.conf vi /etc/locale.gen # uncomment what you want locale-gen echo "LANG=en_US.UTF-8" > /etc/locale.conf # set local time and set hardware clock to UTC ln -s /usr/share/zoneinfo/US/Pacific /etc/localtime hwclock --systohc --utc
Users
# set root password passwd # add user useradd -m -g users -G wheel -s /bin/bash someusername passwd someusername visudo # uncomment wheelOne last thing -- we should set up wifi before rebooting and logging in to the new account.
Yaourt, Wifi
Follow the instructions here to getyaourt
. Then use it to install broadcom-wl
from the AUR to get wifi drivers:
yaourt -S broadcom-wlI like to manage my connection with
wicd
so I'll get that as well:
pacman -S wicd systemctl enable wicd.serviceNow we can reboot and start playing around with the system!
XMonad with GNOME
Normally I would forgo GNOME, but they currently have (as far as I know) the best solution to solving the high-DPI scaling issue. Grab the following packages:pacman -S xorg-server xorg-xinit xorg-server-utils xf86-video-intel xf86-input-synaptics \ gnome-session gnome-settings-daemon yaourt -S xmonad-darcs xmonad-contrib-darcsThen follow the instructions from my previous post to make XMonad and GNOME play nicely with each other.
Additional steps / troubleshooting
The above steps will get a minimal working setup on your Retina Macbook Pro. However, there are still a lot of useful things you could configure to make your life easier:
Firefox
Changelayout.css.devPixelsPerPx
to 2 to make it scale everything up for the retina display.
Missing Cursor
Try runninggsettings set org.gnome.settings-daemon.plugins.cursor active false
USB Automounting
udiskie is a simple daemon to automount disks with very few dependencies, which is great for a minimal setup.
I'm thinking about installing Arch on my MacBook Pro 13 Retina as well. Your post seems to be a really good starting point. Thanks for sharing your insights.
ReplyDelete