Re: Quiet boot, where to start?

Nicholas J. Leon (nicholas@binary9.net)
Sat, 24 Apr 1999 00:58:28 -0400 (EDT)


On Fri, 23 Apr 1999, Justin Hahn wrote:

# As such I've decided I'm going to try and build a quiet boot option
# for the kernel, that is one that displays MINIMAL output to the
# screen, and instead dumps it all to a log file. So I guess what I am asking is

Sounds like a great first project. And, IHMO, something that needs to be
done /anyway/.

What I would like to see is varying levels of output. I would envision
that each section of the kernel (or modules) that want to output
initialization information should be rigged something like:

nprintk(LOG_NAME,"Foobar driver 1.10");
nprintk(LOG_COPYRIGHT,"Copyright (c) 1999 by Alan Smithe");

then as need in the code

nprintk(LOG_INFO,"Found foobar0 device at irq 0");

and also

nprintk(LOG_ERROR,"foobar0 would not initialize");

That way you could have handling in the nprintk() implementation that did
filtering based on what was passed to the kernel during boot. I guess this
is all ala syslog.

I would like to see the output look something like:

Linux version 2.2.5-arca (root@neko) (gcc version 2.7.2.3) #3 SMP
SMP v1.4: INTEL 440BX, 2 Processors, Pentium(tm) Pro APIC (v17)
0: Intel Pentium II (Klamath) stepping 04 (233.8Mhz, 233.47 BogoMIPS)
1: Intel Pentium II (Klamath) stepping 04 (233.8Mhz, 233.47 BogoMIPS)
Memory: 193120k/196608k available (880k kernel code, 416k reserved,
2192k data, 0k init)
IP Protocols: ICMP, UDP, TCP, IGMP
Detected PS/2 Mouse Port.
Detected PIIX4 IDE controller
hda: WDC AC36400L, 6149MB w/256kB Cache, CHS=13328/15/63, UDMA
hdb: IBM-DTTA-351010, 9671MB w/466kB Cache, CHS=19650/16/63, UDMA
hdc: WDC AC36400L, 6149MB w/256kB Cache, CHS=13328/15/63, UDMA
hdd: NEC CD-ROM DRIVE:260, ATAPI CDROM drive, PIO

etc .... which wuld be a medium verbosity level (like a "hardware
detection level"). No more than a screenfull though. I wouldn't also mind
seeing something as luser-ish as:

Linux 2.2.5-arca (2 x PentiumII 233Mhz, 196608k physical memory)
Initializing console: OK
Initializing networking: OK
Initializing ide: OK
Initializing scsi: NOT FOUND

etc....

But be warned that you can't log to disk when the kernel is coming up and
generating the messages. What I would do is use the buffer that dmesg
already pulls from all the time, but filter the output to the screen based
on the requested level. Of course the dmesg buffer might not be big enough
as it is (its at 8K now, right?).

G'day! <have thought many times about doing this myself>
-- n i c h o l a s j l e o n
elegance through simplicity*http://mrnick.binary9.net*nicholas@binary9.net
good fortune through truth*ICQ#2170994*pattern?8,5,4,1,9,7,6,3,2,0*U+($++)
TRA#6805*not all questions have answers*pseudogeek:P+++($++)L+($++)W=lm@b9
2.3x10e-53*seek the path-not the destination*madison*pain builds character

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/