Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions docs/skills/ddi-installer.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,13 @@ terminal-based interactive installation that:

User provisioning is handled on the target system's first boot via systemd
system credentials (`systemd-sysusers`, `systemd-tmpfiles`) so the base image
remains stateless. `systemd-firstboot.service` is masked on the target image
(`/etc/systemd/system/systemd-firstboot.service -> /dev/null`) to guarantee
unattended, prompt-free startup. The target DDI also pre-stages the extracted CA
remains stateless. Both of systemd's first-boot wizards are masked on the target
image (`/etc/systemd/system/systemd-firstboot.service -> /dev/null` and
`/etc/systemd/system/systemd-homed-firstboot.service -> /dev/null`) to guarantee
unattended, prompt-free startup: both are `ConditionFirstBoot=yes`, read
`StandardInput=tty`, and order themselves before `first-boot-complete.target`, so
either one left unmasked blocks a headless boot forever on an unattended console.
The target DDI also pre-stages the extracted CA
certificate bundle (`/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem` and
`/etc/ssl/certs/ca-certificates.crt`) and a standard `/etc/hosts` file for
container runtime pod sandboxes.
Expand Down
9 changes: 8 additions & 1 deletion elements/oci/bluefin-server-ddi.bst
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,16 @@ config:
ln -sf /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem /layer/etc/pki/tls/certs/ca-bundle.crt
ln -sf /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem /layer/etc/pki/tls/cert.pem

# Mask systemd-firstboot to prevent interactive prompts on headless first boot
# Mask both first-boot wizards to prevent interactive prompts on headless
# first boot: systemd-firstboot.service prompts for locale/keymap/timezone/
# root password, and systemd-homed-firstboot.service runs
# `homectl firstboot --prompt-new-user`. Both are ConditionFirstBoot=yes,
# read StandardInput=tty, and order themselves before
# first-boot-complete.target, so either one blocks the boot transaction
# forever on a console nobody is attached to.
mkdir -p /layer/etc/systemd/system
ln -sf /dev/null /layer/etc/systemd/system/systemd-firstboot.service
ln -sf /dev/null /layer/etc/systemd/system/systemd-homed-firstboot.service

# Mask audit-rules to prevent failure on shell-free OS (augenrules requires /bin/sh)
ln -sf /dev/null /layer/etc/systemd/system/audit-rules.service
Expand Down
4 changes: 4 additions & 0 deletions tests/unit/test_installer_contract.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,10 @@ def test_ddi_generates_module_indexes_for_runtime_filesystem_drivers() -> None:
assert "cp -a /etc/pki/ca-trust/extracted/* /layer/etc/pki/ca-trust/extracted/" in ddi_element
assert "tls-ca-bundle.pem" in ddi_element
assert "ln -sf /dev/null /layer/etc/systemd/system/systemd-firstboot.service" in ddi_element
assert (
"ln -sf /dev/null /layer/etc/systemd/system/systemd-homed-firstboot.service"
in ddi_element
)
assert "ln -sf /dev/null /layer/etc/systemd/system/audit-rules.service" in ddi_element
assert "printf '127.0.0.1 localhost" in ddi_element
assert "> /layer/etc/hosts" in ddi_element
Expand Down
Loading