Download Arch Linux ISO https://www.archlinux.org/download/
From Windows use rufus https://rufus.akeo.ie/
From Linux use dd where sdx is your USB drive. Run fdisk -l
to find your usb stick.
dd bs=4M if=/path/to/archlinux.iso of=/dev/sdx status=progress && sync
ls /sys/firmware/efi/efivars
to ensure you are booted in UEFI mode, if the dir does not exist, refer to your motherboards manual for how to boot in UEFI mode.
fdisk -l
to list disks on your system.fdisk /dev/sdx
where sdx is your chosen install drive.
Warning: the below commands will delete all data on your install drive
- Create a new GPT partition table with
g
- Create EFI partition with
n
512MiB - Create root partition with
n
the rest of the drive or whatever size you want for the root (/) partition. - Write to disk with
w
Where sdxa = your EFI partition, sdxb = your root (/) partition
- Format EFI partition
mkfs.fat -F32 /dev/sdxa
- Format root partition
mkfs.ext4 /dev/sdxb
Run ip link
to list network interfaces. Wired should work out of the box.
For Wireless
cp /etc/netctl/examples/wireless-wpa /etc/netctl/wireless
nano /etc/netctl/wireless
edit lines Interface=wlan0 (replace with your interface name), ESSID=YOURSSID and Key=YOURWIRELESSKEY.netctl enable wireless
netctl start wireless
- Test with
ping archlinux.org
mount /dev/sdxb /mnt
where /dev/sdxb is your root (/) partition.genfstab -U /mnt >> /mnt/etc/fstab
to generate fstab.pacstrap /mnt base
to install base packages.
timedatectl set-ntp true
automatic date/time.ln -sf /usr/share/zoneinfo/Region/City /etc/localtime
use your region/city for localization.hwclock --systohc
locale-gen
nano /etc/locale.conf
and addLANG=en_US.UTF-8
for en_US, UTF-8nano /etc/hostname
and set to your desired hostname
nano /etc/pacman.d/mirrorlist
and remove # from the mirror of your choice.- Install any of your desired packages with
pacman -S package-name
fallocate -l 512M /swap
chmod 600 /swap
mkswap /swap
swapon /swap
- Create /boot directory
mdkir /boot
- Mount EFI partition to /boot
mount /dev/sdxa /boot
- Create /esp/EFI/arch
mkdir -p /esp/EFI/arch
- Bind mount
/esp/EFI/arch
to/boot
so pacman can install kernel updates automatically.
Run mount --bind /esp/EFI/arch/ /boot
So they take effect at boot, add partitions and swap to fstab nano /etc/fstab
# /dev/sdxb (root /)
UUID=ROOTPARTUUID / ext4 rw,relatime,data=ordered 0 1
# /dev/sdxa (EFI)
UUID=EFIPARTUUID /esp vfat defaults 0 0
# bind mount /esp/EFI/arch to /boot
/esp/EFI/arch /boot none defaults,bind 0 0
# mount swap file
/swap none swap defaults 0 0
If using an intel CPU, install intel-ucode with pacman -S intel-ucode
/boot
and bind mounted /esp/EFI/arch/
will be the location for intel-ucode.img.
Boot to the USB stick in UEFI mode (important), then enter UEFI Shell v2.
-b
paginates output so you can view one page at a time.
List boot entries with bcfg boot dump -v -b
List drive mappings with map -b
Add your entry with bcfg boot add 3 fs1:\EFI\arch\vmlinuz-linux "Arch Linux"
where fs1 is the EFI partition and 3 is next available entry number.
- Create options.txt text file with
edit fs1:\EFI\arch\options.txt
- Enter the following content into options.txt where sdxb is your linux root (/) partition
initrd=\EFI\arch\intel-ucode.img initrd=\EFI\arch\initramfs-linux.img root=/dev/sdxb
- Add to the UEFI entry you created above with
bcfg boot add -opt 3 fs1:\EFI\arch\options.txt
where 3 is the entry and fs1 is the EFI partition.
Move entry to first position with bcfg boot mv 3 0
where 3 is the current position and 0 is the new position.
If you need to start over, you can remove entries with bcfg boot rm 3
where 3 is the entry to delete.
You're welcome! Glad it helped you out. I put this together to make it faster for myself in the future because it took me a while going through each of the arch linux wiki pages in order to get UEFI working on my laptop. It's nice not requiring a separate bootloader like grub.