Skip to main content

Install

Preparation

First, change keyboard:

loadkeys de_CH-latin1

Maybe connect to WiFi using iwctl.

Create a boot partition and a LUKS partition. Make sure to use GPT and that the boot partition has type EFI System.

mkfs.fat -F 32 [boot]

Next, setup LVM-on-LUKS:

cryptsetup luksFormat [partition]
cryptsetup open [partition] cryptlvm

Setting up LVM:

pvcreate /dev/mapper/cryptlvm
vgcreate cryptvol /dev/mapper/cryptlvm

Creating a logical volume for each partition:

lvcreate -L 10G cryptvol -n swap
lvcreate -L 10G cryptvol -n root
lvcreate -l 100%FREE cryptvol -n home

Format and mount filesystems:

mkfs.ext4 /dev/cryptvol/root
mkfs.ext4 /dev/cryptvol/home
mkswap /dev/cryptvol/swap

mount /dev/cryptvol/root /mnt
mount --mkdir /dev/cryptvol/home /mnt/home
mount --mkdir [boot] /mnt/boot
swapon /dev/cryptvol/swap

pacstrap:

pacstrap -K /mnt base linux linux-firmware vim lvm2

See installation guide for other packages that may be needed, e.g. ucode.

genfstab:

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

Basics

Continue with basic setup:

arch-chroot /mnt
ln -sf /usr/share/zoneinfo/Europe/Zurich /etc/localtime
hwclock --systohc

Uncomment de_CH and en_US in /etc/locale.gen. Run locale-gen. Set /etc/locale.conf to LANG=en_US.UTF-8 and /etc/vconsole.conf to KEYMAP=de_CH-latin1. Also change /etc/hostname.

Edit /etc/mkinitcpio.conf HOOKS:

HOOKS=(base systemd autodetect microcode modconf kms keyboard sd-vconsole block sd-encrypt lvm2 filesystems fsck)

If there are issues with the password prompt not being displayed, remove the kms hook as it conflicts with the sd-encrypt hook.

Regenerate initramfs:

mkinitcpio -P

Change root password:

passwd

Install bootloader:

bootctl install

Edit /boot/loader/loader.conf:

default arch.conf

Edit /boot/loader/entries/arch.conf:

title   Arch Linux
linux /vmlinuz-linux
initrd /initramfs-linux.img
options rd.luks.name=[id]=cryptvol root=/dev/mapper/cryptvol-root rw resume=/dev/mapper/cryptvol-swap initrd=/initramfs-linux.img

where [id] is the UUID of the LUKS partition.

Networking

pacman -S networkmanager
systemctl enable NetworkManager

Create user

pacman -S sudo
useradd -m -g users -G wheel thomas
passwd thomas

Uncomment %wheel ALL=(ALL) ALL in /etc/sudoers.

Reboot

Now reboot.