Set the console kernel logging level

Dan Nicholson dbn.lists at
Mon Apr 16 17:33:26 PDT 2007

One of the things that can be irritating while booting is having all
the kernel messages mixing in with the messages from the bootscripts.
Attached is a script that will set the console log level with dmesg to
a configurable level.

The script reads the variable LOGLEVEL from
/etc/sysconfig/bootmessage. The default is 7, which seems to be what
the kernel sets on my system. There's a sanity check to see if this
value is between 1 and 8. I just determined those by trial and error.
Someone more knowledgeable about the kernel ring buffer might know
more. There's also a status target to print the current level.

I have the script installed as rcsysinit.d/S02bootmessage so it runs
right after /proc gets mounted in mountkernfs. Basically the same
thing happens in S05modules right now except that it restores the
value, so part of that script could be removed.

Thoughts? Any of the naming semantics are surely up for argument, but
the script makes things very nice on my system. Although it's cool to
see all my USB nodes enumerated a couple times, it's nice to quiet
things down when you know they're working.

-------------- next part --------------
A non-text attachment was scrubbed...
Type: application/x-sh
Size: 1295 bytes
Desc: not available
URL: <>

More information about the lfs-dev mailing list