Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 13 Jan 2000 14:18:40 +0000
From:      Adam Laurie <adam@algroup.co.uk>
To:        Mike Smith <msmith@freebsd.org>
Cc:        Dag-Erling Smorgrav <des@flood.ping.uio.no>, cjclark@home.com, stable@freebsd.org
Subject:   Re: console disappears after reboot
Message-ID:  <387DDEC0.1BC6381D@algroup.co.uk>
References:  <200001131158.DAA01817@mass.cdrom.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Mike Smith wrote:
> 
> > [moved to -stable from -security]

I'm not subscribed to -stable, so please copy me on any responses.

> >
> > "Crist J. Clark" <cjc@cc942873-a.ewndsr1.nj.home.com> writes:
> > > Adam Laurie wrote,
> > > > Crist J. Clark wrote:
> > > > > > Anyway, to cut a long story short, I would prefer to simply do something
> > > > > > in /etc/rc.local to force the console back to local kb/vga, or disable
> > > > > > the serial console in the kernel itself... so my question is: what? Is
> > > > > > there such a command/setting?
> > > > > If a console has "died," you should [HUP init]
> > > > Unfortunately not. I assume it only tries to refresh the serial console.
> > > I don't think so. Is the getty(8) for the device (I assume ttyv0) still
> > > in the ps(1) output? If it is, perhaps kill it. Either kill it dead
> > > and SIGHUP init(8) to start the new one, or maybe some signal (a HUP?)
> > > refreshes a getty.
> >
> > You're totally off the track. His problem is that the kernel (or the
> > boot loader) decides that there is no built-in console and uses a
> > serial console instead. This has nothing to do with init(8). I guess
> > the right person to answer this kind of question would be Mike Smith
> > or Daniel Sobral.
> 
> I don't have any context for this, so it's a bit hard to be sure.
> 
> The decision as to which console to use is normally made by boot2; it will
> use the video and keyboard BIOS unless:
> 
>  a) the -h flag is supplied in /boot.config
>  b) the -P flag is supplied in /boot.config AND the BIOS has not set the
>     'extended keyboard present' flag.
> 
> This decision can be overridden with a setting in /boot/loader.conf which
> can cause the loader to switch to another console, and it can be
> overridden again by flags set on an sio device.
> 
> So in summary; there's nothing that will "decide there is no built-in
> console" unless you explicitly tell it to go look for itself.  Anything
> that's causing the system to talk to a serial console is at the admin's
> request.  At this point in time, there is no way to force a change of
> console once the system is up and running.

Unfortunately experience tells us otherwise. If we boot with no VGA
plugged in, we can't plug one in later and expect to see a console. The
admin has not requested a serial console, in fact we've tried disabling
it in the kernel config. We also have a problem with using
/boot/loader.conf (it can't be found if it's outside cylinder 1023, even
though the boot itself still works).

Here's my original post to give you the full context:

I am working at a facility that has a locked server room with an annexe
just outside where you can access the servers without being in the
cold/noise. For security reasons, the vga/keyboard switch that feeds the
annexe is switched off when there's no-one there. This setup has worked
fine for a number of years. However, we are now installing some new
servers and we've found that if they get rebooted when the switch is
off, the console gets changed to a serial device. This means we've lost
the machine(s) until we log in remotely and reboot again. Not good. 

It seems that FreeBSD 3.1+ scans for a console, and if it can't find kb
/ vga it switches to serial. The old machines all work fine as they are
3.0 or less.

I know I can set the console device in /boot/loader.conf, but this leads
to other problems (possibly a bug here): on some machines we get a
"/boot/loader not found - Disk error 0x1", and we suspect that this is
to do with the boot partition not being constrained to the first 1024
cylinders.

Anyway, to cut a long story short, I would prefer to simply do something
in /etc/rc.local to force the console back to local kb/vga, or disable
the serial console in the kernel itself... so my question is: what? Is
there such a command/setting?

cheers,
Adam
--
Adam Laurie                   Tel: +44 (181) 742 0755
A.L. Digital Ltd.             Fax: +44 (181) 742 5995
Voysey House                  
Barley Mow Passage            http://www.aldigital.co.uk
London W4 4GB                 mailto:adam@algroup.co.uk
UNITED KINGDOM                PGP key on keyservers


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?387DDEC0.1BC6381D>