Subject: Re: Single user mode: ed(1) or bust
To: None <netbsd-users@netbsd.org>
From: Joerg Niendorf <joerg.bsd@internode.net.au>
List: netbsd-users
Date: 05/05/2007 13:10:07
Hi Eric,

I found myself in a similar situation the other day and now always
create a file "/root/.termcap" which contains an entry for vt100.
(Check out "/usr/share/misc/termcap".)

In single user mode, you can then issue:

TERM=vt100
TERMPATH=/root/.termcap
export TERM TERMPATH
mount /

and then use /rescue/vi:

/rescue/vi the_file_you_want_to_edit


You will still get an error message if /var is not mounted, because
"/var/tmp/vi.recover" is not accessible. But that shouldn't worry
you in this particular situation. Just hit Enter to ignore it.

There might be better ways, but this is what I do.

Cheers,
Joerg