Arch Linux Important Links
Basic Setup
Load keyboard layout
loadkeys dePerpare Disk
Partitioning
Target:
- 1G Boot Partition
- (RAM * 1.5) Swap Partition
- Root Partition
cfdisk /dev/sdaFormatting
mkfs.fat -F 32 /dev/sda1
mkswap /dev/sda2Create encrypted ext4 root partition
cryptsetup -y -v luksFormat /dev/sda3
cryptsetup open /dev/sda2 cryptroot
mkfs.ext4 /dev/mapper/rootMount partitions
mount /dev/mapper/cryptroot /mnt
mount --mkdir /dev/sda1 /mnt/boot
swapon /dev/sda2Prepare pacman
Update download server
reflector --save /etc/pacman.d/mirrorlist --country Germany --protocol httpsInstall arch
Install base arch packages
pacstrap -K /mnt base linux linux-firmware bash nano polkit networkmanager man-db htopGenerate fstab file with mounts for the partitions
genfstab -U /mnt >> /mnt/etc/fstabChange into new arch install
arch-chroot /mntSystem config
Timezone
ln -sf /usr/share/zoneinfo/Europe/Berlin /etc/localtimeMake sure hardware clock is in UTC
hwclock --systohcAdjust locale settings
nano /etc/locale.gen
# uncomment de_DE.UTF-8
# uncomment en_US.UTF-8
locale-gennano /etc/locale.confLANG=en_US.UTF-8Set Keymap for vconsole
nano /etc/vconsole.confKEYMAP=de-latin1Adjust Hostname, choose a name
nano /etc/hostnamearch-vmMake sure initramfs is configured for encryption
nano /etc/mkinitcpio.conf# ...
HOOKS=(base systemd autodetect modconf kms keyboard sd-vconsole block sd-encrypt filesystems fsck)
# ...Regenerate initramfs
mkinitcpio -PSet root-User Password
passwdBootloader
Install Grup
pacman -S grub efibootmgr
grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=GRUB
grub-mkconfig -o /boot/grub/grub.cfgGet UUID for ROOT partition
blkid /dev/sda3 -o value | head -1nano /etc/default/grubGRUB_ENABLE_CRYPTODISK=y
GRUB_CMDLINE_LINUX="... rd.luks.name=<device-UUID>=cryptroot ..."You can copy the uuid in the file by pipe it in to the file and then copy / past it with CTRL+K CTRL+U
eg:
blkid /dev/sda3 -o value | head -1 >> /etc/default/grubUpdate grub config
grub-mkconfig -o /boot/grub/grub.cfgReset and reboot
exit
umount -R /mnt
swapoff /dev/sda2
rebootSetup Arch
Ensure all needed systemd services are running
systemctl enable --now NetworkManagerAdd user
Install doas (sudo alternative)
pacman -S opendoasCreate config
nano /etc/doas.confpermit persist :wheelCreate user
useradd -m -g users -G wheel,audio,input,video <username>
passwd <username>doas nano /etc/pacman.conf...
ParallelDownloads = 5
...Reboot and login into the newly created user
Setup sway
pacman -S sway swayidle swaylock xorg-xwayland noto-fonts kitty waybar otf-font-awesome fzf bash-completion jq network-manager-applet firefox xdg-desktop-portal-wlr pavucontrol grim slurp brightnessctl awesome-terminal-fonts ttf-font-awesome pipewire pipewire-pulse wireplumber tlp tlp-rdw smartmontools acpi ethtool reflector rsyncsystemctl mask systemd-rfkill.service
systemctl mask systemd-rfkill.socket
systemctl enable --now tlp
systemctl enable --now reflectortodo: dotfiles