Skip to content

Installing Arch

I use a MacBook as my personal laptop, but recently, I bought a refurbished ThinkPad so I could install Arch and tinker with Linux. While installing Arch, I realized that I don’t know much about what actually happens when a computer boots. In this post, I summarized the things I learned during the process.


Before going over the Arch installation process, I think it’s helpful to understand at a high level how a (Linux) computer boots. Booting is the process of going from a “powered off hardware” to a “running operating system.” The simplified flow is:

1. Power on
2. UEFI firmware runs
3. UEFI finds a bootloader
4. Bootloader loads the Linux kernel into memory
5. Bootloader loads initramfs (temporary file system) into memory
6. Kernel starts running
7. Kernel mounts the root filesystem
8. Kernel starts systemd and systemd starts services

UEFI is a firmware built into the motherboard, and it runs when we press the power button of the computer. Its job is to locate a bootable device (such as the SSD or a USB drive) and run the bootloader. UEFI is the successor to BIOS, which can be found in older computers.

2. UEFI finds a bootloader, and the bootloader loads the Linux kernel into memory.

Section titled “2. UEFI finds a bootloader, and the bootloader loads the Linux kernel into memory.”

On the bootable device, UEFI looks for a special partition called the EFI System Partition (/boot). This is where bootloader’s files are located.

A bootloader is a small program whose job is to start the OS. On Linux systems, the bootloader (systemd-boot) reads a boot entry configuration file like /boot/loader/entries/arch.conf, which specifies the kernel to load. The kernel code is stored in a file like /boot/vmlinuz-linux. The bootloader reads this file, copies it into RAM, and starts the execution.

3. Bootloader loads initramfs into memory.

Section titled “3. Bootloader loads initramfs into memory.”

The bootloader also locates an initramfs image under /boot (/boot/initramfs-linux.img) and loads it into RAM.

The initramfs image is used to set up a temporary RAM-backed filesystem. Early in the boot process, the real root partition may not be mounted as /, but the kernel still needs some filesystem. Mounting just means making a disk or partition available inside the current filesystem tree at a specific path like /. Once the real root partition is found and mounted as /, the system switches away from initramfs and continues booting from the real system on disk.

4. Kernel starts running and mounts the root filesystem.

Section titled “4. Kernel starts running and mounts the root filesystem.”

The kernel mounts the root partition as /. The root partition is specified in the boot entry file, where we have a line lke: options root=UUID=... rw. This means: use the partition with this UUID as /, and mount it as read-write.

5. Kernel starts systemd, and systemd starts services.

Section titled “5. Kernel starts systemd, and systemd starts services.”

After / is mounted, the kernel starts the first normal user-space process. On many Linux systems, this is systemd. systemd runs as process ID 1. It starts and manages core services like networking, login, bluetooth, and the desktop login manager.

Since processes are created through parent-child relationships, systemd sits at the root of the user-space process tree. Most user-space processes are either started directly by systemd or are descendants of processes that were started by systemd.


Now that we have a high-level understanding of how a computer boots, we can look at the Arch installation process through this lens. Instead of thinking of the installation as a list of commands, it is more helpful to think of each step as preparing one part of the system that the computer will later need during boot.

The rough installation flow looks like this:

1. Make an Arch installation USB
2. Boot ThinkPad from the USB
3. Connect to the Internet
4. Identify and partition the SSD
5. Format and mount the partitions
6. Install the base Arch system
7. Generate fstab
8. Chroot and configure the system
9. Install and configure the bootloader
10. Reboot into installed Arch

When installing a new OS, we have to repartition the SSD and set it up for Linux. This is tricky to achieve while the existing OS is running from the same SSD.

The USB solves this problem by providing a temporary boot environment. Instead of booting into the current OS on the SSD, the ThinkPad can boot into a temporary Arch system on the USB. Then, we can work from the USB to set up a new OS on the SSD.

First, download the Arch ISO from the Arch website. An ISO is an image file that contains everything that would be written to a disk. It is used to capture and reproduce a disk environment.

After downloading the ISO image, flash the ISO to the USB. Flashing means writing the ISO image directly onto the USB. This is different from copying the .iso file into the USB. If we only copy it, the USB just contains the ISO as a file. When we flash it, the USB becomes the disk described by the image.

On Mac, I used a program called balenaEtcher, where the process was only a few clicks: select the image, select the USB, and flash it. After this, the USB is now a bootable device.

After creating the installation USB, boot the ThinkPad from it. For mine, I had to shut the machine down, turn it back on, and repeatedly press F12 to open the boot menu. From there, I selected the USB drive instead of the internal SSD. The machine then booted into the Arch environment, and I saw a command-line prompt like this:

root@archiso ~ #

From here, it is possible to run archinstall for a quick setup. In my case, I followed the manual installation process because I wanted to understand what each step does.

The next step is to get Internet connection, since the base Arch system and other packages need to be downloaded. First, check the Internet connection using ping. If not connected, configure Wi-Fi using the iwctl command.

Next, we have to identify and partition the internal SSD. The lsblk command lists the available block devices:

/dev/nvme0n1 internal ThinkPad SSD
/dev/sda USB installer

The internal SSD is our target — use cfdisk to partition it:

Terminal window
cfdisk /dev/nvme0n1

cfdisk lists the existing partitions, which we can delete if we don’t mind wiping out the existing OS. Then, create two new partitions:

/dev/nvme0n1p1 1G EFI System Partition
/dev/nvme0n1p2 rest (e.g., 237G) Linux root partition

I used 1GB for the EFI partition, which is where bootloader-related files go. The rest of the disk is the root partition, where the actual Arch system would be installed.

After creating the partitions, we also have to format them. The EFI partition uses FAT32 for UEFI compatibility. The root partition can use ext4.

Terminal window
mkfs.fat -F32 /dev/nvme0n1p1
mkfs.ext4 /dev/nvme0n1p2

Then, mount the new filesystems under /mnt.

Terminal window
# /mnt already exists so we don't have to mkdir
mount /dev/nvme0n1p2 /mnt
mkdir /mnt/boot
mount /dev/nvme0n1p1 /mnt/boot

The temporary Arch system running from the USB can now access the SSD through /mnt.

/dev/nvme0n1p2 → /mnt access point to the SSD root partition
/dev/nvme0n1p1 → /mnt/boot access point to the SSD EFI partition

From now, commands like pacstrap /mnt ... installs Arch files to the SSD root partition mounted there.

Next, we can use the Arch installation tool (pacstrap) to install the initial system into /mnt. The initial system is a collection of packages like:

base
linux
linux-lts
linux-firmware
amd-ucode
NetworkManager
sudo
vim/nano

Since /mnt is where the SSD root partition is mounted, pacstrap install the files on the SSD. The SSD is now becoming an actual Arch system.

We also have to generate an fstab, which tells the installed system how to mount its partitions during boot. Before, I manually mounted the partitions:

/dev/nvme0n1p2 → /mnt
/dev/nvme0n1p1 → /mnt/boot

Ultimately, we want the system to mount the partitions like this:

/dev/nvme0n1p2 → /
/dev/nvme0n1p1 → /boot

fstab records this mapping so that the mounts are automated in future boots.

After the base system is installed, run:

Terminal window
arch-chroot /mnt

This changes the working environment from the USB to the new Arch system installed at /mnt. Then, we can continue configuring the installed system:

timezone
locale
hostname
root password
normal user
sudo access
NetworkManager auto-start

At this point, we are configuring the Arch system that would actually run after rebooting from the SSD.

Earlier, I created an EFI partition, but it is still empty. We need to install the bootloader into it. In this setup, I used systemd-boot.

Terminal window
bootctl install

systemd-boot uses two levels of configuration. loader.conf defines the general boot menu settings, and files under /boot/loader/entries/ define individual boot entries.

I created the loader config at /boot/loader/loader.conf with something like this:

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

This means:

default arch.conf → choose Arch Linux by default
timeout 3 → wait 3 seconds before booting the default entry
console-mode max → use a larger console display mode
editor no → do not allow editing boot options from the boot menu

Next, find the UUID of the root partition:

Terminal window
blkid /dev/nvme0n1p2

The UUID is used in the boot entry so the bootloader can tell the kernel which partition should become /.

I created the boot entry at /boot/loader/entries/arch.conf with something like this:

title Arch Linux
linux /vmlinuz-linux
initrd /amd-ucode.img
initrd /initramfs-linux.img
options root=UUID=... rw

This means:

title Arch Linux → name shown in the boot menu
linux /vmlinuz-linux → kernel to load
initrd /amd-ucode.img → AMD CPU microcode update
initrd /initramfs-linux.img → initramfs to load
options root=UUID=... rw → use this root partition as /, read-write

This tells the bootloader which kernel to load, which initramfs to load, and which partition should become /.

I also created an LTS entry for linux-lts. LTS stands for Long-Term Support. Arch installs two kernels:

linux → normal Arch kernel
linux-lts → long-term support kernel

The normal linux kernel gets newer updates faster. The linux-lts kernel is usually older and more conservative. I installed both because if a normal kernel update breaks something, I can reboot and choose Arch Linux LTS as a fallback.

So arch-lts.conf is a backup boot option that uses /vmlinuz-linux-lts and /initramfs-linux-lts.img instead of /vmlinuz-linux and /initramfs-linux.img.

Finally, we can exit the chroot environment, unmount the partitions using umount -R /mnt, and reboot. When the machine restarts, remove the USB.

After this, the computer will boot from the internal SSD instead of the USB, and log into the installed Arch system. From there, we can install apps like a browser and code editor.


I don’t expect myself to memorize the Arch installation steps, but I think it is worth writing down the practical parts that I may want to review again in the future.

First, I learned a lot about the booting process. I think it is helpful to know the high-level flow: a bootloader lives on the SSD, the firmware locates and runs it when the computer starts, and the bootloader loads the kernel into memory.

Second, I didn’t really know much about block devices and filesystems. Creating partitions and working with them directly made the relevant concepts more concrete. I got more familiar with the basics, such as mounting a filesystem, understanding different types of filesystems, and using commands like lsblk.

Last but not least, I learned a lot about Linux in general. There is still a lot for me to learn, and I hope to study topics like systemd in more depth in the future.

Overall, installing Arch made my laptop feel a little less like magic, and I am looking forward to exploring it more!