Macbook Pro Retina 15-inch, Late 2013
Model Identifier: MacBookPro11,2
The MacBook Pro 11,x consists of models with Retina display shipped by Apple In Late 2013 and Mid 2014.
Following ArchWiki guide.
Grab a cup of coffe and get ready, because life is not always easy 🙈
- OSX backup
- USB drive with Arch Linux ISO
- USB drive with macOS Sierra
- Ethernet to USB adapter
Increase system font with:
setfont sun12x22
Verify UEFI is enabled by:
ls /sys/firmware/efi/efivars
Test internet connection:
ping archlinux.org
(can try to reconnect with dhcpcd
)
Turn NTP on:
timedatectl set-ntp true
fdisk -l
------------------------------------------
/dev/sda 233.8GB
/dev/sda1 200M EFI System (/boot)
/dev/sda2 157.6GB macOS
/dev/sda2 619.9M Apple Recovery
/dev/sda4 75.2GB Arch Linux (/)
------------------------------------------
fdisk /dev/sda
(d
, n
then w
operations)
mount /dev/sda4 /mnt
mkdir /mnt/boot
mount /dev/sda1 /mnt/boot
/etc/pacman.d/mirrorlist
update /etc/pacman.d/gnupg/gpg.conf
with keyserver hkp://pgp.mit.edu:11371
then pacman-key --populate archlinux
and pacman-key --refresh-keys
then finnaly: pacstrap -i /mnt base base-devel
6. Create swap file
fallocate -l 4G /mnt/swapfile
chmod 600 /mnt/swapfile
mkswap /mnt/swapfile
swapon /mnt/swapfile
vim /etc/fstab > `/swapfile none swap defaults 0 0`
genfstab -U /mnt >> /mnt/etc/fstab
adjust swapfile path (without /mnt) and improve SSD:
vim /mnt/etc/fstab
Make sure that the line of the ext4 partition ends with a “2”, the swap partition’s line ends with a “0”, and the boot partition’s line ends with a “1”. This configures the partition checking on boot.
If you want to optimise your fstab for an SSD you can edit the ext4 partition options to look like this:
rw,relatime,data=ordered,discard
[TODO] put fstab example content here
arch-chroot /mnt
ln -sf /usr/share/zoneinfo/Brazil/East /etc/localtime
Run hwclock(8) to generate /etc/adjtime:
hwclock --systohc
Uncomment en_US.UTF-8 UTF-8 pt_BR.UTF-8 and other needed localizations in /etc/locale.gen, and generate them with:
locale-gen
Set the LANG variable in locale.conf(5) accordingly, for example:
echo LANG=en_US.UTF-8 > /etc/locale.conf
export LANG=en_US.UTF-8
set preferred keymap with (see available with localectl list-keymaps
)
echo "KEYMAP=us" >> /etc/vconsole.conf
echo "arch-mac" > /etc/hostname
and add matching entries to /etc/hosts
127.0.1.1 arch-mac.localdomain arch-mac
Note: "arch-mac" should be replaced by your preference
passwd
nano /etc/modules
insert two lines:
coretemp
applesmc
Use systemd-boot.
Once inside the chrooted enviroment, type the following command to install systemd-boot:
(make sure you mounted the EFI System Partition at /boot)
bootctl --path=/boot install
nano /boot/loader/entries/arch.conf
title Arch Linux
linux /vmlinuz-linux
initrd /intel-ucode.img
initrd /initramfs-linux.img
options root=/dev/sda4 rw elevator=deadline quiet splash
15. Intel microcode
pacman -S intel-ucode
check if /boot/intel-ucode.img
is in ESP
Finally you may have a working Arch Linux install 🙏
Because our system is not yet pleasantly usable 😄
To persist the biggest virtual console font:
pacman -S terminus-font
setfont ter-132n
echo "FONT=ter-132n" > /etc/vconsole.conf
Other interesting fonts.
Opted to use automatic setup with NetworkManager.
Download broadcom driver
curl -L -O https://aur.archlinux.org/cgit/aur.git/snapshot/broadcom-wl.tar.gz
tar -xvf briadcom-wl.tar.gz
makepkg -si
pacman -S iw wpa_supplicant dialog
Can test with ip link set wlp2s0 up
or wifi-menu
.
Let's disable netctl first:
netctl stop-all
and systemctl disable netctl
then
pacman -S networkmanager dhclient
systemctl enable NetworkManager && systemctl start NetworkManager
nmtui
[TODO] show cyrillic SSIDs
useradd -m -G wheel -s /bin/bash octavio
Edit sudoers file to enable running sudo (opitionaly without password)
visudo
Opted to use mbpfan daemon. It is very versatile.
[TODO] pacman install command
Configure daemon in file /etc/mbpfan.conf
:
Set min_fan_speed
with the lowest value of cat /sys/devices/platform/applesmc.768/fan*_min
(I personally put a little higher)
Set max_fan_speed
as the highest value of cat /sys/devices/platform/applesmc.768/fan*_max
Set max_temp
taking highest number returned by cat /sys/devices/platform/coretemp.*/hwmon/hwmon*/temp*_max
, divide by 1000.
In my case I use:
- min_fan_speed: 2160
- max_fan_speed: 5700
- low_temp: 52
- high_temp: 58
- max_temp: 84
- polling_interval: 7
X.org configuration and Intel video drivers
Install xorg with:
pacman -S xorg xorg-twm xorg-xclock xterm
or just xorg-server xorg-apps
- (installs lots of packages)
and intel drivers:
pacman -S mesa vulkan-intel xf86-video-intel intel-dri
- (still studying if one should use more than vesa)
To configure xorg manually, write in /etc/X11/xorg.conf.d/10-intel.conf
Section "Device"
Identifier "Intel Graphics"
Driver "intel"
Option "DRI" "2"
Option "AccelMethod" "sna"
Option "TearFree" "true"
EndSection
and inside /etc/X11/xorg.conf.d/11-monitor.conf
Section "Monitor"
Identifier "Monitor0"
EndSection
Section "Device"
Identifier "Device0"
Driver "intel"
EndSection
Section "Screen"
Identifier "Screen0" #Collapse Monitor and Device section to Screen section
Device "Device0"
Monitor "Monitor0"
DefaultDepth 24
SubSection "Display"
Depth 24
Modes "2880x1800_75.00"
EndSubSection
EndSection
Setup window manager (i3)
pacman -S i3
Installs i3-wm, i3blocks, i3lock, and i3status
https://i3wm.org/docs/userguide.html
pacman -S
the following:
- tree
- zsh
chsh -s $(which zsh)
- wget
- go
- git
Opted to use yay.
[TODO]
Alternatively to rEFInd, you can set native's apple boot manager with custom icons:
pacman -S wget librsvg
install libicns(AUR)
wget -O /tmp/archlinux.svg https://www.archlinux.org/logos/archlinux-icon-crystal-64.svg
rsvg-convert -w 128 -h 128 -o /tmp/archlogo.png /tmp/archlinux.svg
sudo png2icns /boot/.VolumeIcon.icns /tmp/archlogo.png
rm /tmp/archlogo.png
rm /tmp/archlinux.svg
[TODO]
[TODO]
[TODO]
Install linux-macbook(AUR) [TODO]
Awesome!!