Seal /etc: read-only root with /etc and /usr, state on /var
The root filesystem (/etc and /usr) is now one read-only erofs partition behind dm-verity, updated A/B as a whole, so /etc can no longer drift from the image (stale CA certificates, frozen Fedora defaults). All state lives on a new /var partition, mounted by /etc/fstab. What used to be written to /etc at runtime: - machine ID: from the VM's firmware UUID (systemd.machine_id=firmware); /etc/machine-id is empty, so no boot counts as the first. - root password: gitea-runner-setup writes a shadow file to /var/lib/shadow, which etc-shadow.mount puts over /etc/shadow. - hostname and runner.env: runner.env moves to /var/lib/gitea-runner and holds the runner's name; gitea-runner.service sets it as the (transient) hostname, and DHCP no longer does. Hosts installed before this change must be reinstalled: updates can't change the partition layout. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V27snrGfdvwU7pMNBiDpHv
This commit is contained in:
25 files changed
+96
-63
No files matched your search
+3
-3
@@ -1,4 +1,4 @@
|
||||
# Updates /usr: writes the next version to the unused /usr partition.
|
||||
# Updates the root filesystem: writes the next version to the unused root partition.
|
||||
# Verify=no: releases are unsigned (no secrets in the repo); SHA256SUMS still checks each download.
|
||||
[Transfer]
|
||||
ProtectVersion=%A
|
||||
@@ -7,12 +7,12 @@ Verify=no
|
||||
[Source]
|
||||
Type=url-file
|
||||
Path=https://git.plabble.org/Job79/git-runner-mkosi/releases/download/latest/
|
||||
MatchPattern=git-runner_@v.usr-%a.@u.raw.zst
|
||||
MatchPattern=git-runner_@v.root-%a.@u.raw.zst
|
||||
|
||||
[Target]
|
||||
Type=partition
|
||||
Path=auto
|
||||
MatchPattern=git-runner_@v
|
||||
MatchPartitionType=usr
|
||||
MatchPartitionType=root
|
||||
PartitionFlags=0
|
||||
ReadOnly=1
|
||||
+3
-3
@@ -1,4 +1,4 @@
|
||||
# Updates the dm-verity hashes of /usr, next to 10-usr.transfer (which explains Verify=no).
|
||||
# Updates the root filesystem's dm-verity hashes, next to 10-root.transfer (see it for Verify=no).
|
||||
[Transfer]
|
||||
ProtectVersion=%A
|
||||
Verify=no
|
||||
@@ -6,12 +6,12 @@ Verify=no
|
||||
[Source]
|
||||
Type=url-file
|
||||
Path=https://git.plabble.org/Job79/git-runner-mkosi/releases/download/latest/
|
||||
MatchPattern=git-runner_@v.usr-%a-verity.@u.raw.zst
|
||||
MatchPattern=git-runner_@v.root-%a-verity.@u.raw.zst
|
||||
|
||||
[Target]
|
||||
Type=partition
|
||||
Path=auto
|
||||
MatchPattern=git-runner_@v_verity
|
||||
MatchPartitionType=usr-verity
|
||||
MatchPartitionType=root-verity
|
||||
PartitionFlags=0
|
||||
ReadOnly=1
|
||||
@@ -1,4 +1,4 @@
|
||||
# Installs the next UKI, which systemd-boot boots by default. Verify=no: see 10-usr.transfer.
|
||||
# Installs the next UKI, which systemd-boot boots by default. Verify=no: see 10-root.transfer.
|
||||
[Transfer]
|
||||
ProtectVersion=%A
|
||||
Verify=no
|
||||
|
||||
Reference in new issue
Block a user