Installing Arch Linux

Here is how you can recreate my Arch system. Some properties are:

I. Pre-boot

=> Installation guide

  1. Get an ISO from a mirror.

  1. Get the signature from the Arch Downloads page.

  1. Verify the ISO with pacman-key -v *.iso.sig.

  1. Check the name of the USB key with lsblk. I assume it is /dev/sdb.

  1. Move the ISO to the USB key with cat *.iso > /dev/sdb.

II. Boot

  1. Boot from the USB key.

  1. Run loadkeys de-latin1.

  1. Check ls /sys/firmware/efi/efivars.

  1. Use iwctl to get a wireless internet connection. Inside iwctl, do:

help
device list
station DEVICE scan
station DEVICE get-networks
station DEVICE connect SSID
^D

  1. Check ping archlinux.org.

  1. Check timedatectl status.

III. Partition the disk

  1. Check the name of the disk with lsblk. I assume it is /dev/sdb.

  1. Use fdisk /dev/sdb to partition the disk like so:

a. Create a new GPT.

b. Create a first partition of size 512M.

c. Let the first partition be of type C12A7328-F81F-11D2-BA4B-00A0C93EC93B (EFI system).

d. Create a second partition.

e. Let the second partition be of type 4F68BCE3-E8CD-4DB1-96E7-FBCAF984B709 (Linux x86-64 root).

f. Let the second partition have the label “Root”.

g. Print and verify the partition table.

h. Write.

IV. Format and mount root, boot, and swap

  1. Check the name of the root partition with lsblk. I assume it is /dev/sdb2.

  1. Format and mount the root partition like so:

cryptsetup luksFormat /dev/sdb2
cryptsetup open /dev/sdb2 root
mkfs.ext4 /dev/mapper/root
mount /dev/mapper/root /mnt

  1. Check the name of the boot partition with lsblk. I assume it is /dev/sdb1.

  1. Format and mount the boot partition like so:

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

  1. Make, format, and activate the swap file like so:

dd if=/dev/zero of=/mnt/swapfile bs=1M count=2048 status=progress
chmod 0600 /mnt/swapfile
mkswap -U clear /mnt/swapfile
swapon /mnt/swapfile

V. Installation

  1. Check /etc/pacman.d/mirrorlist.

  1. Run pacstrap -K /mnt base linux linux-firmware nano man-db man-pages texinfo.

VI. Post-installation

  1. Run genfstab -U /mnt >> /mnt/etc/fstab.

  1. Check /mnt/etc/fstab. It should look something like this:

#      
# /dev/mapper/root
UUID=1234abcd-1234-abcd-1234-abcd1234abcd / ext4 rw,relatime 0 1
# /dev/sda1
UUID=1234-ABCD /boot vfat rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro 0 2
/swapfile none swap defaults 0 0

  1. Run arch-chroot /mnt.

  1. Run ln -sf /usr/share/zoneinfo/Europe/Berlin /etc/localtime.

  1. Run hwclock --systohc.

  1. Uncomment en_US.UTF-8 UTF-8 and de_DE.UTF-8 UTF-8 in /etc/locale.gen.

  1. Run locale-gen.

  1. Write LANG=de_DE.UTF-8 to /etc/locale.conf.

  1. Write KEYMAP=de-latin1 to /etc/vconsole.conf.

  1. Write a hostname to /etc/hostname.

  1. Edit /etc/hosts. It should look like this:

127.0.0.1	localhost
::1		localhost
127.0.1.1	HOSTNAME

  1. Run pacman -S networkmanager.

  1. Run systemctl enable NetworkManager.service.

  1. Edit /etc/mkinitcpio.conf. It should have lines like this:

# Default:
# HOOKS=(base udev autodetect modconf kms keyboard keymap consolefont block filesystems fsck)
# With udev:
# HOOKS=(base udev autodetect modconf kms keyboard keymap consolefont block encrypt filesystems fsck)
# With systemd:
HOOKS=(base systemd autodetect modconf kms keyboard sd-vconsole block sd-encrypt filesystems fsck)

  1. Run mkinitcpio -P.

  1. Use passwd to set a root password.

VII. Boot loader and microcode

  1. Run bootctl install.

  1. Check the CPU brand with lscpu.

  1. Run pacman -S intel-ucode for an Intel CPU or pacman -S amd-ucode for an AMD CPU.

  1. Edit /boot/loader/loader.conf. Do not use tabs. It should look something like this:

default arch.conf
timeout 0
console-mode max
editor no

  1. Check the UUID of the root partition with lsblk -f.

  1. Edit /boot/loader/entries/arch.conf. Do not use tabs. It should look something like this:

title Arch Linux
linux /vmlinuz-linux
initrd /intel-ucode.img
initrd /initramfs-linux.img
options rd.luks.name=1234abcd1234-abcd-1234-abcd-1234abcd1234=root root=/dev/mapper/root rw quiet

a. Replace initrd /intel-ucode.img with intrd /amd-ucode.img for an AMD CPU.

b. If you have installed linux-lts instead of linux, replace linux /vmlinuz-linux with linux /vmlinuz-linux-lts and initrd /initramfs-linux.img with initrd /initramfs-linux-lts.img.

  1. Run systemctl enable systemd-boot-update.service.

VIII. Reboot

  1. Run exit.

  1. Run reboot.

=> General recommendations

IX. Users

  1. Run useradd -m -G wheel USERNAME.

  1. Use passwd USERNAME to set the password of the user.

  1. Use chfn USERNAME to set the full name of the user.

  1. Run pacman -S sudo.

  1. Use EDITOR=nano visudo to uncomment %wheel ALL=(ALL:ALL) ALL in /etc/sudoers.

  1. Run exit.

  1. Log in as the new user.

X. Basic services

  1. Run pacman -S pacman-contrib.

  1. Run systemctl enable paccache.timer.

  1. Run timedatectl set-ntp true.

  1. Check timedatectl status.

  1. Run pacman -S firewalld.

  1. Run systemctl enable firewalld.service.

  1. Run pacman -S pkgstats.

  1. Check systemctl status pkgstats.timer.

  1. Run pacman -S xdg-user-dirs.

  1. Check systemctl status xdg-user-dirs-update.service.

XI. Xorg

=> Xorg

  1. Run pacman -S xorg-server.

  1. Check the GPU brand with lspci -v | grep -A1 -e VGA -e 3D.

  1. Run pacman -S xf86-video-intel for an Intel GPU or pacman -S xf86-video-amdgpu for an AMD GPU.

  1. Run pacman -S mesa.

EOF

Proxy Information
Original URL
gemini://dkalak.de/tech/archinst.gmi
Status Code
Success (20)
Meta
text/gemini; lang=en
Capsule Response Time
147.289578 milliseconds
Gemini-to-HTML Time
3.519375 milliseconds

This content has been proxied by September (3851b).