Re: Caching kernel messages at boot w/PATCH

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>Hi,
>Is there a way to hide the kernel messages from the screen at boot ?
>Best Regards
>Steph
>
Except for the sole "quiet" flag, I have this in my kernel tree:

AS_13-conlevel.diff
diff --fast -Ndpru linux-2.6.17-rc6~/kernel/printk.c linux-2.6.17-rc6+/kernel/printk.c
--- linux-2.6.17-rc6~/kernel/printk.c	2006-06-06 02:57:02.000000000 +0200
+++ linux-2.6.17-rc6+/kernel/printk.c	2006-06-08 22:24:16.847058000 +0200
@@ -697,6 +697,14 @@ int __init add_preferred_console(char *n
 	return 0;
 }
 
+static __init int set_conlevel(char *str) {
+    if(*str >= '0' && *str <= '9')
+        *console_printk = *str - '0';
+    return 1;
+}
+
+__setup("conlevel=", set_conlevel);
+
 /**
  * acquire_console_sem - lock the console system for exclusive use.
  *
#<<eof>>

It allows one to finely specify how much noise or silence the user wants.
conlevel=4 makes it quite silent (still shows some minor erros [1]), and 
decreasing that of course will make it even more silent.

[1]
sda: asking for cache data failed
sda: assuming drive cache: write through
piix4_smbus 0000:00:07.3: Host SMBus controller not enabled!

These three are then gone for me with conlevel=3. dmesg still 
records all messages (a good thing(tm)).


Jan Engelhardt
-- 
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux