Rewrite on the layout of agentos
os / os (push) Failing after 29s

Start again from agentos: a read-only, verity-checked /usr with A/B
updates, and a TPM-encrypted btrfs root made at first boot that holds
/etc and /var. On top of that the runner: gitea-runner from gitea.com,
a path unit that starts it once registered, and a drain before update
reboots. Jobs run in plain Fedora on root's podman.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Job79andClaude Opus 5.5 committed 2026-11-22 15:59:36 +00:00
1 parent 0569bce676
commit 0733ff55f3
49 files changed
+492 -509

No files matched your search

+2 -1
View File
@@ -1,4 +1,5 @@
# EFI system partition: systemd-boot and the UKIs (two versions at most).
# 00-esp.conf defines the EFI system partition. It holds systemd-boot and the
# UKIs, two versions at most.
[Partition]
Type=esp
Format=vfat
-15
View File
@@ -1,15 +0,0 @@
# The root filesystem, slot A: /etc and /usr, read-only erofs protected by dm-verity (roothash= in
# the UKI). Updates replace it whole. /var, the state, is its own partition (30-var.conf).
[Partition]
Type=root
Label=%M_%A
Format=erofs
Compression=zstd
CopyFiles=/
ExcludeFilesTarget=/var/
Verity=data
VerityMatchKey=root
SizeMinBytes=1G
SizeMaxBytes=1G
# The file name holds the partition UUID, which roothash= finds the root by; updates keep it (@u in sysupdate.d).
SplitName=%t.%U
+17
View File
@@ -0,0 +1,17 @@
# 10-usr.conf defines /usr in slot A: the OS as read-only erofs, protected by
# dm-verity (usrhash= in the UKI). Updates replace it whole. The image holds
# nothing else but the ESP: the initrd makes the root filesystem, with /etc
# and /var, at first boot (mkosi.extra/usr/lib/repart.d/50-root.conf).
[Partition]
Type=usr
Label=%M_%A
Format=erofs
Compression=lz4hc
CopyFiles=/usr:/
Verity=data
VerityMatchKey=usr
SizeMinBytes=1G
SizeMaxBytes=1G
# SplitName holds the partition UUID (%U): usrhash= finds /usr by it, and
# updates keep it (@u in mkosi.extra/usr/lib/sysupdate.d).
SplitName=%t.%U
-9
View File
@@ -1,9 +0,0 @@
# dm-verity hashes of the root filesystem, slot A.
[Partition]
Type=root-verity
Label=%M_%A_verity
Verity=hash
VerityMatchKey=root
SizeMinBytes=64M
SizeMaxBytes=64M
SplitName=%t.%U
+9
View File
@@ -0,0 +1,9 @@
# 11-usr-verity.conf holds the dm-verity hashes of /usr in 10-usr.conf.
[Partition]
Type=usr-verity
Label=%M_%A_verity
Verity=hash
VerityMatchKey=usr
SizeMinBytes=16M
SizeMaxBytes=16M
SplitName=%t.%U
-7
View File
@@ -1,7 +0,0 @@
# The root filesystem, slot B: empty until systemd-sysupdate writes the next version.
[Partition]
Type=root
Label=_empty
SizeMinBytes=1G
SizeMaxBytes=1G
SplitName=-
+8
View File
@@ -0,0 +1,8 @@
# 20-usr-b.conf defines /usr in slot B. It stays empty until systemd-sysupdate
# writes the next version to it.
[Partition]
Type=usr
Label=_empty
SizeMinBytes=1G
SizeMaxBytes=1G
SplitName=-
-7
View File
@@ -1,7 +0,0 @@
# dm-verity hashes of the root filesystem, slot B.
[Partition]
Type=root-verity
Label=_empty
SizeMinBytes=64M
SizeMaxBytes=64M
SplitName=-
+8
View File
@@ -0,0 +1,8 @@
# 21-usr-verity-b.conf holds the dm-verity hashes for 20-usr-b.conf, empty
# until the next update.
[Partition]
Type=usr-verity
Label=_empty
SizeMinBytes=16M
SizeMaxBytes=16M
SplitName=-
-9
View File
@@ -1,9 +0,0 @@
# /var: the state that updates keep (the runner's registration, the root password, logs, base
# images). Mounted by /etc/fstab, which also grows it to fill the disk at boot.
[Partition]
Type=var
Label=var
Format=xfs
CopyFiles=/var:/
Minimize=guess
SplitName=-