Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

login: start the getty services earlier #175

Merged
merged 1 commit into from
Oct 4, 2024

Conversation

bcressey
Copy link
Contributor

@bcressey bcressey commented Oct 2, 2024

Issue number:
N/A

Description of changes:
The login package is intended to help debug failures that occur early in boot, but by default the getty services are not started until multi-user.target, which is only activated if everything works as expected.

Start the getty.target as part of preconfigured.target so that the login prompt will be available even if there are problems with networking or filesystem mounts.

Testing done:
Modified an aws-dev build to set the default network interface to a non-existent device. Logged in and was able to check system logs even though the system eventually failed to boot:

bash-5.2# journalctl -f
Oct 02 19:02:34 localhost systemd-networkd[1043]: lo: Gained carrier
Oct 02 19:02:34 localhost systemd-networkd[1043]: Enumeration completed
Oct 02 19:02:34 localhost systemd[1]: Started Network Configuration.
Oct 02 19:02:34 localhost systemd[1]: Reached target Network.
Oct 02 19:02:34 localhost systemd[1]: Starting Wait for Network to be Configured...
Oct 02 19:02:34 localhost prairiedog[1036]: 19:02:34 [INFO] Crash kernel loaded
Oct 02 19:02:34 localhost systemd[1]: Finished Load crash kernel.
Oct 02 19:02:34 localhost systemd[1]: Starting Disable kexec load syscalls...
Oct 02 19:02:34 localhost sysctl[1084]: kernel.kexec_load_disabled = 1
Oct 02 19:02:34 localhost systemd[1]: Finished Disable kexec load syscalls.
Oct 02 19:04:34 localhost systemd-networkd-wait-online[1083]: Timeout occurred while waiting for network connectivity.
Oct 02 19:04:34 localhost systemd[1]: systemd-networkd-wait-online.service: Main process exited, code=exited, status=1/FAILURE
Oct 02 19:04:34 localhost systemd[1]: systemd-networkd-wait-online.service: Failed with result 'exit-code'.
Oct 02 19:04:34 localhost systemd[1]: Failed to start Wait for Network to be Configured.

Terms of contribution:

By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.

The login package is intended to help debug failures that occur early
in boot, but by default the getty services are not started until
`multi-user.target`, which is only activated if everything works as
expected.

Start the `getty.target` as part of `preconfigured.target` so that
the login prompt will be available even if there are problems with
networking or filesystem mounts.

Signed-off-by: Ben Cressey <bcressey@amazon.com>
@bcressey bcressey merged commit 428e89b into bottlerocket-os:develop Oct 4, 2024
2 checks passed
@bcressey bcressey deleted the improve-login branch October 4, 2024 18: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.

3 participants