Subject: Re: boot message
To: Marcin Jessa <lists@yazzy.org>
From: Hubert Feyrer <hubert@feyrer.de>
List: tech-kern
Date: 04/03/2005 13:05:16
On Sun, 3 Apr 2005, Marcin Jessa wrote:
> Is there a way one can make a booting kernel be silent and not to spit out all the info of what's going on?
> I wish my soekris build to be quiet and display only boot loader's message and then go straight to the login prompt.

There are two ways to get that done:

1) re-enable console=pc, and make sure you have gettys enabled, esp.
on your serial port (tty00).

2) Really tell the kernel to not print anything at all. I don't know to 
what extent that is supported, some support is available: printf(9) 
documents in the aprint_*() functions that you can set a "boothowto" 
variable to values like AB_QUIET, AB_VERBOSE and AB_SILENT.

I think the variable can be set from the bootprompt, setting a default in 
src/sys/kern/init_main.c would make sense to me. You'll need to change the 
C file for that.

In the bootloader, interrupt the countdown and type "boot -q". 
The result is not too impressive though:

 	> boot -q
 	booting hd0a:netbsd (howto 0x10000)
 	6746364+148460+522576 [376144+337471]=0x7c2458
 	BIOS CFG: Model-SubM-Rev: fc-00-01, 0x4074<EBDA,KBDINT,RTC,IC2,KBDF>
 	Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
 	    The NetBSD Foundation, Inc.  All rights reserved.
 	Copyright (c) 1982, 1986, 1989, 1991, 1993
 	    The Regents of the University of California.  All rights reserved.

 	NetBSD 2.0.1 (GENERIC_IPSEC) #0: Sun Feb 27 00:57:26 CET 2005

 	feyrer@vulab.fh-regensburg.de:/disk4/cvs/src-2.0/sys/arch/i386/compile/obj.i386/GENERIC_IPSEC
 	total memory = 32380 KB
 	avail memory = 23780 KB
 	BIOS32 rev. 0 found at 0xf9700
 	Found mainbus0 (root)
 	Found cpu0 at mainbus0: (uniprocessor)
 	cpu0: Intel Pentium Pro (686-class), 801.13 MHz, id 0x613
 	cpu0: features a1bd<FPU,DE,PSE,TSC,MSR,MCE,CX8>
 	cpu0: features a1bd<PGE,CMOV>
 	cpu0: I-cache 8 KB 32B/line 4-way
 	cpu0: L2 cache 128 KB 32B/line 4-way
 	cpu0: 8 page colors
 	Found pci0 at mainbus0: configuration mode 1
 	Found pchb0 at pci0
 	pchb0: Intel 82441FX PCI and Memory Controller (PMC) (rev. 0x02)
 	Found pcib0 at pci0
 	pcib0: Intel 82371SB PCI-to-ISA Bridge (PIIX3) (rev. 0x00)
 	Found piixide0 at pci0: disk controller
 	piixide0: primary channel interrupting at irq 14
 	Found atabus0 at piixide0
 	piixide0: secondary channel interrupting at irq 15
 	Found atabus1 at piixide0
 	Found vga1 at pci0: Cirrus Logic CL-GD5446 (rev. 0x00)
 	...

I didn't find anything in the boot(8) manpage that indicates how to set 
AB_SILENT (or AB_QUIET?). Try modifying the named .c file.

Having some switch to make things really silent would be nice.


  - Hubert

-- 
NetBSD - Free AND Open!      (And of course secure, portable, yadda yadda)