May 16, 2021
Arch Linux installation notes

My notes on installing Arch Linux. These are very personalized (messy) notes and I wouldn’t recommend following them step-by-step at this time.

install information:

  • systemd-boot
  • luks encryption
  • zen kernel
  • sway

verify we booted via efi

ls /sys/firmware/efi/efivars

if this command shows the directory without error, proceed

system clock

timedatectl set-ntp true

partitioning

I use cfdisk

partitionsizecodefs
boot (/dev/sda1)512.0 MiBef00efi
root (/dev/sda2)the rest8300ext4

create encrypted root partition

cryptsetup luksFormat /dev/sda2
cryptsetup open /dev/sda2 cryptroot
mkfs.ext4 /dev/mapper/cryptroot
mount /dev/mapper/cryptroot /mnt

create boot partition

mkfs.fat -F32 /dev/sda1
mkdir /mnt/boot
mount /dev/sda1 /mnt/boot

install base arch system

pacstrap /mnt base linux-zen linux-zen-headers linux-firmware sudo neovim

generate fstab file

genfstab -U /mnt /mnt/etc/fstab

chroot into your fresh install

arch-chroot /mnt

set timezone

ln -sf /usr/share/zoneinfo/America/Chicago /etc/localtime
hwclock --systohc

locale

echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen
locale-gen
localectl set-locale LANG=en_US.UTF-8

basic network configuration

echo "myhostname" > /etc/hostname

modify /etc/hosts

127.0.0.1	localhost
127.0.1.1	myhostname.localdomain	myhostname

replace myhostname with whatever you like

create /etc/systemd/network/20-wired.network

[Match]
Name=enp3s0

[Network]
DHCP=yes
DNS=1.1.1.1
DNS=1.0.0.1

[DHCP]
UseDNS=false

edit /etc/systemd/resolved.conf to change dns client settings

make sure software that relies on resolv.conf works

ln -rsf /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf
systemctl enable systemd-networkd systemd-resolved

mkinitcpio configuration

modify /etc/mkinitcpio.conf, add ’encrypt’ to hooks

HOOKS=(base udev autodetect modconf block filesystems keyboard encrypt fsck)

generate initramfs

mkinitcpio -P

set root passwd

passwd

patch cpu microcode

install either amd-ucode or intel-ucode depending on your system’s cpu

pacman -S intel-ucode

software

pacman -S sudo base-devel zsh git tmux openssh

create user

useradd -m -G wheel,seat -s /bin/zsh rj1
passwd rj1

sudo

echo "%wheel ALL=(ALL:ALL) ALL" >> /etc/sudoers
su rj1

bootloader

install systemd-boot

bootctl install

create /boot/loader/entries/arch.conf

title   arch
linux   /vmlinuz-linux-zen
initrd  /intel-ucode.img
initrd  /initramfs-linux-zen.img
options cryptdevice=UUID=UID-GOES-HERE:cryptroot root=/dev/mapper/cryptroot rw

:r!blkid /dev/sda2 -sUUID -ovalue in vim to insert the desired UUID

modify /boot/loader/loader.conf

default      arch.conf
timeout      2
console-mode max
modifyor     no

review boot config

bootctl list

reboot

exit
reboot

software

sway waybar alacritty noto-fonts-cjk noto-fonts-emoji swappy weechat libnotify
mako notmuch mitmproxy oath-toolkit qrencode zbar grim slurp wf-recorder fzf
swaybg wl-clipboard swayidle firefox chromium ncmpcpp php python ruby ruby-docs
foot nmap bc mpd mpc ncmpcpp ripgrep fd qt5-wayland qt6-wayland mpv resolvconf
wireplumber pipewire pipewire-jack pipewire-alsa pipewire-pulse alsa-utils bat
man-db netcat rsync hugo isync msmtp w3m alot newsboat jq zathura
zathura-pdf-mupdf pass wireguard-tools yadm

enable services

systemctl enable seatd

other ones like pipewire, etc.

aur software

git clone https://aur.archlinux.org/paru-bin.git
cd paru
makepkg -si
paru -S tessen rofi-lbonn-wayland pinentry-rofi pass-coffin pass-otp vimiv-qt \
nerd-fonts-hack swaylock-effects-git nnn-nerd nvm dict dstask wob tomb rofimpd
yadm clone https://git.sr.ht/~rj1/dotfiles

have fun!