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
Can't output systemd.show_status=true to both tty0 and ttyS0 #3403
Comments
So, we only write to /dev/console, really, which should end up on all kernel consoles, last time I looked. Are you saying that "echo foo > /dev/console" doesn't output the specified string on all consoles for you? |
On my system (Debian stable, though), " Kernel console config:
|
I also checked Rawhide (kernel 4.8.0-0.rc1.git3.1.fc26.x86_64, systemd-231-3.fc26.x86_64); There, systemd output goes to both consoles! (" |
Thanks for testing. Closing as this seems to be fixed now. |
Does anybody know which particular patch fixed this issue? |
http://www.tldp.org/HOWTO/Remote-Serial-Console-HOWTO/configure-kernel.html states:
That’s also what I can observe on Debian unstable as of today (2018-01-08), i.e. the attached monitor only displays kernel messages, and systemd messages are only visible on the serial console. I’d be curious why some systems differ in that regard. Are they configured differently? How? |
Maybe the content of
The |
I started Fedora-Minimal-armhfp-27-1.6-sda.raw.xz on my Raspberry Pi 3. The
Note that writes to |
Figured it out with help from @hannes: Fedora uses Plymouth by default, which takes care of surfacing the messages on tty1 (HDMI on the Raspberry Pi). As soon as you If my reading of https://github.com/torvalds/linux/blob/master/Documentation/admin-guide/serial-console.rst is correct, this is the intended behavior: /dev/console does not write to all specified devices, just to the preferred console (the one with the So I think the take-away is: if you want the messages to appear on multiple outputs, use plymouth (or similar). |
On Saturday 10 March 2018, Michael Stapelberg wrote:
So I think the take-away is: if you want the messages to appear on
multiple outputs, use plymouth (or similar).
The thing is that before my favorite distro unfortunately switched to
systemd everything was fine. Installing plymouth is a bit too much for
my use case ... just need a minimal system which looks somehow equal on
the monitor and serial console.
|
How did the init system you used before systemd implement this? Did it do more than writing to /dev/console? |
I guess it was a distro specific thing, openSUSE, |
Can someone re-open this? This is not fixed, but only worked around if Plymouth is installed. As @stapelberg explains, systemd writes only to systemd messages are only sent to both consoles if Plymouth is installed (such as on most Fedora - but not on minimal) which appears to step in and make everything written to all consoles. Without Plymouth, a kernel line such as |
Perhaps in early boot, |
Submission type
NOTE: Do not submit anything other than bug reports or RFEs via the issue tracker!
systemd version the issue has been seen with
Used distribution
In case of bug report: Expected behaviour you didn't see
systemd logs its output to both tty0 and ttyS0
In case of bug report: Unexpected behaviour you saw
systemd only logs to ttyS0
In case of bug report: Steps to reproduce the problem
Hi Lennart and friends! These days, I maintain the official Debian OpenStack image, available at:
http://cdimage.debian.org/cdimage/openstack/
In this image, I'm setting logging to go on both ttyS0 and tty0, so that the logs can be seen in both the "nova console-log" command output (which is the same as what's shown in the openstack-dashboard web GUI tab), and on the VNC console. For this, I'm setting this command line in Grub:
console=tty0 console=ttyS0,115200 earlyprintk=ttyS0,115200 consoleblank=0 systemd.show_status=true
The kernel understands this very well, and it outputs to both tty0 and ttyS0. If running sysv-rc and bootlogd, it works well as well: in Debian Wheezy, I added a patch for bootlogd to output to multiple console (this patch was sent to the Debian BTS). However, systemd doesn't seem to understand this, and has the behavior of the older bootlogd, which only outputs to the last set console= parameter. The result is that it logs only to ttyS0. As a consequence, someone using the OpenStack VNC console waiting for the virtual machine to boot could be fooled into believing something went wrong, when in fact, everything is working as expected. What's even weirder, is that I saw some output like this on the tty0:
[
[
[
ie: some kind of a start of a [ ok ], but nothing after the first char, and some seemingly empty lines before and after. This really looks like a bug to me.
I'm not sure if this is really a bug or a RFE, but this needs to be fixed anyways, as this would be super helpful for debugging (and not only in the case of the cloud).
Last: I can provide you with some access to some OpenStack servers if you need to test stuff, or I could test fixes that you would provide (a patch against the latest systemd version in Debian testing would do, for example...). You can get in touch with me on IRC if you do need that (my nick there, on both OFTC and Freenode, is zigo, not sure if you remembered me from Debconf in Switzerland...).
Thanks in advance for caring about this issue.
The text was updated successfully, but these errors were encountered: