Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 8 Mar 2019 07:53:05 -0800 (PST)
From:      "Rodney W. Grimes" <freebsd-rwg@gndrsh.dnsmgr.net>
To:        bob prohaska <fbsd@www.zefox.net>
Cc:        "Rodney W. Grimes" <freebsd-rwg@gndrsh.dnsmgr.net>, Warner Losh <imp@bsdimp.com>, freebsd-arm@freebsd.org, Konstantin Belousov <kib@freebsd.org>
Subject:   Re: Editing on the serial console
Message-ID:  <201903081553.x28Fr5iG095603@ gndrsh.dnsmgr.net>
In-Reply-To: <20190308055313.GB49607@www.zefox.net>

next in thread | previous in thread | raw e-mail | index | archive | help
> On Thu, Mar 07, 2019 at 11:13:37AM -0800, Rodney W. Grimes wrote:
> > 
> > It is where it is because it is not
> > 	/etc/      system configuration files and scripts
> > and is
> > 	/usr/share/     architecture-independent files
> >             misc/       miscellaneous system-wide ASCII text files
> > 
> > The /etc/termcap link is for backwards compatibility.
> > 
> 
> The logic is impeccable, but the utility leaves something to be
> desired. On entering single user, the RPI console reports
> 
> Enter full pathname of shell or RETURN for /bin/sh:
> Cannot read termcap database;
> using dumb terminal settings.
> 
> It was necessary to mount /usr so as to get at vi, which one might
> expect to make the termcap database accessible. Even so, the display
> was garbled. Maybe this was the result of using lxterminal to ssh to
> the host holding the usb-serial adapter to the target's serial console.

What sequence of commands do you do to recver from the failed
reading of termcap, and the downgrading of your term to dumb?
mount /usr
env TERM=xterm
tset

Or similiar are the 3 things minimal to recover from this
condition.  Just mounting /usr only makes termcap visible,
your TERM env value is still wrong, and your terminal has
not been initialized.

> 
> Using putty to connect to the usb-serial host produced a clean display.
> 
> The serial console is rather indespensible on an RPI, is there a way
> to configure it to be well-behaved with whatever terminal emulator
> is readily available? 

The simple fix if your infact are using split /usr is to just
copy /usr/share/misc/termcap to /etc.    I do not recommend
split /usr as FreeBSD continiously break this
in ways that require expert knowledge to sort out and fix
at times.  Similiar with readonly /,   Even I finally got
so tired of trying to deal with it my NFS diskless stuff
now runs with a R/W exported / that has /usr in it.
It is on a zfs file system, with an @prestine snapshot so I
can occasionally revert to that state.

> Thanks for reading!
> bob prohaska
-- 
Rod Grimes                                                 rgrimes@freebsd.org



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201903081553.x28Fr5iG095603>