https://wiki.archlinux.org/title/Installation_guide
Connect to the internet! Cable should detect automatically, but wifi needs a few steps:
iwctl
device list
station wlan0 connect <SSID>
Then test by pinging somewhere
ping archlinux.org
Next is partitioning and setting up disks
fdisk -l
fdisk /dev/sda
- Create an EFI partition with at least 1GB (maybe 2)
- Create a Linux Partition with whatever size
- Swapfile we will create later
mkfs.btrfs /dev/sda2
mkfs.fat -F 32 /dev/sda1
Then mount things and install
mount /dev/sda2 /mnt
mount --mkdir /dev/sda1 /mnt/boot
pacstrap -K /mnt base linux linux-firmware
Config things
genfstab -U /mnt > /mnt/etc/fstab
arch-chroot /mnt
ln -sf /usr/share/zoneinfo/Europe/Berlin /etc/localtime
hwclock --systohc
nvim /etc/locale.gen # uncomment the locale (probably en_US...)
locale-gen
echo LANG=en_US.UTF-8 >> /etc/locale.conf
echo gastly >> /etc/hostname
mkinitcpio -P
passwd
Now we are at the bootloader shenanigans. We'll use systemd-boot because yes.
https://wiki.archlinux.org/title/Systemd-boot
bootctl install
# /boot/loader/loader.conf
default arch.conf
timeout 2
console-mode max
editor no
blkid /dev/sda2 should print the UUID of the disk
# /boot/loader/entries/arch.conf
title Arch Linux
linux /vmlinuz-linux
initrd /intel-ucode.img
initrd /initramfs-linux.img
options root=UUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx rw
# /boot/loader/entries/arch-fallback.conf
title Arch Linux (fallback initramfs)
linux /vmlinuz-linux
initrd /intel-ucode.img
initrd /initramfs-linux-fallback.img
options root=UUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx rw
This ucode thing can be a thing as well
pacman -S amd-ucode / pacman -S intel-ucode
User so we don't use root all the time
pacman -S zsh
useradd -m -G wheel -s /bin/zsh bp
passwd bp
pacman -S sudo
EDITOR=nvim visudo
# search for `wheel` and uncomment the appropriate one
Enable the network manager because otherwise no internet
pacman -S networkmanager
systemctl enable NetworkManager
exit
umount -R /mnt
reboot now
# connect to wi-fi
nmcli device wifi connect <SSID> password <PASS>
pacman -S btrfs-progs
btrfs subvolume create /swap
btrfs filesystem mkswapfile --size 4g --uuid clear /swap/swapfile
swapon /swap/swapfile
nvim /etc/fstab
# /swap/swapfile none swap defaults 0 0