I have an embedded Linux system, with /proc/cmdline
containing console=<uart device>
and earlycon=<uart device>
. Shortly after each boot, a getty service will turn <uart device>
into an interactive console. If I disable the getty service, I would like the console to stop printing messages once everything is initialized. However, I still see kernel messages being printed indfinitely when the getty service disabled. What is printing these kernel messages (is it a service, a kernel cmdline option, etc)? How do I stop kernel messages from being printed to console indefinitely, without recompiling the kernel? Is there a service I can kill to stop the kernel messages?
Asked
Active
Viewed 47 times
0

Ken Lin
- 986
- 1
- 8
- 22
-
Does this answer your question? [Change default console loglevel during boot up](https://stackoverflow.com/questions/16390004/change-default-console-loglevel-during-boot-up) – sawdust Aug 24 '23 at 23:07
-
Or change the `console=
` command line parameter to some other device. "*a getty service will turn – sawdust Aug 24 '23 at 23:13into an interactive console*" -- You're (incorrectly) conflating "*console*" and "login terminal". -
`dmesg -n 1` will prevent all messages except emergency (panic) messages going to the console. – Ian Abbott Aug 25 '23 at 10:30
-
1In util-linux v2.20 onwards' `dmesg`, `dmesg -D` will disable printing of the messages to the console completely, but that is not currently supported by busybox's `dmesg`. – Ian Abbott Aug 25 '23 at 10:41
-
Do you have `CONFIG_VT_HW_CONSOLE_BINDING` enabled in your kernel config? – dimich Aug 25 '23 at 13:17