Install Arch Linux with GPT and UEFI

In this tutorial, /dev/sda is the installation hard disk.  Ensure this is correct for your situation using a tool like lsblk.

Zero out the partition table to avoid any weirdness

dd if=/dev/zero of=/dev/sda bs=1M count=40

Configure your disk layout

parted /dev/sda mklabel gpt
parted /dev/sda mkpart ESP fat32 1M 513M
parted /dev/sda set 1 boot on
parted /dev/sda mkpart primary ext4 513M 100%

Create the filesystems

mkfs.vfat -F32 /dev/sda1
mkfs.ext4 /dev/sda2

Mount the root filesystem and create and mount the boot mountpoint

mount /dev/sda2 /mnt
mkdir /mnt/boot
mount /dev/sda1 /mnt/boot

Strap on the base root filesystem

pacstrap /mnt base

Create the fstab

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

Chroot into the new Arch environment

arch-chroot /mnt /bin/bash

Configure the new environment

sed -i 's/#en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen
echo LANG=en_US.UTF-8 > /etc/locale.conf
export LANG=en_US.UTF-8
ln -s /usr/share/zoneinfo/US/Central /etc/localtime

Enable DHCP on your network interface (replace ethX with your interface name)

systemctl enable dhcpcd@ethX.service

Create the initramfs

mkinitcpio -p linux

Set the root password


Install and configure GRUB

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

Exit the chroot, umount, and reboot

umount /mnt/boot
umount /mnt