Skip to content

Instantly share code, notes, and snippets.

@scjudd
Created May 3, 2012 18:23
Show Gist options
  • Save scjudd/2587897 to your computer and use it in GitHub Desktop.
Save scjudd/2587897 to your computer and use it in GitHub Desktop.
MacMini4,1 Arch Linux Install Guide

Install Arch Linux on a MacMini4,1

  1. Boot into OS X

  2. In Disk Utility, make space for Arch partition

  3. Boot Arch Linux install with 'nomodeset' boot option

  4. Install gptfdisk (provides cgdisk)

pacman -S gptfdisk
  1. Use cgdisk to partition the drive NOTE: Supposedly, OS X wants 128M of 'padding' between partitions
cgdisk /dev/sda
  1. Create filesystems on new partitions

  2. Run through the normal Arch installer, EXCEPT:

    • Manually set mountpoints
    • Don't install grub
    • Skip bootloader install
  3. Chroot into the new Arch environment

mount -o bind /dev /mnt/dev
mount -t proc /proc /mnt/proc
mount -t sysfs /sys /mnt/sys
cp /etc/resolv.conf /mnt/etc/
grep -v "/mnt" /etc/mtab > /mnt/etc/mtab
vim /mnt/etc/mtab # add a line for the mounted root partition
chroot /mnt bash
  1. Apply updates
pacman-db-upgrade
pacman -Syyu
  1. Mount /dev/sda1 to /boot/efi
mkdir -p /boot/efi
mount /dev/sda1 /boot/efi
  1. Install grub2-efi-x86_64
pacman -S grub2-efi-x86_64
grub-install --directory=/usr/lib/grub/x86_64-efi --target=x86_64-efi \
    --efi-directory=/boot/efi --bootloader-id=arch_grub \
    --boot-directory=/boot --recheck --debug
grub-mkconfig -o /boot/grub/grub.cfg
  1. Boot into OS X

  2. Bless GRUB2 to set it as the default bootloader. WARNING: You may need an OS X install disk to reset the default bootloader

mkdir /Volumes/efi
mount -t msdos /dev/disk0s1 /Volumes/efi
bless --folder=/Volumes/efi --file=/Volumes/efi/EFI/arch_grub/grubx64.efi --setBoot
bless --mount=/Volumes/efi --file=/Volumes/efi/EFI/arch_grub/grubx64.efi --setBoot
  1. Reboot, GRUB2 should (eventually) load and Arch should boot :)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment