loadkeys i386/qwertz/cz-qwertz.map.gz
setfont /usr/share/kbd/consolefonts/Lat2-Terminus16.psfu
timedatectl set-ntp true
timedatectl set-timezone Europe/Prague
iwctl
#[iwd]# station wlan0 get-networks
#[iwd]# station wlan0 connect <Name of WiFi access point>
#[iwd]# exit
pacman -Syy
cryptsetup open --type plain --key-file /dev/urandom --sector-size 4096 /dev/sda to_be_wiped
lsblk
dd if=/dev/zero of=/dev/mapper/to_be_wiped status=progress bs=1M
## This is expected
# dd: writing to ‘/dev/mapper/to_be_wiped’: No space left on device
##
cryptsetup close to_be_wiped
cfdisk /dev/sda
# label=gpt
# /dev/sda1 ; /boot ; 2G ; type=EFI
# /dev/sda2 ; / ; REST ; type=Linux filesystem ; /dev/mapper/root
# /dev/sda3 ; /swap ; 2xRAM_SIZE ; type=swap
# Write partition table to disk.
https://wiki.archlinux.org/title/Dm-crypt/Encrypting_an_entire_system#LUKS_on_a_partition
cryptsetup -v luksFormat /dev/sda2
# enter passphrase
cryptsetup open /dev/sda2 root
mkfs.ext4 /dev/mapper/root
mount /dev/mapper/root /mnt
# umount /mnt
# cryptsetup close root
How to work with it (remember to mount it again after):
cryptsetup open /dev/sda2 root
mount /dev/mapper/root /mnt
# some commands
umount /mnt
cryptsetup close root
It is needed for an encrypted root.
mkfs.fat -F32 /dev/sda1
mount --mkdir /dev/sda1 /mnt/boot
mkswap /dev/sda3
https://wiki.archlinux.org/title/Installation_guide#Mount_the_file_systems
If not mounted already.
mount /dev/mapper/root /mnt
mount /dev/sda1 /mnt/boot
swapon /dev/sda3
genfstab -U /mnt >> /mnt/etc/fstab
https://wiki.archlinux.org/title/Installation_guide#Install_essential_packages
pacstrap -K /mnt base linux linux-firmware intel-ucode vim man-db man-pages
https://wiki.archlinux.org/title/GDM#Keyboard_layout
loadkeys i386/qwertz/cz-qwertz.map.gz
setfont /usr/share/kbd/consolefonts/Lat2-Terminus16.psfu
echo "KEYMAP=cz-us-qwertz" > /etc/vconsole.conf
echo "FONT=Lat2-Terminus16" >> /etc/vconsole.conf
ln -sf /usr/share/zoneinfo/Europe/Prague /etc/localtime
timedatectl set-ntp true
timedatectl set-timezone Europe/Prague
hwclock --systohc
echo meridix > /etc/hostname
arch-chroot /mnt
Uncomment the locales in /etc/locale.gen:
en_US.UTF-8 UTF-8
cs_CZ.UTF-8 UTF-8
Generate locales and update console settings:
locale-gen
echo "LANG=cs_CZ.UTF-8" > /etc/locale.conf
https://wiki.archlinux.org/title/Dm-crypt/Encrypting_an_entire_system#Configuring_mkinitcpio
https://wiki.archlinux.org/title/Dm-crypt/Encrypting_an_entire_system#Configuring_the_boot_loader
vim /etc/mkinitcpio.conf
# HOOKS=(base systemd autodetect microcode modconf kms keyboard sd-vconsole block sd-encrypt filesystems fsck)
mkinitcpio -P
mkdir -p /boot/loader/entries/
echo "title Arch Linux" >> /boot/loader/entries/arch.conf
echo "linux /vmlinuz-linux" >> /boot/loader/entries/arch.conf
echo "initrd /initramfs-linux.img" >> /boot/loader/entries/arch.conf
echo "options rd.luks.name=$(blkid -o value /dev/sda2 | head -n1)=root root=/dev/mapper/root" >> /boot/loader/entries/arch.conf
??? https://wiki.archlinux.org/title/Dm-crypt/System_configuration#resume
??? https://wiki.archlinux.org/title/Systemd-boot#Automatic_update
??? https://wiki.archlinux.org/title/Systemd-boot#Signing_for_Secure_Boot
sudo pacman -S --needed git base-devel firefox firefox-i18n-cs firefox-adblock-plus usbutils gnome gnome-extra bash bash-completion networkmanager
Remove unnecessary:
sudo pacman -Rcs gnome-boxes gnome-builder evolution evolution-data-server gnome-maps polari gnome-dictionary gnome-games gnome-devel-docs d-spy accerciser epiphany gnome-chess gnome-klotski gnome-mahjongg gnome-mines gnome-nibbles gnome-recipes gnome-sudoku gnome-taquin gnome-tetravex gnome-tour gnome-weather gnome-2048 iagno quadrapassel ghex glade hitori tali lightsoff
??? https://wiki.archlinux.org/title/General_recommendations
systemctl enable gdm
systemctl enable NetworkManager
systemctl enable systemd-resolved
useradd -m -g users -G wheel -s /bin/bash [username]
passwd [username]
visudo
Uncomment %wheel ALL=(ALL) ALL
umount /mnt/boot /mnt
cryptsetup close root
exit
# REMOVE THE USB DRIVE
reboot
git clone https://aur.archlinux.org/yay.git
cd yay
makepkg -si
Configuration should be done under non-root user:
yay --save --answerclean None --answerdiff None --answeredit None --removemake --cleanafter --redownloadall --batchinstall --sudoloop
https://wiki.archlinux.org/title/GDM#Automatic_login
vim /etc/gdm/custom.conf
Add the following:
# Enable automatic login for user
[daemon]
AutomaticLogin=username
AutomaticLoginEnable=True
https://wiki.archlinux.org/title/Fprint
lsusb
sudo pacman -S --needed fprintd imagemagick
sudo gpasswd -a ani input
# TODO nedokončeno