[systemd-devel] How to make debug-shell more usable?

Lennart Poettering lennart at poettering.net
Sun Mar 1 03:25:12 PST 2015


On Thu, 26.02.15 00:55, Michael Biebl (mbiebl at gmail.com) wrote:

> 2015-02-26 0:44 GMT+01:00 Lennart Poettering <lennart at poettering.net>:
> > What precisely is supposedly written there? I have never seen anythign
> > like that on FEdora...
> >
> > Maybe you should reconfigure your kernel to not spew its output always
> > on the console?
> 
> Well, if you want to debug boot issues, you typically remove the quiet
> flag from the kernel command line. That aside, once systemd hits a
> timeout or a service failure, it switches to verbose mode
> automatically.
> 
> To reproduce the problem, add e.g. a non-existing device to /etc/fstab
> 
> The "Waiting for device to show up ..." messages are printed all over tty9.
> 
> Also, as mentioned, once the 90 sec timeout has been reached and tty9
> is the active tty, the emergency shell is started on tty9 with the
> aforementioned issues.

Well, not really. emergency.service uses /dev/console, whereever it
might point.

I am pretty sure it's the right behaviour to push status output to
/dev/console, and also run emergency.service on it. Also, I think
running the debug-shell on vt9 is the right thing.

Not entirely sure what the right approach is though to make them
not interfere that much. We could add "systemd-analyze
set-show-status" the same way we already expose "systemd-analyze
set-log-level", to turn of status output, and then recommend usage of
that if people want to turn this off when in the debug shell (maybe by
printing a line recommending this before invoking the shell).

One thing we could also try to do is redirecting /dev/console to VT1, as
soon as emergency.service is spawned on VT9. This is doable with the
TIOCCONS ioctl. We could run a small binary as part of ExecStartPre=
in debug-shell.service that invokes it for /dev/tty1...

WOuld that make sense?

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list