1847032 Members
5664 Online
110261 Solutions
New Discussion

Runlevels

 
SOLVED
Go to solution
AL_3001
Regular Advisor

Runlevels

Hi Friends,
What is the difference between
init s and init S? I have read the other the threads explaining the difference but i'm confused.Kindly explain the difference in simple terms.

Thanks.
11 REPLIES 11
Patrick Wallek
Honored Contributor

Re: Runlevels

>>What is the difference between
>>init s and init S?

Not much. They both take the system down to single-user mode.

If you were to do 'init S' (upper case S), then the serial terminal that initiates the command becomes the "console".

Have a read of the man page for init.

# man init


A. Clay Stephenson
Acclaimed Contributor

Re: Runlevels

For the most part (and on many flavors of UNIX) the behavior is identical. The system is in single-user mode with critical file systems mounted. The difference is (on those flavors that distinguish between them) that with 's', you have only system console access. With 'S' the logical system console becomes the terminal device on which this init command was issued. Under HP-UX, going to single-user mode via init s,S, or 1 rarely accomplishes what is desired as many file systems are still busy so almost always the system is shutdown and rebooted and brought into single-user mode for maintenance via "hpux -is" at the ISL/IPL prompt.
If it ain't broke, I can fix that.
whiteknight
Honored Contributor

Re: Runlevels

if man init

S or s Use for system administration (also known as "single-
user state"). When booting into run level S at powerup,
the only access to 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.

WK
Problem never ends, you must know how to fix it
AwadheshPandey
Honored Contributor

Re: Runlevels

see here for more clear picture http://en.wikipedia.org/wiki/Runlevel#HP-UX
It's kind of fun to do the impossible
vinu_2
Advisor

Re: Runlevels

hi ashish,

init S - single-user, booted to system console only. In this case only root file system only will get mounted.

init s - This is also single user mode and almost similiar to init S, the only difference is that the current terminal acts as the system console .

Thanks ,

VInu
Think before whatever you are doing
AL_3001
Regular Advisor

Re: Runlevels

Hi Vinu,
Are you sure that in case of init s, the curret terminal acts as a system console? As far as i have understood:
init S-> The terminal acts as a console
init s-> Only one physical console.

Can you confirm the same and if i am wrong please correct me. Waiting for you reply.

Thanks.
AL_3001
Regular Advisor

Re: Runlevels

Hi Patrick, A. Clay Stephenson, Whiteknight, Awadesh & Vinu,
Quite a long list :-) just kidding. I visited the below link posted by Awadesh :

http://en.wikipedia.org/wiki/Runlevel#HP-UX

As per the infromation mentioned there, Vinu seems to be correct. According to Vinu:

S - single-user, booted to system console only, with only root filesystem mounted (as read-only)
s - single user, identical to S except the current terminal acts as the system console

Is the infromation about init s and init S mentioned fine?

Thanks. Awaiting reply from all of you and please keep the reply simple as i am new to this. Thanks.
Patrick Wallek
Honored Contributor
Solution

Re: Runlevels

For HP systems, you are better off checking the init man page.

With HP-UX, it is just the opposite:

init s - the terminal attached to the console port is the console.

init S (upper case s) - the terminal that issued the command is the console. However, you should be aware that this will probably only work if the terminal is a SERIAL attached terminal. If you are connected via a network connection (ssh, telnet, etc.) then you will lose your connection since networking is stopped on the way down to single-user mode.
Dennis Handly
Acclaimed Contributor

Re: Runlevels

>Patrick: For HP systems, you are better off checking the init man page.

Here is a link: (11.31)
http://docs.hp.com/en/B2355-60130/init.1M.html

(Unfortunately you'll have to look real close to find the differences.)
AL_3001
Regular Advisor

Re: Runlevels

Hi Patrick and Dennis,
Thanks for your replies. I have understood the following:

init s-> The terminal which is actually connected to the console port is the console.

Incase of init S:

init S-> The terminal from where the command is issued will act as a console.

I want to know the basic difference and i think this is is fine.

Thanks a lot everybody.... I will clode the thread in a few days...if you have any information do post it...

Thanks once again :-)

-Ashish
AL_3001
Regular Advisor

Re: Runlevels

Thanks everybody for your inputs.