1833913 Members
2953 Online
110063 Solutions
New Discussion

init s versus init S

 
SOLVED
Go to solution
j773303
Super Advisor

init s versus init S

As title, what's the different on both?
Thanks.
Hero
6 REPLIES 6
Scott Van Kalken
Esteemed Contributor

Re: init s versus init S

S|s Use for system administration (also known as "single-
user state"). When booting into run level S at powerup,
the only access to the the system is through a shell
spawned at the system console as the root user. The
only processes running on the system will be kernel
daemons started directly by the HP-UX kernel, daemon
processes started from entries of type sysinit in
/etc/inittab, the shell on the system console, and any
processes started by the system administrator.
Administration operations that require the system to be
in a quiescent state (such as the fsck(1M) operation to
repair a file system) should be run in this state.
Transitioning into run level S from a higher run level
does not terminate other system activity and does not
result in a "single-user state"; this operation should
not be done.


This is from the init man page.
j773303
Super Advisor

Re: init s versus init S

In run level S(uppercase S) the capabilities of the system console are switched to the terminal where you are logged in, thus making
it the virtual system console.

I don't understand what the above meaning. What's the meaning of virtual system console?
Hero
Patrick Wallek
Honored Contributor

Re: init s versus init S

What it means is that if you do an 'init S', thus going down to single-user mode, AND IF you were logged into a serially connected terminal (or maybe modem) that the terminal you are logged into would BECOME the console.

I do not know, though I doubt, that this applies to a telnet session. Networking gets stopped between runlevels 2 and 1, I think, so your telnet would be disconnected.

BASICALLY, in this world of few hardwired terminals and many network connections, the two are the same.
Rajeev  Shukla
Honored Contributor
Solution

Re: init s versus init S

THis basically means that the terminal from where you issue this command init S becomes your console. And its only for serial devices not for telnet sessions. So if you issue the init S after doing telnet to the system the console doesn't swicth to that device but when you are on a serial (dumb terminal) link, when you are in single user this terminal is your console.

Cheers
Rajeev
Bill Hassell
Honored Contributor

Re: init s versus init S

VERY IMPORTANT: init s or init S will only adjust the init program's view of things. That is, init does not own all processes in HP-UX so using init S/s to enter single user mode (despite the init man page) will not be successful. init will not un-mount filesystems or terminate daemons, etc. Essentially, init S/s will look at the processes that it owns and if they are not listed in /etc/inittab when changing to S/s state, then those proceses are terminated. All other processes continue running.


Bill Hassell, sysadmin
Daryl Much
Frequent Advisor

Re: init s versus init S

Bill response is the crux of the biscuit. Init s|S is usually worthless in my experience. If you really want to be single user, reboot to IPL then enter hpux -is.