Arch on UEFI
19 July 2016
UEFI boot is weird, mostly because of backwards compatibility. Here’s a simple guide to setting up UEFI on GPT, assuming you already know how to do a [typical Arch install]({% post_url 2016-02-11-arch-setup %}).
Partitions
Gdisk supports GPT, so we’ll use that to partition our system disk.
gdisk /dev/sdaPress o to create a new GPT partition table, overwriting any existing contents.
Then, use n to create new partitions:
- Root partition (8300), full disk size - 1.5 GB.
- EFI partition (EF00), 1024 MB
Type p to output your new partition layout, and w to write the changes.
Finally, refresh the disks.
partprobeFilesystems
Create filesystems for the new partitions:
mkfs.ext4 /dev/sda1
mkfs.fat -F32 /dev/sda2Mount the new filesystems
mount /dev/sda1 /mnt
mkdir /mnt/boot
mount /dev/sda2 /mnt/bootBootloader
First, mount efivarfs if not already mounted:
mount -t efivarfs efivarfs /sys/firmware/efi/efivarsWe’ll use systemd-boot, as it’s included within systemd.
bootctl installWe’ll need to write a few new config files in /boot/loader:
vim /boot/loader/loader.confdefault arch
timeout 3
editor 0vim /boot/loader/entries/arch.conftitle Arch Linux
linux /vmlinuz-linux
initrd /initramfs-linux.img
options root=/dev/sda1 rwFinishing Up
exit # ^D is always superior :P
umount -R /mnt
reboot