Arch Linux Install + Recovery – The Only Guide You’ll Ever Need

Linux installation

From UEFI boot to desktop — with troubleshooting, example outputs, and step-by-step commands.

Before you begin: Replace placeholders like <DISK>, <DISK_EFI>, <DISK_ROOT>, <HOSTNAME>, <USER>, <SSID>.

Table of Contents

0) Boot ISO & Verify Environment

Confirm UEFI mode, sync time, connect to the internet, and test connectivity.

Copied!
loadkeys us
ls /sys/firmware/efi/efivars   # UEFI must exist
timedatectl set-ntp true
timedatectl

# Wi-Fi with iwctl
iwctl
device list
station wlan0 scan
station wlan0 get-networks
station wlan0 connect "<SSID>"
exit

# Test network
ping -c 2 archlinux.org  # expect ~0% packet loss

1) Identify Target Disk

Make sure you know which disk to wipe (the USB installer often shows as /dev/sdX).

Copied!
lsblk -o NAME,SIZE,TYPE,MOUNTPOINT
# Example:
# sda         28.9G disk
# └─sda1      28.9G part /run/archiso/bootmnt   (your USB)
# nvme0n1   953.9G disk                         (internal SSD)
Warning: Double-check the disk before wiping. This action is destructive.

2) Partition & Format (UEFI)

Create a GPT layout with an EFI system partition and a root partition (optional swap).

Clean reinstall? The next two commands erase all data on <DISK>.
Copied!
sgdisk --zap-all /dev/<DISK>
wipefs -a /dev/<DISK>

2.1 Create GPT: EFI (512MiB) + ROOT (rest) [+ SWAP optional]

Copied!
fdisk /dev/<DISK>
g
n   # EFI  +512M    → t → 1   (EFI System)
n   # ROOT rest     → (Linux filesystem)
# optional:
n   # SWAP size≈RAM → t → 19  (Linux swap)
w

# sanity check
lsblk -o NAME,PARTLABEL,SIZE,TYPE

2.2 Format

Copied!
mkfs.fat -F32 /dev/<DISK_EFI>
mkfs.ext4 /dev/<DISK_ROOT>
# optional swap:
mkswap /dev/<DISK_SWAP> && swapon /dev/<DISK_SWAP>

3) Mount Filesystems

Mount root at /mnt and the EFI partition at /mnt/boot.

Copied!
mount /dev/<DISK_ROOT> /mnt
mkdir -p /mnt/boot
mount /dev/<DISK_EFI> /mnt/boot

findmnt -rno TARGET,SOURCE /mnt /mnt/boot
# expect:
# /mnt       /dev/<DISK_ROOT>
# /mnt/boot  /dev/<DISK_EFI>

4) Mirrors & Keyring (Optional)

If downloads are slow or signatures fail, refresh mirrors/keyring.

Copied!
pacman -Sy --noconfirm reflector archlinux-keyring
reflector --country 'Malta,Italy,Germany' --protocol https --sort rate --save /etc/pacman.d/mirrorlist

5) Base Install

Install the Linux kernel, firmware, editor, and NetworkManager (plus microcode for your CPU).

Copied!
pacstrap -K /mnt base linux linux-firmware networkmanager vim
# CPU microcode (choose ONE)
pacstrap -K /mnt intel-ucode     # Intel
# OR
pacstrap -K /mnt amd-ucode       # AMD

6) Fstab & chroot

Generate mounts, verify UUIDs, then chroot into the new system.

Copied!
genfstab -U /mnt >> /mnt/etc/fstab
cat /mnt/etc/fstab
arch-chroot /mnt

# expect fstab lines with UUIDs for /, /boot, and swap (if created)

7) Timezone, Locale, Host, Users

7.1 Timezone & Clock

Copied!
ln -sf /usr/share/zoneinfo/Europe/Malta /etc/localtime
hwclock --systohc

7.2 Locale

Copied!
sed -i 's/^#en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen
locale-gen
echo 'LANG=en_US.UTF-8' > /etc/locale.conf

7.3 Hostname & Hosts

Copied!
echo <HOSTNAME> > /etc/hostname
cat >/etc/hosts <<'EOF'
127.0.0.1   localhost
::1         localhost
127.0.1.1   <HOSTNAME>.localdomain <HOSTNAME>
EOF

7.4 Root Password

Copied!
passwd

8) Bootloader (GRUB)

Install GRUB to the EFI partition and generate a configuration.

Copied!
pacman -S --noconfirm grub efibootmgr
grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=Arch
grub-mkconfig -o /boot/grub/grub.cfg

# expect:
# Installing for x86_64-efi platform. Installation finished. No error reported.
# Generating grub configuration file ... done
Dual-boot Windows: enable OS prober.
Copied!
pacman -S os-prober
sed -i 's/^#\?GRUB_DISABLE_OS_PROBER=.*/GRUB_DISABLE_OS_PROBER=false/' /etc/default/grub
os-prober
grub-mkconfig -o /boot/grub/grub.cfg

9) Enable Network & Reboot

Enable networking, exit chroot, unmount safely, and reboot into your new system.

Copied!
systemctl enable NetworkManager
exit
umount -R /mnt
reboot

10) First Boot: User, Drivers, Desktop

10.1 Create user + sudo

Copied!
useradd -m -G wheel -s /bin/bash <USER>
passwd <USER>
EDITOR=visudo visudo     # uncomment: %wheel ALL=(ALL:ALL) ALL

10.2 GPU Drivers

Detect GPU and install the appropriate driver stack.

Copied!
lspci | grep -E "VGA|3D"
# Intel:
pacman -S mesa vulkan-intel
# AMD:
pacman -S mesa vulkan-radeon
# NVIDIA:
pacman -S nvidia nvidia-utils nvidia-settings
echo "options nvidia_drm modeset=1" > /etc/modprobe.d/nvidia-kms.conf

10.3 Desktop Environment

Pick one desktop; enable its display manager.

Copied!
# KDE
pacman -S xorg plasma sddm konsole dolphin
systemctl enable sddm

# GNOME
pacman -S xorg gnome gdm
systemctl enable gdm

# XFCE (lightweight)
pacman -S xorg xfce4 xfce4-goodies lightdm lightdm-gtk-greeter
systemctl enable lightdm

reboot

10.4 Connect Wi-Fi after desktop (if needed)

Copied!
nmcli device
nmcli device wifi list
nmcli device wifi connect "<SSID>" password "<password>"

Common Errors & Recoveries

A) No internet / DNS error

Symptom: Temporary failure in name resolution

Copied!
systemctl restart systemd-resolved
timedatectl set-ntp true
# Reconnect Wi-Fi with iwctl

B) pacstrap fails to retrieve files

Fix mirrors and keyring; then retry.

Copied!
pacman -Sy --noconfirm archlinux-keyring
reflector --country 'Malta,Italy,Germany' --protocol https --sort rate --save /etc/pacman.d/mirrorlist
# Retry pacstrap

C) “signature is unknown trust” during pacman

Copied!
pacman -Sy archlinux-keyring
pacman -Syu

D) Wrong EFI path used with GRUB

Match the --efi-directory to where you mounted EFI.

Copied!
# If EFI mounted at /boot/efi:
grub-install --efi-directory=/boot/efi --target=x86_64-efi --bootloader-id=Arch
# If EFI mounted at /boot:
grub-install --efi-directory=/boot --target=x86_64-efi --bootloader-id=Arch

E) Black screen after NVIDIA

Try Xorg session, enable DRM modeset, or use a temporary VESA driver.

Copied!
# Switch to a TTY (Ctrl+Alt+F3), then:
echo "options nvidia_drm modeset=1" > /etc/modprobe.d/nvidia-kms.conf
pacman -S xf86-video-vesa   # temporary fallback
# If using GDM Wayland, disable Wayland or choose Xorg session

F) Boots straight to Windows (Arch entry missing)

From ISO, mount, chroot, reinstall GRUB, ensure the Arch entry is first.

Copied!
# From ISO:
mount /dev/<ROOT> /mnt
mount /dev/<EFI>  /mnt/boot
arch-chroot /mnt
grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=Arch
grub-mkconfig -o /boot/grub/grub.cfg
efibootmgr            # set Arch first if needed

G) “Emergency mode” at boot (fstab UUID mismatch)

Fix the UUIDs in /etc/fstab to match the actual partitions.

Copied!
# From ISO:
lsblk -f                      # copy actual UUIDs
mount /dev/<ROOT> /mnt
nano /mnt/etc/fstab           # fix to match lsblk -f

H) Rescue chroot (general repair)

Use this whenever the system doesn’t boot; then re-run the failed step (GRUB, kernel, etc.).

Copied!
lsblk -f
mount /dev/<ROOT> /mnt
mount /dev/<EFI>  /mnt/boot
arch-chroot /mnt
# examples:
# grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=Arch
# grub-mkconfig -o /boot/grub/grub.cfg
# pacman -S linux linux-firmware
# mkinitcpio -P

Clean Reinstall Loop

When you want a clean slate, repeat this sequence.

Copied!
# 1) ISO → set NTP → connect network
# 2) lsblk to confirm target
# 3) sgdisk --zap-all + wipefs -a
# 4) Partition → Format → Mount
# 5) Mirrors → Base → Fstab → chroot
# 6) Time/Locale/Host → GRUB → NetworkManager
# 7) Reboot → User/Sudo → Drivers → Desktop
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments