Operating System - HP-UX
1849125 Members
2950 Online
104041 Solutions
New Discussion

question about single-user mode

 
SOLVED
Go to solution
JLee_1
Advisor

question about single-user mode

Good morning, all -- Just a quick question about working in single user mode.

Over the weekend I made my first attempt at booting a system into single user mode, but once there I was unable to execute any commands. It was as if I didn't have a working shell to execute commands with from the command line. I ended up bumping up to init 2 (which did work), and just doing the work I needed to do from there. So I'm wondering -- is there an initial step that I'm missing to be able to work in single user mode?

Thanks in advance for helping out a newbie...
10 REPLIES 10
Peter Godron
Honored Contributor
Solution

Re: question about single-user mode

Hi,
did you mount all your required disks /usr /var /opt /etc
Without those no commands would be found.
Calandrello
Trusted Contributor

Re: question about single-user mode

Friend procedure certain e the following one: it interrupts boot hpux initiates the S.O with flag - lm Apos the S.O to initiate executes the command vgchange -a y the y /dev/vg00 mount -a
Bill Hassell
Honored Contributor

Re: question about single-user mode

Single user mode has only two filesystems mounted: / and /stand. Therefore, only the commands in /sbin are available. However, one of the commands in /sbin is mount so you can mount the 3 most important filesystems:

mount /usr
mount /tmp
mount /var

Now you can use bdf and vi and all the more familiar commands. You can also use mount -a to mount everything but you'll get errors with NFS filesystems (NFS doesn't exist because networking doesn't exist in single user mode), so use mount -al


Bill Hassell, sysadmin
Patrick Wallek
Honored Contributor

Re: question about single-user mode

In single user mode you do not have any fileysstems mounted other than / and /stand. There are some commands available in /sbin.

Depending on what you what to do you will probably want to mount at least /usr and /var. /usr contains all of your commands and libraries. /var provides /var/tmp for temporary files.

You generally won't need /opt or /tmp in single-user mode but you can mount them as long as the work you are doing does not effect those LVs.
JLee_1
Advisor

Re: question about single-user mode

Ahhh... so your very first step would be to mount the file systems you need? Is 'mount' an intrinsic command?
Patrick Wallek
Honored Contributor

Re: question about single-user mode

Calandrello -- the '-lm' flag DOES NOT get you to single-user mode. '-lm' gets you to LVM Maintenance Mode. That is different than single-user mode.

Using the '-is' (hpux -is) initiates single-user mode.
Steven E. Protter
Exalted Contributor

Re: question about single-user mode

Shalom,

lvm maintenance mode and single user mode are similar but different tools for different jobs.

The primary purpose of lvm maintenance mode is inherent in its name. The quorum requirement that volume groups have more than 50% of members present is not in place permitting you to work with the system.

Single user mode itself is very much like normal mode without networking when you run Bill's three mount commands.

Its a great way to work without having users around.
SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Patrick Wallek
Honored Contributor

Re: question about single-user mode

Yes, it is. Once in single-user mode you can do:

# mount /var
# mount /usr

And whatever else you need. If needed, you can specify '/sbin/mount' on the command line.
JLee_1
Advisor

Re: question about single-user mode

That makes sense. Thank you all for the quick responses...and for bearing with me!

(Thanks for that clarification as well, Patrick)
JLee_1
Advisor

Re: question about single-user mode

Thanks again, all --