Serial console problems with stable/8
jhb at freebsd.org
Mon Sep 13 16:25:36 UTC 2010
On Monday, September 13, 2010 11:55:27 am Oliver Fromme wrote:
> John Baldwin wrote:
> > On Monday, September 13, 2010 8:49:48 am Oliver Fromme wrote:
> > > Now I get your point ... Yes, -P does probe the keyboard
> > > first. That's probably why I see the boot0/boot2 on the
> > > VGA console, not on the serial port. As far as I know,
> > > /boot.config is read by the boot0/boot2 stage, not by
> > > loader(8).
> > But loader inherits the settings from boot2, so if you set it in
> > /boot.config you do not need to set anything in loader.conf. Also,
> > having boot2 use serial is good in that you can boot loader.old if
> > you ever get a broken /boot/loader. Using '-Dh' in /boot.config is
> > what I do on all the boxes where I use a serial console.
> Makes sense. I'll change -P to -Dh.
> But having console="comconsole" in loader.conf should also
> enable the serial console, except that it happens a little
> later (in loader instead of boot2), right?
> I think the boot.config stuff might be a red herring.
> The console breaks (i.e. freezes) as soon as I try to run
> a getty process on it -- That seems to indicate that getty
> does *something* to the console device which causes the
> problem. The wchan "ttydcd" seems to indicate is has
> something to do with carrier detection or flow control.
> This points to the uart driver as the culprit which
> replaced sio.
Well, /dev/ttyXX have always waited for carrier detect, whereas /dev/cuaXX
(the call-out devices) have not. That was so that you could hook a modem up
to a serial port and getty would not return from open(2) and print a login
banner until someone dialed the modem and connected. I think Jeremy has
already given you some good things to try (such as 3wire.9600) to debug this
> > > Anyway, I don't care too much for boot0/boot2; I've never
> > > had to interact with them on that machine. The important
> > > thing for me is that loader(8) and the kernel use the
> > > serial port for the console, and that I can login on it
> > > (i.e. there must be a getty running). All of that seemed
> > > to be accomplished with the console="comconsole" entry in
> > > /boot/loader.conf ... At least it worked when I first
> > > installed that machine in September 2000 (yeah, exactly 10
> > > years ago) with FreeBSD 4.1, then updated it roughly every
> > > two years ... And it stopped working in 8.x.
> > Did you update your hints to rename the 'sio' hints to 'uart'?
> Yes, mergemaster did that for me. I double-checked it.
Ok. I know that for machines I have at work that run 7, if I boot a 8.x
kernel have to explicitly unset the sio hints and set the uart hints for
the serial console to work in 8.
More information about the freebsd-stable