The following is my dual OSX - Arch linux set up:
Use the latest Arch usb to boot from it
Use the US keyboard otherwise you have to select your keymap manually on “/usr/share /kbd/keymaps” directory
loadkeys <yours>
mkfs.ext4 /dev/sda5 (Arch bootloader) 128 MiB for Apple HFS+
mkfs.ext2 /dev/sda6 (boot linux)256 MiB
mkswap /dev/sda7 (swap) 2 Gig
mkfs.ext4 /dev/sda8 (root) 15 Gig
mkfs.ext4 /dev/sda9 (home) 23 Gig
mount /dev/sda8 /mnt
mkdir /mnt/boot && mount /dev/sda6 /mnt/boot
mkdir /mnt/home && mount /dev/sda9 /mnt/home
swapon /dev/sda7
Plugin ethernet cable via adapter. It usually connects automatically. If necessary run the following:
wifi-menu
To check connection:
ping yahoo.com
pacstrap /mnt base base-devel
genfstab -p /mnt >> /mnt/etc/fstab
nano /mnt/etc/fstab
Make the following changes for SSD:
/dev/sda6 /boot ext2 defaults,relatime,stripe=4 0 2
/dev/sda8 / ext4 defaults,noatime,discard,data=writeback 0 1
/dev/mapper/home /home ext4 defaults,noatime,discard,data=ordered 0 2
/swapfile none swap defaults 0 0
pacman -Sy
nano /etc/pacman.conf
un-comment “multilib” repo:
[multilib]
Include = /etc/pacman.d/mirrorlist
Add Yaourt repository at the bottom:
[archlinuxfr]
siglevel = Never
Server = http://repo.archlinux.fr/$arch
arch-chroot /mnt /bin/bash
Set up locale
sudo nano /etc/locale.gen
Uncomment desired locals
en_US.UTF-8 UTF-8
en_US ISO-8859-1
Generate locales
locale-gen
echo LANG=en_US.UTF-8 > /etc/locale.conf
export LANG=en_US.UTF-8
Check console fonts at https://alexandre.deverteuil.net/pages/consolefonts/
nano /etc/vconsole.conf
Insert/edit reqyuired keymap:
KEYMAP=us
FONT=lat9w-16
Ensure you've chosen the correct keymap otherwise you might be in trouble when login the first time.
rm /etc/localtime
ln -s /usr/share/zoneinfo/America/New_York /etc/localtime
hwclock --systohc --utc
echo ArchZain > /etc/hostname
nano /etc/hosts
Add the new hostname lines
127.0.0.1 localhost.localdomain localhost ArchZain
::1 localhost.localdomain localhost ArchZain
pacman -S networkmanager
systemctl enable NetworkManager
nano /etc/mkinitcpio.conf
Insert “keyboard” after HOOKS as necessary:
HOOKS="base udev autodetect modconf block keyboard zfs filesystems"
Run mkinitcpio and set root password:
mkinitcpio -p linux
passwd
pacman -S grub-efi-x86_64
Edit Grub
nano /etc/default/grub
Change it as follows:
GRUB_CMDLINE_LINUX_DEFAULT="quiet rootflags=data=writeback libata.force=1:noncq"
Also fix submenu
GRUB_DISABLE_SUBMENU=y
grub-mkconfig -o boot/grub/grub.cfg
grub-mkstandalone -o boot.efi -d usr/lib/grub/x86_64-efi -O x86_64-efi --compress=xz boot/grub/grub.cfg
Insert USB and list partitions
fdisk -l
Now copy boot.efi to the USB drive
mkdir /mnt/usbdisk && mount /dev/sdc1 /mnt/usbdisk
cp boot.efi /mnt/usbdisk
umount /dev/sdc1
Unmount your partitions
umount /mnt/boot
umount /mnt/home
swapoff /dev/sda7
umount /mnt
exit
reboot
Power and press option key to boot in OSX
Open Disk Utility and format (“Erase”) /dev/disk0s5 ([128MB] Apple HFS+ “Boot Loader”)using Mac journaled filesystem
Open terminal to set Arch in apple bootloader as default boot option.
cd /Volumes/ARCH\ BOOT
mkdir System mach_kernel
cd System
mkdir Library
cd Library
mkdir CoreServices
cd CoreServices
touch SystemVersion.plist
nano SystemVersion.plist
<xml version="1.0" encoding="utf-8"?>
<plist version="1.0">
<dict>
<key>ProductBuildVersion</key>
<string></string>
<key>ProductName</key>
<string>Linux</string>
<key>ProductVersion</key>
<string>Arch Linux</string>
</dict>
</plist>
User terminal or finder to copy boot.efi
Disable the System Integrity Projection of OS X before proceeding: Restart the computer, while booting hold down Command-R to boot into recovery mode. Navigate to the “Utilities > Terminal” in the top menu bar.
csrutil disable
Restart option key in OSX open terminal and type the following:
sudo bless --device /dev/disk0s5 --setBoot
Reboot option key and select Arch linux to boot.
login using root password
useradd -m -g users -G wheel,storage,power -s /bin/bash zain
passwd zain
ping yahoo.com
If not connected do the following otherwise skip this step:
ip link
systemctl enable dhcpcd@ens9
ip link set ens9 up
pacman -S sudo
EDITOR=nano visudo
Unckeck as follows:
%wheel ALL=(ALL) ALL
Bash completion
pacman -S bash-completion
Exit root
exit
Check I3 installation and optimization for MacBook Air.