Enter the new system

Everything from here on happens inside the system you just installed:

Run this on the live system:
arch-chroot /mnt

The prompt changes, and from that moment / means the new system, pacman installs into it, and configuration files you edit are its files rather than the installer’s.

What arch-chroot does

A bare chroot would give you the new filesystem and nothing else, and most package scripts would fail. arch-chroot is a wrapper that also bind-mounts /proc, /sys, /dev and /run from the live system into the target, and copies /etc/resolv.conf across so that name resolution works inside.

The practical result is that the chroot behaves like a running system for the purposes of installing packages and writing config.

What it is not

It is not booted. The new system’s systemd is not running – the systemd you can see belongs to the live environment. That distinction has one consequence you will meet immediately:

Command Inside the chroot
systemctl enable foo Works. It only creates symlinks on disk
systemctl start foo Does not work. There is no running init to ask
systemctl status foo Reports on the live system, not the target

So you enable services now and they start on the first real boot. Nothing you enable in this chapter runs until the machine reboots.

Getting back out

Run this inside the chroot:
exit

Ctrl-D does the same thing. You can re-enter with arch-chroot /mnt as often as you like – it is not a one-shot operation, and nothing is lost by leaving and coming back.

Confirm where you are

It is worth being certain which system you are typing into, because every remaining chapter depends on getting that right:

Run this inside the chroot:
cat /etc/os-release | head -2
pacman -Q | wc -l
(stdout)
NAME="Arch Linux ARM"
PRETTY_NAME="Arch Linux ARM"
166

On an x86_64 machine the name is Arch Linux. Either way the package count is the interesting part: a fresh install of the set above is a couple of hundred packages.

The live system has a far longer package list than a fresh install, so that count alone tells you which side of the chroot you are on.

// settings
theme:
fx: