Pre-installation (live environment)
Boot the live environment
Aquire an installation media, verify signature, prepare installation medium and boot the live environment as per the offical Installation Guide.
Set keyboard layout
loadkeys dkVerify EFI boot mode
ls /sys/firmware/efi/efivarsIf the directory does not exist, you need to find a way to reboot into EFI boot mode
Update system clock
timedatectl set-ntp truePartition the disks
gdisk /dev/sdaExample: /dev/sda1 EFI partition 260 MiB, /dev/sda2 linux partition remaining space
Format EFI partition
mkfs.fat -F32 /dev/sda1IMPORTANT: Refer to the wiki if you are dual booting, formatting your EFI partition will most likely make Windows unbootable
Format root partition
mkfs.btrfs /dev/sda2Mount root file system
mount /dev/sda2 /mntCreate EFI mount point
mkdir /mnt/bootMount EFI file system
mount /dev/sda1 /mnt/boot
Installation
Sort download mirrors
reflector --verbose --latest 5 --sort rate --save /etc/pacman.d/mirrorlistInstall base packages
pacstrap /mnt base base-devel linux linux-firmware amd-ucode vim nvidia
Configuration
Generate fstab file
genfstab -U /mnt >> /mnt/etc/fstabCopy default network config
cp /etc/systemd/network/* /mnt/etc/systemd/network/Change root into new system
arch-chroot /mntSet root password
passwdSet default editor
echo 'EDITOR=vim' >> /etc/environment
Localization
Set the time zone
ln -sf /usr/share/zoneinfo/UTC /etc/localtimeWrite software UTC time to hardware
hwclock --systohcUncomment locales to generate
vim /etc/locale.genen_DK.UTF-8 UTF-8 en_US.UTF-8 UTF-8Generate locales
locale-genSet LANG
echo 'LANG=en_DK.UTF-8' > /etc/locale.confPersist keymap
echo 'KEYMAP=dk' > /etc/vconsole.conf
Networking
Set hostname
echo 'ballz' > /etc/hostnameConfigure hosts file
vim /etc/hosts127.0.0.1 localhost ::1 localhostUse systemd DNS stub file
ln -sf /run/systemd/resolve/stub-resolv.conf /etc/resolv.confEnable systemd network services
systemctl enable systemd-networkd systemd-resolved
Initial ramdisks
Configure mkinitcpio
vim /etc/mkinitcpio.confHOOKS=(systemd autodetect modconf block filesystems keyboard fsck)Regenereate initramfs images
mkinitcpio --allpresets
Bootloader
Install bootloader
bootctl installConfigure bootloader
vim /boot/loader/loader.confconsole-mode max timeout 3Add boot entry
vim /boot/loader/entries/arch.conftitle Arch (linux) linux /vmlinuz-linux initrd /amd-ucode.img initrd /initramfs-linux.img options root=/dev/sda2Add fallback entry
vim /boot/loader/entries/arch-fallback.conftitle Arch (linux-fallback) linux /vmlinuz-linux initrd /amd-ucode.img initrd /initramfs-linux-fallback.img options root=/dev/sda2
Reboot into new system
Leave chroot
exitUnmount and reboot
umount --recursive /mnt && reboot
Userspace setup
Enable systemd-homed
systemctl enable systemd-homedCreate regular user
homectl create zach --member-of=wheelThe `wheel` group is for sudo
Enable sudo for wheel group
visudoUncomment '%wheel ALL=(ALL) ALL' the above to allow members of group `wheel` to execute any command (after entering root password)
Change to regular user
su zach
Install aurman
- curl -L -O https://aur.archlinux.org/cgit/aur.git/snapshot/aurman.tar.gz
Import GnuPG key
gpg --recv-keys 465022E743D71E39Unpack
tar -xvf aurman.tar.gz- cd aurman
Compile and install
makepkg -si
Install important AUR packages
- aurman -Syu systemd-boot-pacman-hook
IMPORTANT: the bootctl update hook is needed to ensure microcode updates
Install all the good shit
- sudo pacman -Syu xorg docker openssh termite ...