Installation guide - loyiwen/MatchaMaster GitHub Wiki
To set the keyboard layout, pass its name to loadkeys(1):
# loadkeys uk
Console fonts are located in /usr/share/kbd/consolefonts/
and can likewise be set with setfont(8) omitting the path and file extension. For example, to use one of the largest fonts suitable for HiDPI screens, run:
# setfont ter-132b
Check the UEFI bitness:
# cat /sys/firmware/efi/fw_platform_size
- If the command returns 64, the system is booted in UEFI mode and has a 64-bit x64 UEFI.
- If the command returns 32, the system is booted in UEFI mode and has a 32-bit IA32 UEFI. While this is supported, it will limit the boot loader choice to those that support mixed mode booting.
- If it returns No such file or directory, the system may be booted in BIOS (or CSM) mode.
If the system did not boot in the mode you desired (UEFI vs BIOS), refer to your motherboard's manual.
# iwctl
[iwd]# station wlan0 connect <SSID>
The connection may be verified with ping:
# ping archlinux.org
In the live environment systemd-timesyncd is enabled by default and time will be synced automatically once a connection to the internet is established.
Use timedatectl(1) to ensure the system clock is synchronized:
# timedatectl
# cfdisk /dev/nvme0n1
# cryptsetup luksFormat -v --pbkdf pbkdf2 /dev/nvme0n1p7
Type YES
. You will then be prompted to enter a password.
# cryptsetup open /dev/nvme0n1p7 cryptroot
# mkfs.ext4 /dev/mapper/cryptroot
# mkswap /dev/nvme0n1p6
# mkfs.fat -F 32 /dev/nvme0n1p5
# mount /dev/mapper/cryptroot /mnt
# mount --mkdir /dev/nvme0n1p5 /mnt/boot
# swapon /dev/nvme0n1p6
# vim /etc/pacman.d/mirrorlist
# pacstrap -K /mnt base base-devel linux linux-firmware intel-ucode vim sudo iwd networkmanager cryptsetup man-db man-pages efibootmgr grub
Generate an stab file (use -U or -L to define by UUID or labels, respectively):
# genfstab -U /mnt >> /mnt/etc/fstab
Change root into the new system:
# arch-chroot /mnt
Set the time zone:
# ln -sf /usr/share/zoneinfo/Europe/London /etc/localtime
Run hwclock(8) to generate /etc/adjtime
# hwclock --systohc
Edit /etc/locale.gen
and uncomment en_GB.UTF-8 UTF-8
and other needed UTF-8 locales:
# vim /etc/locale.gen
Generate the locales by running:
# locale-gen
Create the locale.conf(5)
file, and set the LANG variable accordingly:
# vim /etc/locale.conf
LANG=en_GB.UTF-8
If you set the console keyboard layout, make the changes persistent in vconsole.conf
# vim /etc/vconsole.conf
KEYMAP=uk
Create the hostname file:
# vim /etc/hostname
matchamaster
Set the root password:
passwd
Add the encrypt
hook to mkinitcpio.conf
:
# vim /etc/mkinitcpio.conf
HOOKS=(base udev autodetect microcode modconf kms keyboard keymap consolefont block encrypt filesystems fsck)
# grub-install --target=x86_64-efi --efi-directory=boot/ --bootloader-id=GRUB --modules="tpm" --disable-shim-lock
# vim /etc/default/grub
GRUB_ENABLE_CRYPTODISK=y
GRUB_CMDLINE_LINUX_DEFAULT="cryptdevice=UUID=$(blkid -s UUID -o value /dev/nvme0n1p7):cryptroot root=/dev/mapper/cryptroot"
# grub-mkconfig -o /boot/grub/grub.cfg
Regenerate the initramfs:
# mkinitcpio -P
Exit the chroot environment by typing exit
or pressing Ctrl+D
.
Optionally manually unmount all the partitions with umount -R /mnt
: this allows noticing any "busy" partitions, and finding the cause with fuser(1).
Finally, restart the machine by typing reboot
: any partitions still mounted will be automatically unmounted by systemd. Remember to remove the installation medium and then login into the new system with the root account.
sbctl is a user-friendly way of setting up secure boot and signing files.
To use it, install sbctl. See also the upstream README and sbctl(8).
Before starting, go to your firmware settings and set secure boot mode to Setup mode. This is different for each device: see sbctl(8) § USAGE.
Once you log back in, check the secure boot status:
$ sbctl status
You should see that sbctl is not installed and secure boot is disabled.
Installed: sbctl is not installed
Setup Mode: Enabled
Secure Boot: Disabled
Vendor Keys: microsoft builtin-db builtin-db builtin-KEK
Then create your custom secure boot keys:
# sbctl create-keys
Enroll your keys, with Microsoft's keys, to the UEFI:
# sbctl enroll-keys -m
You may have to chattr -i
files in efivarfs
before you are able to enroll keys.
Check the secure boot status again:
# sbctl status
sbctl should now be installed, but secure boot will not work until the boot files have been signed with the keys you just created
Installed: sbctl is installed
Owner GUID: <UUID>
Setup Mode: Disabled
Secure Boot: Disabled
Vendor Keys: microsoft
Check what files need to be signed for secure boot to work:
# sbctl verify
Now sign all the unsigned files. Usually the kernel and the boot loader need to be signed. For example:
# sbctl sign -s /boot/vmlinuz-linux
The files that need to be signed will depend on your system's layout, kernel and boot loader.
Now you are done! Reboot your system and turn secure boot back on in the firmware settings. If the boot loader and OS load, secure boot should be working. Check with:
# sbctl status