We will be creating dual boot for OS X and Linux with no special boot loader. For other setup, refer to [1]. We will keep all data on an external hard drive, so we do not need huge amount of space for the linux system. We will install from an USB thumb drive (will need at least 1GB in size), newer Minis do not have CD roms.
- Open
Disk Utility
and select the disk (not partition), clickPartition
(top tool bar) - There are at least 3 partitions: EFI, OS X, Recovery. Only OS X will be shown.
- Repartition your disk as follows:
- OS X (size: ~ tens of GB, type HFS+, for OS X)
- Arch tmp (size: ~ 10 GB, FAT, will be removed later)
- Download the
.iso
from download page - Open
Terminal
$ diskutil list
and find out its name (let's say it is/dev/disk2
)$ diskutil unmountDisk /dev/disk2
to unmount the drive# dd if=/path/to/arch-linux-image.iso of=/dev/rdisk2 bs=1m
(we replaceddisk
withrdisk
which is the "raw" disk in OS X and a lot faster, it is not a typo)$ diskutil eject /dev/disk2
- Hold
Alt
while booting - Select the USB disk
- Welcome to Arch Linux installer ;-)
-
Connect to network
$ wifi-menu
to setup wireless networking (assuming DHCP is available)
-
Setup time
$ timedatectl set-ntp true
- Check its status
$ timedatectl status
-
Partition the drive again ;-)
# cgdisk
- Remove the
Arch tmp
partition we created earlier. - Remember to create 128 MB gap after OS X partitions, by typing
+128M
for the start of the partition. - Add new
Arch boot
partition (~ 100 MB) - Add new
Arch root
partition (fill the space) - Swap file can be created later if needed
-
Create file systems
# mkfs.ext2 /dev/<arch boot>
# mkfs.ext4 /dev/<arch root>
-
Mount the partitions
# mount /dev/<arch root> /mnt
# mkdir /mnt/boot
# mount /dev/<arch boot> /mnt/boot
-
Edit mirror list
# vim /etc/pacman.d/mirrorlist
it will be used pac the next step, so take good care of it here
-
Install the base packages
# pacstrap /mnt base
-
Configure the system
# genfstab -U -p /mnt >> /mnt/etc/fstab
# arch-chroot /mnt /bin/bash
# echo <computer name> > /etc/hostname
# ln -s /usr/share/zoneinfo/<zone>/<subzone> /etc/localtime
# nano /etc/locale.gen
uncomment locales you want# locale-gen
# echo LANG=<your_locale> > /etc/locale.conf
- TODO: setup wireless networking
# mkinitcpio -p linux
# passwd
# pacman -S gptfdisk
# mkdir /boot/efi
# mount /dev/<EFI partition>
# pacman -S grub efibootmgr
# grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=arch
# grub-mkconfig -o /boot/grub/grub.cfg
# exit
orCtrl + D
# umount -R /mnt
# reboot
-
Install
bluez bluez-libs bluez-utils
-
udev
rule in/etc/udev/rules.d/10-local.rules
:# Set bluetooth power up ACTION=="add", KERNEL=="hci0", RUN+="/usr/bin/hciconfig hci0 up"
Let's assume wlan
is out interface for this setup.
-
Install b43-firmware from AUR
-
pacman -S wpa_supplicant
-
# vim /etc/wpa_supplicant/wpa_supplicant-wlan.conf
ctrl_interface=/run/wpa_supplicant update_config=1
-
# wpa_supplicant -B -i wlan -c /etc/wpa_supplicant/wpa_supplicant-wlan.conf
-
# wpa_cli
> scan > scan_results > add_network > set_network 0 ssid "MYSSID" > set_network 0 psk "passphrase" > enable_network 0 > save_config
-
Or instead of
wpa_cli
, dowpa_passphrase MYSSID passphrase > /etc/wpa_supplicant/wpa_supplicant-wlan.conf
-
# dhcpcd wlan
Use systemd to start the service:
# ln -s /usr/share/dhcpcd/hooks/10-wpa_supplicant /usr/lib/dhcpcd/dhcpcd-hooks/
# systemctl enable dhcpcd@wlan
perfect except for /boot/efi ...
had to fdisk it out - /dev/sda1 ...
mount /dev/sda1 /boot/efi
then add it to fstab manually
only other gotcha was after the install I lost my macos boot option ... but that should be easy enough to figure out :)