Arch Linux stands out in the Unix/Linux world, particularly for its philosophy and technical choices. Without diving into debates, here is a technical guide to install Arch Linux with full disk encryption and the GNOME graphical interface.
This article is partly based on the excellent guide by Frederic BEZIES and the Arch Linux wiki . It is not a copy — just a personal interpretation with a few additions.
Why Arch Linux?#
I mainly use the Debian distribution, both professionally and personally. Debian’s apt package system avoids compatibility issues and prevents breaking the system too quickly. However, this reliability has a cost: you don’t get the latest features immediately (sometimes months later).
What attracted me to Arch Linux is its update model: Rolling Release. Updates become available very quickly after development, rather than after a specific testing period.
The risk of breakage in a rolling release is real and higher than with Debian, for example. Always keep up-to-date backups and test them occasionally.
Additionally, Arch Linux gives you very broad control over your system, which also means you must tell it exactly what to do. If you don’t know what you’re doing, prefer Debian.
Starting the installation#
In this guide, I will use Oracle VirtualBox as a Type 2 hypervisor. A virtual machine with 1 vCPU, 2 GB RAM, and a single 25 GB virtual disk.
Prerequisites#
When booting from the ISO image, the keyboard defaults to QWERTY. If you have an AZERTY keyboard, press loadkeys fr to switch layouts.
Creating the partition scheme#
I use the cgdisk utility, which forces GPT and UEFI standards.
Type the disk path (usually /dev/sda). To find your disk, run fdisk -l. An interface will appear to manage your partitions — for this guide: cgdisk /dev/sda.
Select the free space with the arrow keys, then navigate to “[ New ]” and press Enter. Accept the default for the first sector.
Proposed partition scheme:
bootpartition — 512 MB — typeef00: for the bootloader (GRUB2)systempartition — 20 GB — type8300(Linux Filesystem): for LVM
There are only two main partitions; the system volumes (/, /home, /tmp) will be created inside LVM.
When done, select “[ Write ]” to save the partition table.
Creating the file systems#
The technical choice here is LVM: snapshots, hot resize, straightforward management.
First, create an encrypted container with cryptsetup. Run cryptsetup benchmark to see benchmark results and choose the best algorithm for your hardware.
mkfs.vfat -F32 /dev/sda1
cryptsetup --type luks2 --cipher aes-xts-plain64 --hash sha256 --iter-time 2500 --pbkdf argon2id --use-passphrase luksFormat /dev/sda2Open the encrypted container and create the LVM physical volume:
cryptsetup luksOpen /dev/sda2 luks
pvcreate /dev/mapper/luksCreate the volume group (named “stoLocal” here):
vgcreate stoLocal /dev/mapper/luksUse pvdisplay and vgdisplay to inspect the LVM configuration.
Create logical volumes:
lvcreate -L 8G stoLocal -n root
lvcreate -L 2G stoLocal -n home
lvcreate -L 1G stoLocal -n tmpLoad the LVM module and activate volumes:
modprobe dm_mod
vgscan
vgchange -ayRun fdisk -l to confirm the logical volumes are now visible.
Mounting the system partitions#
Format the logical volumes with btrfs:
mkfs.btrfs /dev/mapper/stoLocal-root
mkfs.btrfs /dev/mapper/stoLocal-home
mkfs.btrfs /dev/mapper/stoLocal-tmpMount root first:
mount /dev/mapper/stoLocal-root /mntCreate mount points and mount:
mkdir /mnt/home
mkdir -p /mnt/boot/efi
mount -t vfat /dev/sda1 /mnt/boot/efi
mount /dev/mapper/stoLocal-home /mnt/homeSystem installation#
Pacman mirror list#
Since 2024, the mirror list is generated automatically via reflector, which selects the fastest servers based on your location.
Installing the base system#
pacstrap /mnt base base-devel linux lvm2Add useful packages for daily use:
pacstrap /mnt vi vim nano grub efibootmgr less openssh sudo systemd-resolvconf ntp linux-firmware networkmanager acpid cronie logrotate inetutils sysfsutils e2fsprogs man-db man-pages ttf-dejavu ttf-liberation ttf-opensans noto-fonts-emoji lsof strace htop iotop iftopGenerating the fstab file#
genfstab -Up /mnt >> /mnt/etc/fstabSetting the system language#
Edit /mnt/etc/locale.gen and uncomment en_US.UTF-8 (or your preferred locale):
nano /mnt/etc/locale.genCreate locale.conf:
nano /mnt/etc/locale.conf
# content
LANG="en_US.UTF-8"
LC_COLLATE=CGenerate locales: arch-chroot /mnt locale-gen
Create vconsole.conf for terminal keyboard layout:
echo "KEYMAP=us" > /mnt/etc/vconsole.confHostname#
echo "machine_name" > /mnt/etc/hostnameDate and time#
arch-chroot /mnt ln -sf /usr/share/zoneinfo/Europe/London /etc/localtime
arch-chroot /mnt hwclock --systohc --localtimeCreating user accounts#
Set the root password:
arch-chroot /mnt passwd rootCreate a user account:
arch-chroot /mnt useradd -g users -G storage -m -s /bin/bash username
arch-chroot /mnt passwd usernameGRUB configuration#
Configure mkinitcpio to include LVM and encryption:
sed -i '/^HOOK/s/filesystems/lvm2 encrypt filesystems/' /mnt/etc/mkinitcpio.confGenerate the ramdisk:
arch-chroot /mnt mkinitcpio -p linuxInstall GRUB for UEFI:
arch-chroot /mnt grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=arch_grub --recheckEdit /mnt/etc/default/grub and add the LUKS device to GRUB_CMDLINE_LINUX:
cryptdevice=/dev/sda2:luks:allow-discardsGenerate the GRUB config:
arch-chroot /mnt grub-mkconfig -o /boot/grub/grub.cfgEnabling services and rebooting#
arch-chroot /mnt systemctl enable {NetworkManager,ntpd,acpid,cronie,systemd-resolved}Unmount and reboot:
umount -R /mnt
rebootInstalling the GNOME graphical interface#
In Arch Linux, the privileged group is wheel. Add your user:
su root
usermod -aG wheel usernameInstalling the display server#
sudo pacman -S xorgSince GNOME 43, Wayland is the default and recommended display protocol. X.Org remains available as a fallback.
Installing graphics drivers#
Display all available drivers: sudo pacman -Ss xf86-video
Common drivers:
- Intel — open source:
sudo pacman -S xf86-video-intel - nVidia — open source:
sudo pacman -S xf86-video-nouveau - nVidia — proprietary:
sudo pacman -S nvidia - ATI — open source:
sudo pacman -S xf86-video-ati - VMware:
sudo pacman -S xf86-video-vmware - VirtualBox:
sudo pacman -S xf86-video-vesa
Do not install both the proprietary and open source driver at the same time.
Installing GNOME#
sudo pacman -S gnome-control-center gnome-session gnome-shell gnome-tweaks nautilus gnome-power-manager xdg-user-dirs-gtk gdm gnome-software-packagekit-pluginEnable the display manager:
sudo systemctl enable gdm.serviceEnd of installation#
The system is now complete with an up-to-date OS, essential packages, a configured user, and a graphical interface. Reboot your machine to test the new setup!