7.2 serial console/getty problem

Jeremy Chadwick freebsd at jdc.parodius.com
Fri Nov 27 09:45:37 UTC 2009


On Fri, Nov 27, 2009 at 02:45:39AM -0500, Charles Sprickman wrote:
> Howdy,
> 
> I'm having some issues getting a working serial console on a
> 7.2-amd64 system (Dell PE 2970).  Everything is running at 9600bps
> to keep things simple (BIOS, loader, getty).  Normal DB-9 null cable
> to another host. /etc/ttys has getty on ttyd0 with the "std.9600"
> gettytab entry and vt100 terminal type.
> 
> The following works fine:
> 
> -Console redirection via Dell's BIOS (I can enter setup, navigate
> BIOS, enter RAID config, etc.)
> -Boot loader (can enter boot params, select boot options, etc.)
> -Boot messages (displays fine)
> 
> However once the machine boots and getty has control, things get a
> bit odd.
> 
> I've tested this with various hosts using minicom and conserver
> (conserver.com).  No problems with my other hosts running older
> versions of FreeBSD with the same settings (9600, 8N1, hw flow
> control).
> 
> If I just hit "enter", I get a response like this:
> 
> noooo~:oommv64(jkoomimnnwwou})(|t}}t9-
> 
> It does not vary - always the same string.
> 
> However, if I hit CTRL-D, then I get a normal prompt:
> 
> FreeBSD/amd64 (bigmail.bway.net) (ttyd0)
> 
> login:
> 
> If at the "login:" prompt I just hit "enter" again without typing a
> username, I get the same garbled output.
> 
> CTRL-D again gives me a proper prompt.
> 
> Once I'm logged-in, there seem to be no issues.  "vi", "top" and
> other things that rely on the terminal being sane work fine.
> 
> Any ideas?

The only idea I have is one which pertains to flow control, or lack
there-of.  Prior to logging in, flow control isn't used.  Marcel
Moolenaar told me about this when I complained that occasionally on
serial console, prior to logging in, that characters could be lost, even
when using hardware flow control (CTS/RTS).  I initially thought the
problem was induced by uart(4) (which I was trying out when I noticed
the problem), but it happens on sio(4) as well.

Example of what I'm referring to on a (RELENG_7 box; /etc/ttys uses
std.115200; serial adapters are absolute 100% correct and wired for
hardware CTS/RTS), where all I'm doing is hitting Enter:


FreeBSD/amd64 (horus.sc1.parodius.com) (ttyd0)

login:
FreeBSD/amd64 (horus.sc1.parodius.com) (ttyd0)

login: )

login:
 (horus.sc1.parodius.com) (ttyd0)

login:
FreeBSD/amd64 (horus.sc1.parodius.com) (ttyd0)

login: )

login:
 (horus.sc1.parodius.com) (ttyd0)

login:


Note that the way the text messes up is consistent.  Again, this only
happens prior to logging in.  And yes, if I press EOF[*], I get a proper OS
string and prompt.

Maybe somehow this is what you're experiencing but manifesting itself
differently (visually)?  I could be totally off base but it's the only
thing I can think of.

I haven't tried RELENG_8 on a box with serial console, so I can't say
whether or not the new tty code in RELENG_8 somehow addresses this; Ed
Schouten would have to comment on that.

[*] -- Be aware that as of this writing, 8.0-RELEASE (and presently
RELENG_8) does have a problem with printing the EOF character (^D) once
logged in.  Example: log in, run cat, hit ^D, and you'll actually see
Caret-D printed (vs. on previous FreeBSD releases, where ^D wouldn't be
shown).  This is a bug in 8.x which Ed has since fixed, but the code
hasn't been MFC'd yet (but will be soon):

http://koitsu.wordpress.com/2009/10/12/testing-out-freebsd-8-0-rc1/
http://koitsu.wordpress.com/2009/11/02/testing-out-freebsd-8-0-rc2/

-- 
| Jeremy Chadwick                                   jdc at parodius.com |
| Parodius Networking                       http://www.parodius.com/ |
| UNIX Systems Administrator                  Mountain View, CA, USA |
| Making life hard for others since 1977.              PGP: 4BD6C0CB |


More information about the freebsd-stable mailing list