Repository navigation
An install medium gets its root shell, on the display and the serial console - #215
Merged
Merged
Conversation
…one letter as a whole word, which usb and iso are not, so the display and the serial console asked for a login nobody on a medium can give. The three places that make the test take the whole word now, and a check holds each to the four signed command lines
… installer and the recovery tool are found by name, and poweroff ends the session, on the USB medium and the ISO
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
An install medium asks for a login instead of giving the root shell the user guide describes, on the display and on the serial console. The medium's root is locked and it has no account, so nobody who boots it can type
kryptik-install: the only installs that work are the suites' own, armed by a control disk.Is v0.1.0 affected? Yes. The fault has been in the tree since a718604 (2026-09-13), before v0.1.0 was tagged, so the v0.1.0 medium cannot be installed from by hand. Its release notes should say so, and the first release with this fix is the first one a person can install.
The cause. Three places decide "this is an install medium" by
grep -qw 'kryptik\.media=[a-z]' /proc/cmdline: the console wrapper (build/recipes/console.sh), the tty1 getty (build/services/getty-tty1/run) and the control-disk reader (build/service-scripts/testctl.sh). With-wthe match must end at a word boundary, and the match iskryptik.media=uinsidekryptik.media=usb(or=iso), so it never matches. Both gettys fall through to the installed system's login prompt. The control-disk reader was unharmed because it reads/run/kryptik/boot-identityfirst, which is why every unattended install kept passing.The fix. The three tests become
grep -qE '(^| )kryptik\.media=[a-z]+( |$)': the whole word, whatever its value.Why nothing caught it, and what does now.
tools/image/medium-shell-test.sh, a newbootitem of acceptance (medium-shell), boots the USB medium and the ISO and types at the serial console: a command runs as root,kryptik-installandkryptik-recoverare found by name,kryptik-install --helpanswers, andpoweroffends the session; the transcript must hold no login prompt, and the console's process must be the shell. It is also the first run of the shell agetty starts there, so it tells whether that shell has/usr/sbinon its path.tools/tests/medium-shell.shtakes the test out of each of the three files and holds it to the four command lines stage 06 signs: the USB medium and the ISO are media, slots a and b are not, and the three files make the same test. On main it fails six of its fifteen checks.Found by the first test that types at a medium's shell (the hardware report's, in #180): the first serial transcript read
kryptik login:, and so does every medium boot of every earlier run (early_getty_pid=… comm=agetty … wchan=do_selectin the boot report).Other open changes touch
build/services/getty-tty1/runandbuild/recipes/console.sh(#206, comments) andbuild/service-scripts/testctl.sh(#177); the change here is one line in each.