Editing on the serial console

Rodney W. Grimes freebsd-rwg at gndrsh.dnsmgr.net
Thu Mar 7 19:14:01 UTC 2019


> On Thu, Mar 7, 2019, 8:42 AM bob prohaska <fbsd at www.zefox.net> wrote:
> 
> > On Thu, Mar 07, 2019 at 12:10:11PM +0200, Konstantin Belousov wrote:
> > > On Thu, Mar 07, 2019 at 05:08:07PM +1030, O'Connor, Daniel wrote:
> > > >
> > > > > On 7 Mar 2019, at 14:24, bob prohaska <fbsd at www.zefox.net> wrote:
> > > > >
> > > > > Editing files in single-user mode on the serial console
> > > > > is non-trivial. Both vi and ee have problems displaying
> > > > > the file, ed doesn't really try so it works but isn't
> > > > > much fun. Is there a better option?  When the machine
> > > > > boots single-user it reports "can't read /etc/termcap",
> > > > > is something misconfigured?
> > > >
> > > > /etc/termcap is a symlink to /usr/share/misc/termcap - if you mount
> > /usr (read only is fine) then it should work.
> > > >
> > > > ie since you are in single user mode only / has been mounted.
> > > >
> > > > If / and /usr are the same FS them something else is wrong :)
> > >
> > > There is /etc/termcap.small, and I remember our libcurses uses TERMCAP
> > > env variable to point to the termcap file.
> >
> > It never occurred to me that /etc/termcap might actually live elsewhere.
> > That's almost certainly the problem. Would there be any drawback to
> > simply moving the file back to /etc ?
> >
> 
> On your system? None at all. I'd copy it, though. In the base system it is
> where it is so new entries get reflected right after install world w/o
> needing to run mergemaster.

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.

> Warner
> Thanks to everybody,
> > bob prohaska
-- 
Rod Grimes                                                 rgrimes at freebsd.org


More information about the freebsd-arm mailing list