Solved

I am unable to run vi in Single User mode

Posted on 2006-10-24
9
386 Views
Last Modified: 2013-12-13
Hello,

    Can some please help me with this i am unable to run VI in the Single user mode ...I exported the term and it  still did not work ..

set TERM=vt100
export TERM

set vi -o

I am unable to edit the file ...

Thanks all for your help in advance .
0
Comment
Question by:kaka123
  • 4
  • 3
  • 2
9 Comments
 
LVL 43

Expert Comment

by:ravenpl
ID: 17796154
> set vi -o
what's that?

try: /bin/vi filename # OR: /usr/bin/vi filename
0
 
LVL 34

Expert Comment

by:PsiCop
ID: 17797415
The "set vi -o" is a bash shell command that tells it to use vi-style command-line editing. Yuck.

Personally, I prefer Emacs style.

vi is dependent on libraries in /usr/lib. If you've booted into single-user mode and not all filesystems have been mounted, vi may not be able to run. Assuming you have used multiple disk slices for your filesystems, try "mountall" and then re-try vi.

Alternatively, ex was written to be self-sufficient and able to run in single-user mode.
0
 
LVL 43

Expert Comment

by:ravenpl
ID: 17797514
Strange - but my /bin/vi does not depend on /usr/lib
In fact none from /sbin /bin should depend on anything from /usr ...

> The "set vi -o" is a bash shell command that tells it to use vi-style command-line editing.
Thanx - always learning ;)
0
 

Author Comment

by:kaka123
ID: 17798266
As i mention in the question above that i am in S mode and i have try this

set TERM=vt100
export TERM

set vi -o
   
 what am i doing wrong this a sles 9 machin ...HELP ....
0
Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

 
LVL 43

Expert Comment

by:ravenpl
ID: 17798410
And then You are running
vi /etc/fstab # for example? What's the error message?
0
 
LVL 34

Expert Comment

by:PsiCop
ID: 17799035
I'll qualify my comment about vi needing libraries as being true in SunOS and Solaris. Altho with all the changes in Solaris 9 and Solaris 10, it might have changed.

"vi" in Linux is sometimes "vim" and so my comment would not apply (just like "mail" in SLES is actually "nail").

Back to the Question...I agree, we need the EXACT error message. What is displayed when you try to run vi?
0
 

Author Comment

by:kaka123
ID: 17799446
nothing i just can't edit the file when i type the above command let's say set vi -o it will go back to the command prompt with no errors but when i try to do vi it will not work strange .........HELP THE BOX IS STILL IN S MODE ...
0
 
LVL 43

Assisted Solution

by:ravenpl
ravenpl earned 100 total points
ID: 17801232
So You are saying that You typing
vi /etc/fstab
and it does nothing, just returnig to the shell prompt?
If so, then honestly I don't know what happens.
But, have You tried /bin/vi /usr/bin/vi
Maybe another editor like: nano OR joe OR pico OR jed

OT: if the OS in S mode, You may need to remount the rootfs in RW mode: mount -o rw,remount /
but even that vi should still run(inRO mode)
0
 
LVL 34

Accepted Solution

by:
PsiCop earned 400 total points
ID: 17804722
"set vi -o" is a SHELL CONFIGURATION command. It is applicable only to bash, as I recall. ksh or zsh might also support it, I dunno. Point is that it has NOTHING to do with *running* vi. All it does is tell the shell what command-line editing scheme you want to use. And it doesn't have any effect in sh, as I recall. You could very well be in an sh shell in single-user mode.

Bottom line: "set vi -o" is not relevant to your issue of not being able to run vi.
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now