/rescue/vi doesn't work without /usr (no terminal db)

2005-08-25 Thread N.J. Thomas
I just booted into single user on a 5.4-p6 system. I needed to edit
something on the root fs, but /rescue/vi wouldn't work, it complained
about not finding the terminal database.

I saw some mention in the archives from June about fixing this, though I
don't think anything has been comitted yet.

In the meantime, how can I run /rescue/vi without /usr?

thanks,
Thomas

-- 
N.J. Thomas
[EMAIL PROTECTED]
Etiamsi occiderit me, in ipso sperabo
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: /rescue/vi doesn't work without /usr (no terminal db)

2005-08-25 Thread Giorgos Keramidas
On 2005-08-25 10:04, N.J. Thomas [EMAIL PROTECTED] wrote:
 I just booted into single user on a 5.4-p6 system. I needed to edit
 something on the root fs, but /rescue/vi wouldn't work, it complained
 about not finding the terminal database.

 I saw some mention in the archives from June about fixing this, though I
 don't think anything has been comitted yet.

 In the meantime, how can I run /rescue/vi without /usr?

I don't think you can.  It only needs a read-only /usr though, so if
/usr is a local filesystem you can probably get away with:

# mount -o ro /usr

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: /rescue/vi doesn't work without /usr (no terminal db)

2005-08-25 Thread N.J. Thomas
* Giorgos Keramidas [EMAIL PROTECTED] [2005-08-25 17:10:37 +0300]:
 On 2005-08-25 10:04, N.J. Thomas [EMAIL PROTECTED] wrote:
  In the meantime, how can I run /rescue/vi without /usr?
 
 I don't think you can.  It only needs a read-only /usr though, so if
 /usr is a local filesystem you can probably get away with:
 
   # mount -o ro /usr

Yeah, I was actually thinking of the (rare) case when /usr was not
accessible. This time it was, so I got away with it.

But I did find this in rescue(8) however:

BUGS

Most of the rescue tools work even in a fairly crippled system.
The most egregious exception is the rescue version of vi(1),
which currently requires that /usr be mounted so that it can
access the termcap(5) files. Hopefully, a failsafe termcap(3)
entry will eventually be added into the ncurses(3) library, so
that /rescue/vi can be used even in a system where /usr cannot
immediately be mounted.  In the meantime, the rescue version of
the ed(1) editor can be used from /rescue/ed if you need to edit
files, but cannot mount /usr.

I don't know how old this note is, but I hope the failsafe termcap will
be added soon.

Thomas

-- 
N.J. Thomas
[EMAIL PROTECTED]
Etiamsi occiderit me, in ipso sperabo
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: /rescue/vi doesn't work without /usr (no terminal db)

2005-08-25 Thread Alex Zbyslaw

N.J. Thomas wrote:


   BUGS

   Most of the rescue tools work even in a fairly crippled system.
   The most egregious exception is the rescue version of vi(1),
   which currently requires that /usr be mounted so that it can
   access the termcap(5) files. Hopefully, a failsafe termcap(3)
   entry will eventually be added into the ncurses(3) library, so
   that /rescue/vi can be used even in a system where /usr cannot
   immediately be mounted.  In the meantime, the rescue version of
   the ed(1) editor can be used from /rescue/ed if you need to edit
   files, but cannot mount /usr.

I don't know how old this note is, but I hope the failsafe termcap will
be added soon.

Thomas

 

Will ex not work?  Since it's just vi without graphics it shouldn't need 
a termcap (which doesn't mean it won't want one of course).  What was 
$TERM set to?


Having said that, I can still remember a time when any sysadmin worth 
tuppence would know how to use ed because that was all that worked on a 
teletype :-)


--Alex

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: /rescue/vi doesn't work without /usr (no terminal db)

2005-08-25 Thread N.J. Thomas
* Alex Zbyslaw [EMAIL PROTECTED] [2005-08-25 19:22:48 +0100]:
BUGS
 
Most of the rescue tools work even in a fairly crippled system.
The most egregious exception is the rescue version of vi(1),
which currently requires that /usr be mounted so that it can
access the termcap(5) files.

 Will ex not work?  Since it's just vi without graphics it shouldn't need 
 a termcap (which doesn't mean it won't want one of course).  What was 
 $TERM set to?

/rescue/ex did not work, it gave the same error that /rescue/vi did,
namely that the termcap/terinfo database was not found.

$TERM was set to cons25

 Having said that, I can still remember a time when any sysadmin worth
 tuppence would know how to use ed because that was all that worked on
 a teletype :-)

Yes, /rescue/ed did work, and of course I am glad that something was
working, but ed is infinitely more tedious to work with than vi.

But when things have gone so wrong that you actually have to use the
tools in /rescue, you are generally not in the mood to deal with
something as archaic as ed. =-)

Thomas

-- 
N.J. Thomas
[EMAIL PROTECTED]
Etiamsi occiderit me, in ipso sperabo
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: /rescue/vi doesn't work without /usr (no terminal db)

2005-08-25 Thread Lars Kristiansen



--On Thursday, August 25, 2005 02:45:35 PM -0400 N.J. Thomas 
[EMAIL PROTECTED] wrote:



But when things have gone so wrong that you actually have to use the
tools in /rescue, you are generally not in the mood to deal with
something as archaic as ed. =-)


To keep a copy of the e3 binary somewhere convinient may be helpful.
It kind of simulates vi behaviour if started as e3vi.

/usr/ports/editors/e3
A full featured text editor written in assembler

--
Lars



Thomas





___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]