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

add a mechanism for reasonably diagnosing early boot issues #243

Open
q66 opened this issue Sep 12, 2023 · 6 comments
Open

add a mechanism for reasonably diagnosing early boot issues #243

q66 opened this issue Sep 12, 2023 · 6 comments
Labels
C-dinit Things about the main parts of dinit Feature Request Request a feature to be added to dinit

Comments

@q66
Copy link
Contributor

q66 commented Sep 12, 2023

Right now if there is an unexpected case or error in early boot, dinit will dump a whole lot of stop messages, obscuring what actually failed. There is no way to get the output; there is a good chance that it failed before root could even mount read-write yet, and --log-file expects starts-log service to have started already so it's pretty useless without doing hacky interventions in the system.

So best users can do is something like init=/bin/sh and then run like mount -t tmpfs none /somewhere and dinit --system|tee /somewhere/log.txt and see what went wrong to fix it and be able to boot the normal way.

Either making the output less uselessly dumpy (do we really need to know 20 services have stopped?) would help, or some kind of pager, or ...

@mobin-2008 mobin-2008 added C-dinit Things about the main parts of dinit Feature Request Request a feature to be added to dinit labels Sep 12, 2023
@davmac314
Copy link
Owner

Still thinking about this. I agree that some solution is needed, not sure what the best option is yet.

@q66
Copy link
Contributor Author

q66 commented Sep 18, 2023

making --log-file not require starts-log would be a start (what's even the reasoning behind that requirement? i can see it for syslog, but...)

i'm thinking perhaps an service file option to make it "quiet" (i.e. no start/stop messages, only errors) would also help some, to declutter early boot

@davmac314
Copy link
Owner

making --log-file not require starts-log would be a start (what's even the reasoning behind that requirement? i can see it for syslog, but...)

The man page is actually out of date, it requires starts-rwfs rather than starts-log. Even this isn't perfect of course, it probably would be better to attempt opening the log file at the very beginning (and only if that fails, try again when root is writable).

@q66
Copy link
Contributor Author

q66 commented Sep 18, 2023

starts-rwfs is still no good, as it's perfectly reasonable that one may be writing the early log in a tmpfs

@davmac314
Copy link
Owner

Yep, hence:

it probably would be better to attempt opening the log file at the very beginning

@davmac314
Copy link
Owner

Recent commits aebcd39 and 7f1a0d1 also address this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-dinit Things about the main parts of dinit Feature Request Request a feature to be added to dinit
Projects
None yet
Development

No branches or pull requests

3 participants