lpaste.de

BTW I'm using Arch (again)

Intro

Since I ended up having a little bit of spare time, I decided to take another try on installing Arch Linux on my laptop. In the past, I've attempted to install Arch without a desktop environment but always got frustrated when I got to things like power management, Wi-Fi configuration, or simple things such as automatically mounting thumb drives or lock-screen and ended up reverting back to Ubuntu.

To avoid the fiddling and ease the installation, I set up Arch on my Laptop using the Gnome desktop environment.

Divergent steps from the usual base system setup

Because Arch's Wiki features a very decent installation guide, I only list the steps that differ from it.

Set keyboard layout

Use the following command to set the keyboard layout:

localectl set-keymap de

Bootloader

As bootloader, I'm using systemd-boot instead of GRUB because it used to ease the configuration to load micro-code. Now, that mkinitcpio packs micro-code together with the main initramfs, this is not the case anymore but I still stick to systemd-boot.

Micro-code still needs to be installed with the intel-ucode package.

Other than GRUB, systemd-boot only supports FAT32 for reading the kernel image and RAM filesystem. Therefore, I went the recommended way and mounted a 1GB large EFI partition to /boot to store the kernel files and bootloader files. It is essential to mount the boot partition before installing the base system. Otherwise, the kernel files will not be correctly installed and have to be manually moved to the EFI partition. After mounting the EFI partition, execute the following command to install the bootloader:

bootctl install

Adding a boot entry to the bootloader only requires a config file similar to the following one:

/boot/loader/entries/arch.conf
title   Arch Linux
linux   /vmlinuz-linux
initrd  /initramfs-linux.img
options root="LABEL=arch_os" rw

Store this configuration file at /boot/loader/entries/ as arch.conf or some other name. The last line of the above config file tells the bootloader how to find the root partition. In this configuration, the bootloader searches for the label arch_os. Make sure to label the root partition accordingly.

The current labels of all storage devices can be printed with lsblk -f while e2label <device> <label> labels an ext4 partition.

Time, Hostname, Locales (Systemd)

Setting time, hostname, and localization is straightforwardly done by using the following systemd commands.

timedatectl set-timezone Europe/Berlin
hostnamectl set-hostname <your-hostname>
localectl set-locale en_US.UTF-8

User Management

OpenDoas (sudo alternative)

OpenDoas originates from the Open BSD project and is considered a "lighter" alternative to sudo. Install the opendaos package and create a config file with the following content:

/etc/doas.conf
permit persist setenv {PATH=/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin} :<your-user>

Make sure to end the file with an empty line.

Fonts

I use the DejaVu fonts as my main UI fonts and Iosevka as my terminal fonts. The following commands install both fonts:

ttf-dejavu
ttc-iosevka-ss14

Iosevka is installed with the stylistic set ss14 (JetBrains Mono Style) for slightly simpler and more distinguishable characters.

Terminal

Usually, I install at least two different terminal emulators to try two separate terminals if something is not working. On Ubuntu, I was pleased with Gnome Terminal, but on Arch, my recent favorite is Alacritty and Gnome Console (in that order).

alacritty

Additionally, I use the fish shell as my main shell.

My previous blog post about the fish shell provides more details on why I use the fish shell.

← Home