Editing on the serial console

Rodney W. Grimes freebsd-rwg at gndrsh.dnsmgr.net
Fri Mar 8 15:53:18 UTC 2019


> 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 at freebsd.org


More information about the freebsd-arm mailing list