Operating System - HP-UX
1834020 Members
2799 Online
110063 Solutions
New Discussion

Re: editing files in single user mode

 
SOLVED
Go to solution
Andrew Cunningham
Frequent Advisor

editing files in single user mode

In order to solve my boot problems , I have had to boot into single user mode. When in single user mode, the /bin directory is not available, only /sbin - which means vi is not available.
I assume I may need to mount /bin.
This is an "oldie but a goodie" I'm sure, but the knowledge base does not seem to have an answer

B2600/UX10.2
4 REPLIES 4
James R. Ferguson
Acclaimed Contributor

Re: editing files in single user mode

Hi Andrew:

'/bin' is a transition link to /usr/bin so that doesn't get you where you need to go.

Manually mount /usr and then you will have 'vi'.

...JRF...
A. Clay Stephenson
Acclaimed Contributor

Re: editing files in single user mode

Hi Andrew,

You also typically have to mount /tmp or /var
(to get /var/tmp) so that vi can write temporary files.
If it ain't broke, I can fix that.
Patrick Wallek
Honored Contributor
Solution

Re: editing files in single user mode

What I usually do if I need to work while in single-user mode is:

vgchange -a y /dev/vg00 ---- to make sure vg00 is active

mount -a ----- Will mount all vg00 filesystems and no others since no other VGs are active.

Then you've got vi and whatever else you need to try to fix your boot problems.
Andrew Cunningham
Frequent Advisor

Re: editing files in single user mode

Thanks guys, I will try that tomorrow when my collegue in the remote office (where this troublesome machine is located) gets in.