Hacker News new | ask | show | jobs
by lawl 4452 days ago
You can pass the kernel options before booting. i.e. "quiet" or "debug". The Kernel exposes these options via /proc/cmdline.

systemd parses /proc/cmdline and if "debug" is set, it also raises it's log level to debug. Then systemd logs so much to the kernel log that it gets flooded and fails to boot.

Edit: And story wise, systemd says yeah, we're not going to fix this or rename the debug flag for systemd to "systemd.debug" because blah.

And Torvalds gets pissed.

1 comments

So basically, systemd is catching the common keyword 'debug' from a command that being given to something else entirely, and in turn enabling its own logging, which floods the system. The command wasn't actually meant for systemd, but for the kernel. Is that correct?
You're correct, but from a user perspective it's a totally valid thing to do. When your system (or pretty much any software) doesn't work, you want to pass some "debug" flag so that the maximum information is logged and you can parse that later. You don't want to pass one debug flag per component, you want it to be global (just like when you say "quiet", you want every component to be quiet).
Pretty much. Though Linus says he's okay with other people parsing these options, that's why they expose them. But of course you should do it in a sane way. And systemd refuses to patch their code to namespace their flag and listen for "systemd.debug" instead of the generic debug flag that is primarily meant for the kernel.