?
Solved

I am unable to run vi in Single User mode

Posted on 2006-10-24
9
Medium Priority
?
393 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 

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
 
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 400 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 1600 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

A new era in Cloud training has arrived.

A day that will go down in Cloud history.. But are you ready for it? Will you accept this Cloud challenge?

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Over the last ten+ years I have seen Linux configuration tools come and go. In the early days there was the tried-and-true, all-powerful linuxconf that many thought would remain the one and only Linux configuration tool until the end of times. Well,…
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.
Suggested Courses
Course of the Month11 days, 16 hours left to enroll

752 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