The image now holds only the ESP and a verity-protected /usr (A/B). At first boot, systemd-repart in the initrd makes the root filesystem: btrfs, encrypted with a TPM key sealed to the signed PCR 11 policy, with /var as its own subvolume. A TPM is required. systemd.image_policy= accepts only an encrypted root and a verity-checked /usr, and FactoryReset=yes lets factory-reset.target wipe it. /etc is writable but nearly empty: mkosi.finalize keeps the build's /etc in /usr/share/factory/etc and systemd-tmpfiles links it in at boot. That removes etc-shadow.mount, the host key on /var, fstab and /var/lib/agent. /var now survives reboots. systemd-firstboot replaces agent-setup: it asks for the root password on the screen and offers a recovery key. Machines are named agent-???? from the kernel command line. The user is now agent, with its home in /home/agent and ssh keys in the default places. sshd.path starts sshd only once root or agent has a key. The test VM needs swtpm. The package cache moves to a podman volume (AGENTS.md). No existing VMs can update to this layout. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1.0 KiB
1.0 KiB
This machine
You run on a small Fedora VM made for you, as the user claude, without root.
- The OS is read-only: you can't install anything on it. Run toolchains, languages and
services in containers, with rootless
podman(also asdocker). For quick commands:podman run --rm -v "$PWD:/w" -w /w docker.io/library/python:3 python script.py. For longer work, keep a dev container you can install into:podman run -d --name dev -v ~:/w -w /w quay.io/fedora/fedora:45 sleep infinity, thenpodman exec dev dnf install -y gccandpodman exec dev make. - On the host: git, ssh, curl, tar/gzip/xz/zstd, find, diff, ps, ip.
- Your files survive reboots: your home (/home/claude), containers and images stay. /tmp is wiped at every boot. The VM may reboot at about 04:10 to update.
- To start over, push what you want to keep, then remove all containers and images with
podman system reset --forceand delete everything in your home but~/.claudeand~/.claude.json, which hold your Claude login.