Subject: Re: Startup Messages
To: Nicolas Saurbier <Nicolas.Saurbier@biodata.de>
From: Richard Rauch <rauch@rice.edu>
List: netbsd-help
Date: 07/12/2002 09:30:57
First, I'd point out that the messages *do* grow on you, Nicolas.  (Though
on a faster system, you may not be able to do more than browse the
messages to get a vague sense of where the computer is.  (^&)

And, too, if you run NetBSD as your primary OS with stable hardware and
power, you don't need to boot so often.  (And when you do boot, I'm
baffled at the harm that it causes to have text scroll by telling you what
the computer is up to.  Even if you don't read it...I'm curious: Why do
you want to disable it?)


Also, your message was sent as quoted-printable, it looks like.  Can you
please disable that in your mail program?  Thanks.


Okay, that said, I have some suggestions:

If you don't mind that the messages scroll by, but just want them OFF of
your console by the time you first login, then you might look at ttyaction
(/etc/ttyaction).  You can set a "getty" action to run *before* a login
prompt is displayed.  The specified action in my /etc/ttyaction is to
clear the screen.  (I actually would like to *retain* my boot messages.
I put the clear screen sequence in because I wanted to have the previous
login activity cleared on logOUT.  Unfortunately, I couldn't see a way to
do that, and I didn't want to treat the first virtual console differently
from the others...)

I'm not sure how dependant this is on things like wscons, but (with ESC
for the ASCII ESC character), here is my /etc/ttyaction file:

 /~~~ /etc/ttyaction

#       $NetBSD: ttyaction,v 1.1 2000/06/04 00:04:59 perry Exp $
#
# tty   action  command...
ttyE0   *               chown ${USER}.tty /dev/console
ttyE?   getty   /bin/echo -n >>/dev/${TTY} "ESC[HESC[J"

 \___ /etc/ttyaction

Note that there are *two* ESC's in the line; each one immediately before
a [.  I assume that you can find a way to put an ASCII ESC character in a
file.  (^&

This homes the cusor and clears the screen prior to a login prompt.  (It
depends upon an ANSI- or VT100-like console.  The native NetBSD text
console (at least in wscons) is capable of handling this---at least with
a default kernel config.)


If the above doesn't work for you, or if you don't even want to *see* the
messages as they scroll by, however, that's not going to cut it.  But you
can still try another thing or two:

If you boot NetBSD/i386 with a GENERIC kernel, you will note that some of
your boot messages are green, and others are white.  The green ones are
from the kernel, and you can set their colors via kernel config options.
From 1.5.2's GENERIC config:

 /~~~

# different kernel output - see dev/wscons/wsdisplayvar.h
options         WS_KERNEL_FG=WSCOL_GREEN
#options        WS_KERNEL_BG=WSCOL_BLACK

 \___

...so, set fore- and background both to WSCOL_BLACK (I assume that you can
do so).  The text will still be displayed, but all of those green messages
will no look like blank lines.

That just leaves the non-kernel lines.  I'm not sure if there is a unified
way to get rid of those; a first thought is (again, assuming a suitable
terminal for your console) is to emit escape sequences to set the terminal
to black-on-black.  You'd have to find and modify the first program that
prints a message on your system.


Another option might be to force a serial console.  (I've never done
that...if you don't have a serial terminal hooked up, does it block the
boot waiting for flow control?  Would it interfere with a non-serial local
console and/or running X?)  If you can force a serial console (possibly
without a terminal attached), the messages might all go to oblivion for
you.



Depending on why you don't want to see these messages, one or more of the
above may help.  (And, out of curiosity: Why don't you want to see them?)


  ``I probably don't know what I'm talking about.'' --rauch@math.rice.edu