Commit 9b643dc
feat(mios-dev): overlay-builder.sh creates mios user + service accounts on MiOS-DEV
Closes the manifesto requirement that MiOS-DEV mirror a deployed MiOS
host's container-hosting surface: "MiOS-DEV should have the mios user
appended as it will be needed for this MiOS-DEV machine to hosts it's
containers (mirroring the layered containers in MiOS at build time;
guacamole, ollama, forgejo, cockpit etc-etc). Everything is present in
the MiOS-DEV machine as a testbed/development platform FOR MiOS itself."
Previously: overlay-builder.sh only rsynced files (CLI, MOTD, paths.sh,
docs) onto the podman machine and explicitly skipped sysusers.d /
tmpfiles.d / systemd units citing "would conflict with podman-machine
init." That left MiOS-DEV without the mios user + service accounts +
/var/lib/<service>/ dirs the MiOS Quadlets need to run rootless.
Result: MiOS-DEV could only HOST the canonical MiOS file overlay; it
could not actually RUN the MiOS Quadlet stack the way a deployed host
does. Operator can't `systemctl --user enable mios-forge.service` if
the mios-forge user / /var/lib/mios-forge/ doesn't exist.
This commit adds three integrated steps to overlay-builder.sh, all
keeping the original "don't touch podman-machine vendor files" rule:
1. SYSUSERS (etc-layer override)
Drops the MiOS sysusers.d files into /etc/sysusers.d/ instead of
/usr/lib/sysusers.d/ (where podman-machine-os's vendor file
20-podman-machine.conf lives). systemd-sysusers materializes:
- mios login user (uid 1000) with group memberships:
wheel, libvirt, kvm, video, render, input, dialout, docker
- mios-virt 800
- mios-guacamole 810, mios-guacd 811, mios-postgres 812
- mios-pxe-hub 813, mios-crowdsec 814
- mios-ollama 815, mios-forge 816
- cockpit (auto-allocate)
- kvm/video/render/libvirt/input/dialout/docker groups
Idempotent: existing entries with matching UID/GID are left alone.
2. TMPFILES (etc-layer override)
Same /etc/tmpfiles.d/ pattern. systemd-tmpfiles --create materializes
/var/lib/mios-{ai,forge,forge-runner,ollama,pxe-hub,guacamole,infra}/
with the right owner so the Quadlet bind-mounts have somewhere to land
on the podman-machine FS.
3. /var/home/mios + subuid/subgid + loginctl enable-linger mios
Establishes the same /var/home/<user> convention FCOS/atomic-desktops
use; seeds from /etc/skel; appends 'mios:524288:65536' to /etc/subuid
and /etc/subgid for rootless container userns mapping; enables linger
so systemd --user services (the Quadlets) start at boot without
an active login session.
Net effect for the operator
───────────────────────────
- After `sudo bash automation/overlay-builder.sh /path/to/MiOS-repo` (or
the auto-invocation from build-mios.ps1's Invoke-MachineSSH path),
MiOS-DEV is a CONTAINER-HOSTING substrate. The operator can:
sudo -u mios podman info
systemctl --user --machine=mios@ start mios-forge.service
systemctl --user --machine=mios@ start ollama.service
- MiOS-DEV becomes the genuine "testbed/development platform FOR MiOS
itself" the manifesto describes -- it runs the same Quadlets the
built MiOS image will run, so an operator iterating on Quadlet
changes can validate against MiOS-DEV before triggering the OCI
build pipeline.
- Idempotent: re-runs of overlay-builder.sh re-apply identically; no
state loss, no UID drift.
What this commit explicitly does NOT do (still off-limits per the
podman-machine-init compatibility rule):
- Does not install systemd unit files into /usr/lib/systemd/system
- Does not install kargs.d (kernel cmdline is the podman-machine
kernel's, not MiOS bootc's)
- Does not install SELinux modules (WSL substrate is permissive)
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>1 parent 52e6a50 commit 9b643dc
1 file changed
Lines changed: 131 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | | - | |
4 | | - | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
5 | 7 | | |
6 | | - | |
| 8 | + | |
7 | 9 | | |
8 | 10 | | |
9 | | - | |
| 11 | + | |
10 | 12 | | |
11 | 13 | | |
12 | 14 | | |
13 | 15 | | |
14 | 16 | | |
15 | 17 | | |
16 | 18 | | |
17 | | - | |
18 | | - | |
19 | | - | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
20 | 34 | | |
21 | | - | |
22 | | - | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
23 | 48 | | |
24 | 49 | | |
25 | 50 | | |
| |||
82 | 107 | | |
83 | 108 | | |
84 | 109 | | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
89 | 159 | | |
90 | 160 | | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
91 | 206 | | |
92 | 207 | | |
93 | 208 | | |
| 209 | + | |
| 210 | + | |
0 commit comments