canonical / charm-sysconfig

A subordinate charm to apply system settings like grub configurations or systemd configurations.
Apache License 2.0
0 stars 5 forks source link

console redirection parameters are misleading #18

Closed dashmage closed 9 months ago

dashmage commented 9 months ago

The charm sets the following GRUB_CMDLINE by default:

GRUB_CMDLINE_LINUX_DEFAULT="$GRUB_CMDLINE_LINUX_DEFAULT console=tty0 console=ttyS0,115200 console=ttyS1,115200"

This may appear to be redirecting the console to both ttyS0 and ttyS1, but that's not true: the kernel will only output kernel messages on one device per type. Since the first one in the list wins, kernel messages will only appear on ttyS0 (and tty0, but that's because it's a different device type).

The rules governing console redirection can be found here: https://www.kernel.org/doc/html/latest/admin-guide/serial-console.html


Imported from Launchpad using lp2gh.

dashmage commented 9 months ago

(by aieri) In my testing "console=tty0 console=ttyS0,115200 console=ttyS1,115200" will also confusingly push foreground messages to vga instead of serial; this may be because the last device in the line (ttyS1) is not actually being used, so the logic reverts to the default, as if none of those options had been set.

dashmage commented 9 months ago

(by addyess) Andrea: do you have a recommended change for this bug? Like a proper solution for the GRUB commandline? Or a work around that seems to be working well?

dashmage commented 9 months ago

(by addyess) please see this bug (1887012) which is similar but not quite the same and consider them at the same time

dashmage commented 9 months ago

(by aieri) fix proposed in linked MP