Arch Linux
Installation
Once the system has loaded from a USB flash drive, as mentioned in Bootable Installation Media, and the installation has started. You should see a zsh shell, where you are logged in as root@archiso. From this point onwards, the next step, according to the official documentation 1, is to set the keyboard layout:
Note
In situations, where the layout name is unknown, the localectl list-keymaps command would list all available layouts that could be viewed using regular arrow keys in a terminal.
Based on the quick Google search, good UK fonts are ter-v32b, Uni2-Terminus16, Lat2-Terminus32x16, and Lat2-Terminus16. The ter-v20b font is a smaller variant which seems to be a good fit for my monitor size, i.e. 24″ at 1080p.
Note
These fonts won't be available in the installed system unless explicitly installed.
Note
Similar to the layout name, it possible to preview the fonts using a command to list all files in the fonts folder. The --color=always and -R parameters are to preserve the colour in the output.
Verify the boot mode 2. The output could be either 64 or 32, in my case it was 64. There could be situations where the file is missing. In such situations, it means the system was booted in BIOS mode.
Verify the networking status by first checking if the network interface is up. Importantly, the UP flag appears inside angle brackets. In my case, it was easy to mistake this for state DOWN, especially since the latter was highlighted in red due to the --color parameter.
If the connection is down and the only way is to use WiFi, then use iwctl. From an extensive search on the internet, this command seems to be the easiest and most recommended way of connecting to Wi-Fi.
There could be a special situation where we would be bound to notorious eduroam. Then we have to create a configuration file and let iwctl to pick it up. An example file is stored at project/archlinux/var/lib/iwd/eduroam.8021x which is a configuration for the eduroam network using login and password. Required by iwctl. There is project/archlinux/var/lib/iwd/eduroam.8021x which is a configuration to let built-in DHCP daemon resolve an IP address for the host. In case if the installed OS plans to use iwctl to connect to eduroam later then install iwd and dhcpdc and then systemctl enable iwd and systemctl enable dhcpdc to run the daemons on the system start up. Then inside the iwctl tool:
Check the internet connection:
Manually check and sync the time and date:
List the available storage devices and their locations:
In my case, it listed /dev/nvme0n1. Then, I used the fdisk utility to partition the drive:
Next, you are presented with a somewhat interactive text-based interface (TUI), although, in my opinion, it uses a rather cryptic method of operation. For example, it uses a single letter p to list information about the current partitioning, if any. I would personally prefer to type out full commands, but we have to work with what is provided. At this stage, I created an EFI, a swap, and a Linux filesystem partition. This part is not detailed in the official guide, as partitioning schemes are use-case specific. Fortunately, the author in 3 offers some helpful hints.
g # Create GPT.
ENTER
n # Create new partition.
ENTER
ENTER
ENTER
+512M
ENTER
t # Change type.
ENTER
ENTER
1 # To EFI.
ENTER
n # Create new partition.
ENTER
ENTER
ENTER
+32G
ENTER
t # Change type.
ENTER
ENTER
swap # To swap.
ENTER
n # Create new partition.
ENTER
ENTER
ENTER
ENTER
p # View the results so far.
ENTER
w # Write it.
ENTER
Format the partitions:
Now, mount the file systems. Be careful with the order here: first mount the main filesystem, and then mount the EFI system partition. If you mount them in the wrong order, the EFI mount point may overwrite itself and fail to appear correctly in /etc/fstab later.
Install the essential packages: base, linux, and linux-firmware. These form the minimum needed to have a functional operating system.
The efibootmgr and grub packages are required to pass control from the UEFI firmware to the Linux kernel. There are other bootloaders available, but I am most familiar with these. Without these packages, the rest of the installation would not work.
It is possible to install amd-ucode after booting into Arch Linux, but it is best to install it during setup so that it can be loaded early through the bootloader for full effect. If you are using an Intel CPU, use intel-ucode instead. If you are in a VM then the microcode packages should be omitted.
The networkmanager package is needed to connect to the internet after the installation, in order to complete the post-installation setup. For most users, NetworkManager is the better choice due to its ease of use, GUI support, and good compatibility with desktop environments. Although, iwd is lighter and faster, but it is better suited for minimal or embedded setups.
The neovim package is needed to provide a text editing tool. For instance, to edit /etc/locale.gen file later on. And, it so happened, my text editor of choice is neovim.
Generate an fstab file.
Verify /etc/fstab.
Change root into the new system.
Set the time zone.
Run hwclock to generate /etc/adjtime.
Edit /etc/locale.gen and uncomment en_GB.UTF-8 UTF-8 and other needed UTF-8 locales. Then, generate the locales.
Create the /etc/locale.conf file, and set the LANG variable accordingly.
If you set the console keyboard layout, make the changes persistent in /etc/vconsole.conf. Later on, we can also change the font of the console Post Installation.
Create the /etc/hostname file.
Set the root password.
Add user.
Deploy grub.
Generate the grub configuration (it will include the microcode installed with pacstrap earlier).
Enable NetworkManager before rebooting. This is considered good practice within the community. The main reason is to ensure network connectivity after rebooting, especially in situations where an SSH service is set up and there is no input or output available, such as no keyboard, mouse, or monitor connected to the system.
Exit from chroot.
Unmount everything to check if the drive is busy.
Reboot the system and unplug the installation media.
Note
Instead, I prefer to shutdown the PC, unplug the USB drive, and manually boot back.
Post Installation
After the installation of the barebones Arch Linux Installation. Basic terminal login should be presented to the user. Log in with your user credentials.
Once logged in, ensure that the internet connection is working. Refer to the ip --color link command mentioned in Installation to verity the networking status. In situations where there is only Wi-Fi then use nmcli. Otherwise, the wire connection usually picked up automatically.
nmcli device wifi list
nmcli device wifi connect *SSID* password *your_wifi_password*
nmcli connection show
Enable and start the time synchronisation service. It requires an active internet connection to synchronise the system clock with online NTP servers.
Configure pacman and mirrors. All was okay for me, so I just skimmed it through and left it as is.
Update and upgrade the system. If not root then execute su -.
To proceed further, it is paramount to install custom packages to help better manage hardware resources and improve overall UX. The sudo package is important, it allows us to run as super user. The base-devel package group in Arch Linux provides essential development tools like make, gcc, and binutils, which are required to compile software, especially when using the AUR (Arch User Repository) What Are The Base Devel Dependencies. The openssh package is used to ssh and manage keys. The man package to "read the f-ing manual" 4. The git git-lfs packages are there because of VCS 5. To download files from the internet: curl wget. The xorg xorg-xinit packages are to enable GUI through X Systems as I consider Wayland too early to adapt. The xf86-video-amdgpu package is optional and it was included because the target computer iGPU is AMD-based. The polkit-gnome package is optional. Some software require priviliges and they are capable to self-elevate the priviliges if polkit is available. It comes as a dependency of the polkit-gnome package. The alacritty terminal is the default temrinal emulator of choice. The firefox browser is a compromise between widely available and provided the features I like. The keepassxc software is a password manager tool. To connect to my Google Drive I use rclone. To make colours warmer during late hours I use redshift. The p7zip package is used to extract archives. The pipewire pipewire-alsa pipewire-pulse pipewire-jack wireplumber packages are needed to manage audio. The new audio framework replacing pulse and jack. And, wireplumber is the pipewire session manager. The bluez bluez-utils packages provide bluetoothctl. Finally, we install a bunch of fancy fonts, terminus-font nerd-fonts ttf-terminus-nerd noto-fonts noto-fonts-cjk noto-fonts-emoji noto-fonts-extra ttf-font-awesome, at a cost of large storage space, i.e. aproximately 8-9 GB. On a bright side, it should cover almost any character including various emojis. If not root then execute su -.
pacman --sync sudo base-devel openssh man git git-lfs curl wget xorg xorg-xinit xf86-video-amdgpu polkit-gnome alacritty firefox keepassxc rclone redshift p7zip pipewire pipewire-alsa pipewire-pulse pipewire-jack wireplumber bluez bluez-utils terminus-font nerd-fonts ttf-terminus-nerd noto-fonts noto-fonts-cjk noto-fonts-emoji noto-fonts-extra ttf-font-awesome
Setup sudo priviliges for the wheel group by uncommenting the %wheel ALL=(ALL:ALL) ALL line.
Note
You don't need to reboot the PC for the changes to take effect.
Here's how you can set EDITOR=nvim system-wide on Arch Linux or similar systems using /etc/environment. Open /etc/environment with root privileges:
Add the line below (or modify if EDITOR already exists). And, save and exit. This change applies to all users at next login.
As in 67, to find what package is required to install a command run the following.
I wanted to keep the barebones Arch Linux installation as minimal as possible, so I moved console font configuration to here as a post-installation step. Append /etc/vconsole.conf. The FONT parameter depends on the terminus-font package, and while optional, it resolved a warning that was raised when building mkinitcpio 8. This font is used system-wide when booting into the system.
After modification, the initial RAM file system needs to be rebuilt. After reboot, the console fonts should change to the one specified in the configuration file.
To enable bluetooth, ensure bluez, and bluez-utils are installed on the system. The utilities package should contain bluetoothctl command 9. Enable and start the service.
clear ; sudo systemctl status bluetooth
clear ; sudo systemctl enable bluetooth
clear ; sudo systemctl start bluetooth
clear ; sudo systemctl status bluetooth
To connect a device via bluetoothctl.
The most up-to-date approach to manage audio seems to be pipewire but it comes with its own quirks like rtkit warnings 10. On a bright side, it seems like it works out-of-the-box.
At this point, it might be a good idea to install a GUI like dwm. Refer to the instructions in dwm to install dwm.
Since we installed polkit and the agent, let's add it to the .xinitrc. This is optional as it requires polkit and implies that we use WM instead of a DE.
At this point, the customised part of ~/.xinitrc should have the following. To find ATITUDE:LONGITUDE for Redshift follow the instructions at 11.
51.50853, -0.12574
# my rules
setxkbmap gb
status &
redshift -P -O 2700 -l LATITUDE:LONGITUDE &
exec /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 &
exec dwm
And, ~/.bashrc should have the following.
alias ls='LC_COLLATE=C ls --color=auto --group-directories-first --sort=version'
alias ll='ls -lashF'
PATH=~/.local/bin:$PATH
# By default, Arch would use `vi` as the default editor.
export EDITOR=nvim
There was a situation where the PC used iGPU to calculate graphics but used dGPU to output graphics. In situations where the PC should be forced to use xf86-video-amdgpu modify /etc/X11/xorg.conf.d/xorg.conf. Bare in mind that "PCI:19:0:0" is taken from the output of lspci -nnk, where the numbers are represented in hexadecimal format but the BusID is in decimal format. I didn't need to append zeros at the beginning, e.g. PCI:0:19:0 is invalid.
At this point, the installation of Arch Linux should be somewhat usable. Further information on post-installation advices is available at 12.
-
https://wiki.archlinux.org/title/Installation_guide#Set_the_console_keyboard_layout_and_font ↩
-
https://wiki.archlinux.org/title/Installation_guide#Verify_the_boot_mode ↩
-
https://gist.github.com/mjkstra/96ce7a5689d753e7a6bdd92cdc169bae#main-installation ↩
-
https://en.wikipedia.org/wiki/Jargon_File ↩
-
https://en.wikipedia.org/wiki/Version_control ↩
-
https://forum.manjaro.org/t/bluetoothctl-missing-in-my-installation/88318 ↩
-
https://wiki.archlinux.org/title/Bluetooth ↩
-
https://forum.manjaro.org/t/is-it-safe-to-remove-the-consolefont-buildhook/87086/2 ↩
-
https://wiki.archlinux.org/title/Bluetooth ↩
-
https://github.com/NixOS/nixpkgs/issues/382076 ↩
-
https://wiki.archlinux.org/title/Redshift ↩
-
https://wiki.archlinux.org/title/General_recommendations ↩