Ubuntu – How to **really** suppress kernel messages during boot

18.04bootkernellogging

I have Ubuntu Server 18.04 LTS. I want to suppress kernel messages shown on console during boot. (The type of [0.1234] kernel message thing that floods the screen ).

THIS DID NOT WORK:

  • Changing /etc/systl.conf
  • Setting LogLevel=err or LogLevel=emerg in /etc/systemd/system.conf. This did in fact remove [ ok ] Blah blah type of messages but not [123.456] Something something type.
  • Changing GRUB settings. Even GRUB_CMDLINE_LINUX_DEFAULT="quiet loglevel=3 rd.systemd.show_status=auto rd.udev.log-priority=3 loglevel=0"
    (source). No, difference in loglevel=0 or loglevel=3. No, I did not forget to run sudo update-grub.
  • sudo dmesg -n 1 (source)
  • This,too. Don't mark this question as duplicate of that since agetty is completely unrelated to boot messages and OP's own answer does not work, like I mentioned above about GRUB part.
  • editing /etc/systemd/journal.conf to set ForwardToWall=no or MaxLevelWall=emerg
  • setting console=tty5 in /etc/default/grub ( source )
  • I removed plymouth completely – the messages still appear. Which also makes sense since it's not related to plymouth, it's not even started as service in systemd, and there's no GUI on this system.

I'll probably be offering a bounty to the answer that can make a perfectly quiet boot setting and maybe downvote all those other answers because they're outdated and not useful at all and don't work at all. I've spent quite a considerable time on trying to figure this out with not much results.

Best Answer

  • So apparently console=tty5 doesn't work or any virtual console for that matter. What does seem to work is console=ttyS0 set in GRUB_CMDLINE_LINUX (the GRUB_CMDLINE_LINUX_DEFAULT doesn't work for some reason, even though that option should send kernel parameters to normal boot, while GRUB_CMDLINE_LINUX - to both diagnostic and normal). I'll update this answer if I figure out anything else but so far this seems to be it.