Editing on the serial console

Ian Lepore ian at freebsd.org
Thu Mar 7 14:47:07 UTC 2019


On Wed, 2019-03-06 at 19:54 -0800, bob prohaska 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?
> 
> I'm dealing with Raspberry Pi, but am not sure if that's
> the source of the difficulty.
> 
> Thanks for reading,
> 
> bob prohaska
> 
> 

A lot of things work together (or fail to) to cause trouble for apps
that do full-screen terminal stuff.  A big part of it is what you're
using as a terminal program.  Using cu(1) from an xterm window works
well if you set TERM=xterm in the env (of course you need a termcap
file as you noted).

Another thing that causes problems is when your terminal window size
isn't known to vi or whatever app is running.  You can fix that by
manually doing 'stty rows NN cols NN' to set the right values.

-- Ian



More information about the freebsd-arm mailing list