This is a copy of an article that I posted in linux.dev.kernl (aka the linux-kernel mailing list). It provides a patch to the Linux 2.0.0 kernel which allows to set the default console log-level using a kernel command-line option, "loglevel".
Passing "loglevel=1" to the kernel at boot time will effectively disable all kernel boot messages.
From thomas Fri Jun 21 17:31:26 1996 Subject: Re: Boot messages (Was: Re: Ideas for v2.1) (fwd) Newsgroups: linux.dev.kernel References: <199606200604.QAA20242@godzilla.zeta.org.au> Organization: Cuivre, Argent, Or Distribution: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Lines: 60 X-Newsreader: TIN [UNIX 1.3 BETA-950824-16colors PL0] Status: RO Nick Andrew (email@example.com) écrit : > I want to see boot messages - ugly, precise and informative. [ and I agree with him completely. ] > The next question becomes, how do we prevent the kernel from > displaying the startup messages? This is a one character change in kernel/printk.c. Set DEFAULT_CONSOLE_LOGLEVEL to 1 and you'll get no single kernel message on the console. This is sick, but it works. The messages are still stored into the klog ring buffer, and are available to dmesg, klogd... The following patch allows to set it using a kernel command-line option (loglevel=N) where N is in 1..8 and is the default log level. Now can we *please* drop this whole messages/animation/penguin noise and get back to real development ? diff -ur dist/linux-2.0/kernel/printk.c linux-2.0/kernel/printk.c
Here is the patch.
-- Thomas.Quinot@Cuivre.FdN.FR <URL:http://Web.FdN.FR/~tquinot/>
Usual disclaimers apply : use at your own risk. It would be nice if you gave (dis)credit where (dis)credit is due :-).
Back to the index
Last update: 1996-07-13