Solved

I am unable to run vi in Single User mode

Posted on 2006-10-24
9
391 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
Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

 

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
parallel rsync issues with Ubuntu 1 50
Can't "Unset" Proxy in Apache headers for PCI compliance... 4 92
Enable SPF on IMSVA 6 66
PartedMagic Secure Erase 14 20
Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
Jaspersoft Studio is a plugin for Eclipse that lets you create reports from a datasource.  In this article, we'll go over creating a report from a default template and setting up a datasource that connects to your database.
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.

734 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