From owner-freebsd-stable@FreeBSD.ORG Fri Nov 27 09:45:36 2009 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DA79B106566C for ; Fri, 27 Nov 2009 09:45:36 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from QMTA14.emeryville.ca.mail.comcast.net (qmta14.emeryville.ca.mail.comcast.net [76.96.27.212]) by mx1.freebsd.org (Postfix) with ESMTP id C26FB8FC08 for ; Fri, 27 Nov 2009 09:45:36 +0000 (UTC) Received: from OMTA24.emeryville.ca.mail.comcast.net ([76.96.30.92]) by QMTA14.emeryville.ca.mail.comcast.net with comcast id A9l51d0011zF43QAE9ldoW; Fri, 27 Nov 2009 09:45:37 +0000 Received: from koitsu.dyndns.org ([98.248.46.159]) by OMTA24.emeryville.ca.mail.comcast.net with comcast id A9ll1d0033S48mS8k9lllZ; Fri, 27 Nov 2009 09:45:46 +0000 Received: by icarus.home.lan (Postfix, from userid 1000) id 0A2E81E3035; Fri, 27 Nov 2009 01:45:35 -0800 (PST) Date: Fri, 27 Nov 2009 01:45:35 -0800 From: Jeremy Chadwick To: freebsd-stable@freebsd.org Message-ID: <20091127094534.GA40406@icarus.home.lan> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) Subject: Re: 7.2 serial console/getty problem X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Nov 2009 09:45:37 -0000 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@parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP: 4BD6C0CB |