vi almost unusable in recovery console

Smoot Carl-Mitchell smoot at tic.com
Wed Jul 30 23:29:20 UTC 2008


On Wed, 2008-07-30 at 18:40 -0400, Brian McKee wrote:
> Hi All
> 
> I'm trying to edit an fstab with vi using the ubuntu alternate cd's
> 'recover a broken system' option.
> I'm using the alternate cd because this system has a mix of regular
> and LVM partitions, and IIRC the live cd doesn't grok that.
> 
> The problem is the console it drops you into has a term type of
> 'bterm' or similar, which vi guesses is ansi - with very mixed
> results.   The screen doesn't refresh properly etc etc. So, two
> questions:
> 
> 1 - is there any way to get a better terminal?  or a different TERM I
> can tell vi it is for better results?
> 
> 2 - what the heck package would I report a bug against?  or am I
> wishing for the impossible?

Try this:

export TERM=linux

That is the terminal type of the virtual consoles.  If that does not
work then use 'ex' or 'ed'.  'ed' is a primitive line editor which I use
as a fallback when I cannot get a fullscreen editor to work.  'ex' is
vi's line mode with similar commands as 'ed'. The manual page for 'ed'
has a reasonable overview of the command syntax.
-- 
Smoot Carl-Mitchell
System/Network Architect
smoot at tic.com
+1 480 922 7313
cell: +1 602 421 9005




More information about the ubuntu-users mailing list