Arch Linux on Framework 13"
Installing Arch Linux might seem like a daunting task but the Arch wiki is great and have all the things needed to install Arch.
This post is therefore no replacement, this is just my attempt to record all the steps I take to install Arch on my machine and it might help someone else who is installing Arch on a Framework computer.
All info below can also be found on the Arch wiki!
Download the iso and signature to verify the image
curl -O https://ftp.lysator.liu.se/pub/archlinux/iso/2025.01.01/archlinux-x86_64.iso
curl -O https://ftp.lysator.liu.se/pub/archlinux/iso/2025.01.01/archlinux-x86_64.iso.sig
I'm in Sweden so I picked a mirror close to me, and this specific mirror is located at my old univerity so had to use that one
Verify iso
gpg --keyserver-options auto-key-retrieve --verify archlinux-x86_64.iso.sig
Copy iso to USB
sudo dd bs=4M if=archlinux-x86_64.iso of=/dev/sda conv=fsync oflag=direct status=progress
MAKE SURE /dev/sda is the USB drive!
Boot it up
Framework computers come with Secure Boot enabled, you need to disable that before proceeding
Follow the Arch wiki guide from here: https://wiki.archlinux.org/title/Installation_guide#Boot_the_live_environment
set timezone:
timedatectl set-timezone Europe/Stockholm
I need my disk to be encrypted for work so here it goes:
First, wipe the disk
cryptsetup open --type plain --key-file /dev/urandom --sector-size 4096 /dev/nvme0n1 to_be_wiped
dd if=/dev/zero of=/dev/mapper/to_be_wiped status=progress bs=1M
cryptsetup close to_be_wiped
Then partition the disk, I use one big partition for / and of course a small 1Gb partition for /boot
fdisk /dev/sda
Create the /boot Partition
Type
nto create a new partition. Select partition number 1. Accept the default for the first sector (by pressing Enter). Specify the last sector by entering+1G(this creates a 1GB partition).
Create the Root (/) Partition
Type n to create another new partition. Select partition number 2. Accept the default for the first sector (it should start right after the /boot partition). Press Enter for the last sector to use all remaining space.
TODO: Set the correct type GUID of the partitions
Press w to write the partition table and exit.
mkfs.fat -F 32 /dev/nvme0n1p1
https://wiki.archlinux.org/title/Dm-crypt/Encrypting_an_entire_system#LUKS_on_a_partition_with_TPM2_and_Secure_Boot
cryptsetup luksFormat /dev/nvme0n1p2
cryptsetup open /dev/nvme0n1p2 root
mount /dev/mapper/root /mnt
mount --mkdir /dev/sda1 /mnt/boot
Start installing software
pacstrap -K /mnt base linux linux-firmware amd-ucode man-db man-pages texinfo iwd vim
arch-chroot /mnt
ln -sf /usr/share/zoneinfo/Europe/Stockholm /etc/localtime
hwclock --systohc
Uncomment en_US.UTF-8 UTF-8 in /etc/locale.gen
and run
locale-gen
Locale settings
echo "LANG=en_US.UTF-8" > /etc/locale.conf
echo "KEYMAP=sv-latin1" > /etc/vconsole.conf
echo "mange-work" > /etc/hostname
Update /etc/mkinitcpio.conf
HOOKS=(base systemd autodetect microcode modconf kms keyboard sd-vconsole block sd-encrypt lvm2 filesystems fsck)
Install Boot manager
I was at first eager to build a UKI and boot from there but instead choose to go with a arch.conf
in the /boot/loader/entries directory
/boot/loader/entries/arch.conf
title Arch Linux
linux /vmlinuz-linux
initrd /initramfs-linux.img
options quiet
Change root password
passwd
Reboot and login with the root account
Now begins the fun stuff
Connect to internet
We already installed iwd so connect to your network following this guide: https://wiki.archlinux.org/title/Iwd#iwctl
systemctl enable --now systemd-networkd
systemctl enable --now systemd-resolved
ln -sf /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf
Check regulatory domain: https://wiki.archlinux.org/title/Network_configuration/Wireless#Respecting_the_regulatory_domain
Disable power saving mode to improve stability: https://wiki.archlinux.org/title/Network_configuration/Wireless#mt7921
useradd -m -G wheel -s /bin/bash mange
Install doas to allow user to run root commands
pacman -S opendoas
/etc/doas.conf
permit persist keepenv :wheel
This allows the users in group wheel, which includes the user we just created, to run doas.
exit root user and login to normal user now.
doas systemctl enable --new iwd to start the network manager and get internet
Install some well needed programs
sudo pacman -S --needed git ca-certificates base-devel
Dotfiles
There are many ways to manage dotfiles, I have them in a repo that I clone to ~/workspace/dotfiles
and then use stow to put them in place like this:
doas pacman -S stow
mkdir -p workspace
cd workspace
git clone https://codeberg.org/landerblom/dotfiles.git
cd dotfiles
stow -v -t /home/mange .
pacman and AUR
I like to use paru to install and update my system: https://github.com/Morganamilo/paru
So I'll start with installing that:
git clone https://aur.archlinux.org/paru.git
cd paru
makepkg -si
git and ca-certificates are needed to clone the repo.
UI
I like Hyprland as a window manager so I'll be installing that but I want it without X support which means compiling with the NO_XWAYLAND flag. There is a package in the AUR for this, but at the time or writing it's outdated so lets do it by hand instead.
git clone --recursive https://github.com/hyprwm/Hyprland.git
cd Hyprland
git checkout v0.47.1 # pick a good tag
paru -S ninja gcc cmake meson libxcb pixman wayland-protocols cairo pango seatd libinput libliftoff libdisplay-info cpio libxkbcommon tomlplusplus hyprlang-git hyprcursor-git hyprwayland-scanner-git xcb-util-errors hyprutils-git glaze hyprgraphics-git
cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -DNO_XWAYLAND:STRING=true -B build
cmake --build ./build --config Release --target all -j`nproc 2>/dev/null || getconf NPROCESSORS_CONF`
sudo cmake --install ./build
Hyprland
After starting Hyprland after this no fonts showed and some other things looked weird. But after installing some fonts it was easier to understand what was going on.
Status bar
paru -S waybar otf-font-awesome
Audio
paru -S pipewire wireplumber pipewire-audio pipewire-alsa pipewire-pulse
Reboot
Bluetooth
paru -S bluez bluez-utils
modprobe btusb
systemctl enable --now bluetooth
Fan control
paru -S fw-ectool-git
doas fw-ectool autofanctrl
Screenshots
paru -S slurp grim swappy wl-clipboard
Command is then grim -g "$(slurp)" | swappy -f -
Random software
paru -S firefox libnotify tofi mako jq pkgstats eza bat fg ripgrep hyprpaper hyprlock hypridle
firefoxpreferred web browserlibnotifyallow firefox, and others, to send notificationsmakoshow notificationstofidynamic menu for launching programsjqpretty print json in the terminalpkgstatssend usage stats back to Arch team for https://pkgstats.archlinux.de/funezaa betterls(alias ls=eza)bata better catfga better findripgrep(rg) a better grephyprpapermanage wall paper for Hyprland, because why nothypridleDo something on idlehyprlocklock screen utility
TuneD
https://github.com/redhat-performance/tuned
BIOS
First thing, check if you need to update BIOS. When writing this all drivers are already in the kernel so no need to do anything there.
Install BIOS and Driver bundle here: https://knowledgebase.frame.work/en_us/bios-and-drivers-downloads-rJ3PaCexh
Additional setting for the Framework computer
Source https://wiki.archlinux.org/title/Framework_Laptop_13
Community forum: https://community.frame.work/t/arch-linux-on-the-framework-laptop-13/3843