Skip to content

image: the first SSH login's lane, and udev's coldplug for the devices this machine uses - #256

Merged
aledbf merged 1 commit into
mainfrom
lane
Nov 13, 2026
Merged

aledbf merged 1 commit into
mainfrom
lane

Conversation

@aledbf

@aledbf aledbf commented Nov 13, 2026

Copy link
Copy Markdown
Member

Keeps systemd and a real session, and takes what the first SSH login waits for off the boot's critical path.

What changes in the image

  • The vsock socket, sshd@, dbus (dbus.socket copied without its After=sysinit.target), logind, user-runtime-dir@ and user@ start without default dependencies (10-lane.conf).
  • No /run/nologin at boot: in the lane pam_nologin refused the first login (Access denied for user spin by PAM account configuration [preauth]). Shutdown still writes it (systemd-user-sessions' ExecStop).
  • Sessions of class user-early-light: logind holds a user session until the user's manager is up and orders its scope after systemd-user-sessions (systemd v259.9, logind-session.c: session_job_pending, session_start_scope). The session keeps its scope and XDG_RUNTIME_DIR; spin's manager still starts in the boot (linger).
  • udev's coldplug replays block, net, virtio, misc, input, rtc, ptp and ttyS0 instead of ~170 devices. Compared with the full replay, /dev differs only in the group of /dev/ptmx//dev/tty (mode 666 either way), dialout on ttyS1-3 and kmem on /dev/port; the power button keeps its power-switch tag. Hotplug is unchanged (new events, not a replay).

build.sh asserts every piece on the finished filesystem.

Measured (bench fleet, boot:ssh-first, 20 boots per row, interleaved)

row first login p50/p95
v20261113.02 as published 452/474
this branch 384/403

Run 43520353863. Part by part, run 43518915618: as built 478, lane + user-early-light 436, + filtered coldplug 402. Left out: priority (CPUWeight/Nice), −2 ms on top and a slower second login.

docs/log.md and image/README.md record it.

🤖 Generated with Claude Code

…s this machine uses

What the first login goes through - the vsock socket, the per-connection
sshd, dbus, logind, spin's runtime directory and manager - starts from
the boot's first dispatch without default dependencies; no /run/nologin
at boot, which pam_nologin refused the lane's first login over; sessions
of class user-early-light, which logind does not hold for the user's
manager or the end of the boot (systemd v259.9, logind-session.c); and
udev's coldplug replays block, net, virtio, misc, input, rtc, ptp and
ttyS0 rather than ~170 devices. On the bench fleet the first login went
478 -> 402 ms (lab run 43518915618). build.sh asserts each piece.

Compared device by device with the full coldplug, what differs is the
group of /dev/ptmx and /dev/tty (mode 666 either way), dialout on
ttyS1-3 and kmem on /dev/port; the power button keeps its power-switch
tag. boot:ssh-first's row puts the lane into the published release from
this tree's files, beside the release as published.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@aledbf
aledbf merged commit 630fa2c into main Nov 13, 2026
4 checks passed
@aledbf
aledbf deleted the lane branch November 13, 2026 22:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant