Install Archlinux on MacBook Pro 9.2 (Mid-2012)

15 Oct 2013

Partition disks

    cgdisk

Format the partitions

    mkfs.vfat -F32 -s 2 /dev/sda1
    mkfs.ext2 /dev/sda2
    mkswap /dev/sda3
    mkfs.ext4 /dev/sda4
    mkfs.ext4 /dev/sda5

Mount the partitions

    mount /dev/sda4 /mnt
    mkdir /mnt/home
    mount /dev/sda5 /mnt/home
    mkdir /mnt/boot
    mount /dev/sda2 /mnt/boot
    mkdir /mnt/boot/efi
    mount /dev/sda1 /mnt/boot/efi
    swapon /dev/sda3

Install the base system

    pacstrap /mnt base
    pacstrap /mnt base-devel
    pacstrap /mnt grub
    pacstrap /mnt efibootmgr

Configure the system

    genfstab -p /mnt >> /mnt/etc/fstab

    # required to load efi vars
    efivars -l

    arch-chroot /mnt

    # because efivars is not loaded in chrooted env
    mount -t efivarfs efivarfs /sys/firmware/efi/efivars

    echo "tuxboot" > /etc/hostname

    vi /etc/locale.gen # uncomment your locales
    locale-gen
    echo "LANG=fr_FR.UTF-8" >> /etc/locale.conf
    export LANG=fr_FR.UTF-8

    echo "KEYMAP=fr-pc" >> /etc/vconsole.conf

    ln -s /usr/share/zoneinfo/Europe/Paris /etc/localtime

    mkinitcpio -p linux

Install and configure a bootloader

    grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=arch_grub --recheck
    grub-mkconfig -o /boot/grub/grub.cfg

    # change boot order!
    efibootmgr -o 0001,0000