Check and reboot

Every step so far fails loudly if it fails at all. The last way an install goes wrong fails quietly: the machine reboots, comes up perfectly – and does not let you in, because there is no account, or no network, or sshd was never enabled. On a headless box in another room, that means fetching a monitor and a keyboard. The check exists so that you find out before the reboot rather than after.

Run this on the live system:
setup check
(stdout)
✓ hostname   myhost
✓ fstab      8 entries + swap, no duplicates
✓ boot       systemd-boot, entries/arch.conf: root=UUID=e1445380-51a2-449d-ad82-8ac3286cbfb6
✓ initramfs  initramfs-linux.img
✓ accounts   admin user
✓ passwords  root=L admin=P user=P
✓ sudo       visudo -c OK
✓ units      systemd-networkd systemd-resolved iwd sshd snapper-cleanup.timer enabled
✓ ssh        3 key(s) for admin, sshd config parses
✓ admin      aconfmgr 96ab414, snapper config root
✓ wifi       1 network(s) in /var/lib/iwd
All checks passed. Safe to reboot: setup reboot
Line Fails when
hostname /etc/hostname does not match the host file
fstab fewer entries than subvolumes plus the ESP, a duplicated mount point, or no swap line when there should be one
boot the systemd-boot entry or cmdline.txt lacks rootflags=subvol=@, or cmdline.txt is more than one line
initramfs there is no initramfs image in /boot
accounts admin or user does not exist
passwords admin or the daily user is not P (set), or root is NP: no password at all. root=L is what setup leaves, and root=P is allowed
sudo visudo -c fails
units anything in units.txt is not enabled
ssh admin has no keys, the file has the wrong owner or mode, or sshd -t rejects the config
admin aconfmgr, /usr/local/bin/admin or snapper’s root configuration is missing
wifi there are no WiFi credentials and no ethernet interface: it would never join a network

Any ✗ means a machine that will not come back, and setup check exits non-zero. One thing it reports as fine looks like an error if you run sshd -t yourself: no hostkeys available. The installed system has no host keys yet – it generates its own on first boot – and sshd only looks for them after the configuration has parsed.

Reboot

Run this on the live system:
setup reboot

That runs the check again and only if it passes does it swapoff, umount -R /mnt, close the LUKS volume if there is one, and reboot. There is no flag to skip the check.

Pull the stick out once the machine has powered down, or it will boot the installer again.

Connecting to the new machine

The installed system is a different host from the stick, and it will say so: its SSH host keys are its own, unrelated to the ones on the USB stick, so the boomstick entry in your SSH config does not describe it. Give it an entry of its own:

Edit this file: ~/.ssh/config
Host myhost
    HostName 192.168.1.50
    User admin
Run this on your workstation:
ssh myhost

You will be asked to accept a new host key, which is correct – this really is a machine you have never spoken to before. The address may have changed too: the machine is asking for its own DHCP lease now, under its own hostname.

tip

If it does not answer, check first whether it is on the network at all – look at your router’s lease table, or ping it. A machine that has an address but refuses SSH is a different problem from one that never appeared, and they want opposite kinds of investigation. For the second kind, boot the stick again: setup host --from and setup disk --mount get you back into the installed system with arch-chroot /mnt.

Once you are in as admin, the install is finished. From here on the machine is looked after with admin, in Keeping it maintainable, starting with pushing its host repo somewhere off the machine.

// settings
theme:
fx: