我需要重新编译内核吗?
没有。
还是有一种方法可以使更改的值在重新引导后保持不变。
是。
使用内核命令行参数
loglevel:
loglevel= All Kernel Messages with a loglevel smaller than the console loglevel will be printed to the console. It can also be changed with klogd or other programs. The loglevels are defined as follows: 0 (KERN_EMERG) system is unusable 1 (KERN_alert) action must be taken immediately 2 (KERN_CRIT)critical conditions 3 (KERN_ERR) error conditions 4 (KERN_WARNING) warning conditions 5 (KERN_NOTICE) normal but significant condition 6 (KERN_INFO)informational 7 (KERN_DEBUG) debug-level messages
内核命令行上所有可能的参数列表都在
Linux/documentation/kernel-parameters.txt源代码树的文件中。
根据您的引导程序(例如Grub或U-Boot),您将必须编辑文本以将此新参数添加到命令行。使用
cat/proc/cmdline查看使用以前的引导内核的命令行。
附录
为了显示所有内容,为loglevel参数提供的数字应大于KERN_DEBUG。
也就是说,您必须指定
loglevel=8。
或者直接使用该
ignore_loglevel参数显示所有内核消息。



