Elektrine lite

← Feed

@daandemeyer@mastodon.social

Post #985082

2026-04-01 14:01 UTC

Finally had a go at solving one of my biggest pet peeves with booting up Linux, having to add console=ttyS0 or console=hvc0 or console=<god-knows-what> to the kernel command line to get output on the serial console. With https://github.com/systemd/systemd/pull/41387, systemd-stub will now try to auto-detect whether a single virtconsole or serial console is attached without graphics output and append console= to the kernel command line automatically so you get output on the serial console automatically.

Replies (6)

  • @raito@nixos.paris 2026-04-01 14:08

    @daandemeyer YESSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS

    Open ##1539633

  • @pid_eins@mastodon.social 2026-04-01 14:28

    @daandemeyer You forgot to mention that this functionality is in particular useful in secure environments, since it allows serial console handling without breaking the secure boot chain, i.e. because sd-stub appends it on its own based on trusted info, we don't have to measure it explicitly, and thus switching to booting via serial doesn't break measurements that shouldn't really be broken. Or in other words: this is not just handy, but load bearing.

    Open ##1539634

  • @daandemeyer GRUB can't do that? Odd. GRUB can do just about everything else.

    Open ##1539635

  • @0x2ba22e11@unstable.systems 2026-04-01 15:35

    @daandemeyer ooh that's nice

    Open ##1539643

  • @agowa338@chaos.social 2026-04-01 15:39

    @daandemeyer can you also try to detect if a 2nd gpu (that is known to be IPMI KVM) is present and treat it just the same? so that even if all output is on the external gpu/monitor you by default get a text console on the ipmi by change?

    Open ##1539644

  • @samueldr@ap.samueldr.com 2026-04-01 15:52

    @daandemeyer how does that work with the /chosen/stdout-path semantics already in place in the kernel for DT platforms? This may be a simplefb node, or a serial device. https://github.com/torvalds/linux/blob/9147566d801602c9e7fc7f85e989735735bf38ba/Documentation/devicetree/bindings/display/simple-framebuffer.yaml#L41https://github.com/torvalds/linux/blob/9147566d801602c9e7fc7f85e989735735bf38ba/Documentation/admin-guide/kernel-parameters.txt#L1431-L1432

    Open ##1539647