Arch Linux installation
Last updated
Last updated
My installation notes on installing Arch Linux to Thinkpad T480s. Heavily inspired and adapted from Mischa van den Burg's excellent video series.
Boot Arch Linux ISO from USB or some other way
Load Finnish keymap
loadkeys fi
Connect WiFi interface
iwctl
station wlan0 scan
station wlan0 connect $SSID
Delete old partitions with fdisk fdisk /dev/nvme0n1
write changes to disk
Delete old partition table
sgdisk --zap-all /dev/sdX
wipefs --all /dev/sdX
Create new partitions with fdisk
1Gb boot partition with type EFI
Rest of the disk space with Linux LVM type
Create LUKS encryption container to bigger partition
cryptsetup luksFormat /dev/nvme0n1p2
Create physical volume on top of the opened LUKS container
pvcreate /dev/mapper/cryptlvm
Create volume group
vgcreate thinkpad /dev/mapper/cryptlvm
Create logical volumes
lvcreate -L 4G thinkpad -n swap
lvcreate -L 32G thinkpad -n root
lvcreate -l 100%FREE thinkpad -n home
Create filesystems
mkfs.ext4 /dev/thinkpad/root
mkfs.ext4 /dev/thinkpad/home
mkswap /dev/thinkpad/swap
mount /dev/thinkpad/root /mnt
mkfs.fat -F32 /dev/nvme0n1p1
mount --mkdir /dev/nvme0n1p1 /mnt/boot
swapon /dev/thinkpad/swap
Install basic packages
pacstrap -K /mnt base linux linux-firmware
Generate fstab
genfstab -U /mnt >> /mnt/etc/fstab
Chroot to the installed Linux filesystem
arch-chroot /mnt
Install CPU microcode updates
pacman -Syu intel-ucode
Set timezone
ln -sf /usr/share/zoneinfo/Europe/Helsinki /etc/localtime
Sync clock
hwclock --systohc
Configure locales
locale-gen en_US.UTF-8
echo "LANG=en_US.UTF-8" > /etc/locale.conf
Enable systemd-networkd and systemd-resolved
systemctl enable systemd-networkd
systemctl enable systemd-resolved
Use systemd-resolved stub resolver
sudo ln -sf /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf
Configure wireless interface
Install ìwd
pacman -Syu iwd
Enable iwd
systemctl enable iwd
Following is needed to decrypt root filesystem
In /etc/mkinitcpio.conf
, set:
Install lvm2
package
``pacman -Syu lvm2
Regenerate initrmfs
mkinitcpio -P
bootctl install
Configure bootloader entry with correct option for the LUKS partition
Build initrmfs once more, just in case
mkinitcpio -P
mount /dev/thinkpad/home /home/
Fstab needs to be configured. genfstab
is part of arch-install-scripts
package
pacman -Syu arch-install-scripts
Remove old entrie from /etc/fstab
Generate new fstab
genfstab / >> /etc/fstab
Install sudo
pacman -Syu sudo
Create user
useradd -m tatu
Set password
passwd tatu
Add user to wheel group
usermod -aG wheel tatu
With visudo
remove comment from line
# %wheel ALL=(ALL:ALL) ALL
echo "thinkpad" > /etc/hostname
That's all, base system is now installed and it should be bootable.