What is the diffe b/w init s and init S


 
Thread Tools Search this Thread
Operating Systems Solaris What is the diffe b/w init s and init S
# 1  
Old 10-22-2010
What is the diffe b/w init s and init S

i did my research in finding the answer but couldn't find right one. Please give your inputs.
# 2  
Old 10-22-2010
google finds this for me:
Sun init States
# 3  
Old 10-22-2010
It looks like both means same getting into Single user mode. Then why did Sun has 2 diff run-levels for same purpose.
# 4  
Old 10-22-2010
1 and s is the same... S is something other... read the link to the end.
# 5  
Old 10-22-2010
Quote:
Originally Posted by DukeNuke2
1 and s is the same... S is something other...
Actually, "s" and "S" are the same, 1 is something slightly different.
# 6  
Old 10-22-2010
init S:

will take you in the system maintenance mode, where you can use fsck on mounted file systems or to repair file systems...


init s

will take you in the single user mode, where you can unmount your whole file system and mount it on /a or /mnt and can make changes to filesystems...you can also use fsck here.

In short,
if you just need to do file system check, you can use "init S". and if you want to modify files, blocks, cylinders, you can use "init s"

Correct me if I am not....
# 7  
Old 10-22-2010
Quote:
Originally Posted by snchaudhari2
init S:

will take you in the system maintenance mode, where you can use fsck on mounted file systems or to repair file systems...
use fsck on mounted filesystems ???, I hope not unless you remount them in read/only mode.
Quote:
init s

will take you in the single user mode, where you can unmount your whole file system and mount it on /a or /mnt and can make changes to filesystems...you can also use fsck here.
You are partially describing here the failsafe boot mode, not a run level.
Quote:
In short,
if you just need to do file system check, you can use "init S". and if you want to modify files, blocks, cylinders, you can use "init s"
Hmm, how do you modify blocks and cylinders in a file system context ?
Quote:
Correct me if I am not....
I'm afraid you are confusing the failsafe boot mode, the administrative run level and the single user mode. Switching from multi-user to the "s" and "S" states is exactly the same operation* and put the OS in single user mode while "init 1" put the it in system administrator mode. Booting to failsafe mode cannot be achieved with the init command alone.

* this can be confirmed by looking at init source code: http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/cmd/init/init.c#lvlname_to_state
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Red Hat

init-script failing because of /etc/rc.d/init.d/functions

I encountered a problem on one of our database servers. OS: CentOS 5.5 final Kernel: 2.6.18-238.5.1.el5.028stab085.2 (OpenVZ kernel) We wrote some DB-Start/Stop-scripts ("/db2/admin/scripts_dba/start_services.ksh" and ".../stop_services.ksh") to start the database instances. (Database... (1 Reply)
Discussion started by: bakunin
1 Replies

2. UNIX for Advanced & Expert Users

Problem on init 0, execution is the same with init 6

Hi, I am experiencing a weird thing on my SUNFIRE machine with Solaris 9 OS. When I do init 0 to shutdown the machine to go to ok prompt, what it did was shutdown and reboot like an init 6 command do. I did check the corresponding rc scripts that were involved with init 0 and compared with rc... (2 Replies)
Discussion started by: Yenthanh
2 Replies

3. Solaris

/etc/rc2.d vs /etc/init.d

Hi, Can somebody please tell me the difference between the files in /etc/rc2.d and those in /etc/init.d? I am asking because on one system, I got a sysedge file S99.sysedge under /etc/rc2.d and it has a soft link to the /etc/init.d/sysedge. It would be my understanding that the one under... (6 Replies)
Discussion started by: Pouchie1
6 Replies

4. Red Hat

Difference between 'init s' and 'init 1'

What is the difference between 'init s' and 'init 1'. I know that both will work to change the current run level to single user mode. Is there any difference in those two commands? (5 Replies)
Discussion started by: praveen_b744
5 Replies

5. Linux

How to I change init levels after typing init 1

Dear all, I typed in init 1 on my redhat box as root and according to wikipedia (http://en.wikipedia.org/wiki/Runlevel): 1 Single-User Mode Does not configure network interfaces, start daemons, or allow non-root logins So now I can't connect back to it. How do I change the init back to 3?... (8 Replies)
Discussion started by: z1dane
8 Replies

6. UNIX for Dummies Questions & Answers

About init

I know if a parent process exits before its child, the last one becomes orphan for a while and then is added to the children of Init process. I'd like to know deeper 1 how the orphan becomes init process, 2 how init knows that from a some point on it has another child. Thank you in advance. (2 Replies)
Discussion started by: Puntino
2 Replies

7. Solaris

different between /sbin/init and /usr/sbin/init

root@test09 # ls -al /sbin/init -r-xr-xr-x 1 root sys 550000 Jun 29 2002 /sbin/init root@test09 # ls -al /usr/sbin/init -r-xr-xr-x 1 root sys 37100 Jun 29 2002 /usr/sbin/init (2 Replies)
Discussion started by: userking
2 Replies

8. UNIX for Advanced & Expert Users

Init 6 & Init 0 problem

Hi Expert, I have encountered some problem with my SUN system. Everytime when i issue command #init 6 OR #init 0 it just logout and prompt for login again instead of rebooting the server when run init 6 and system shutdown when run init 0.. I can only reboot the system using reboot ... Was... (6 Replies)
Discussion started by: sc2005
6 Replies

9. UNIX for Dummies Questions & Answers

init.d

I have written a daemon and want to make sure that it starts up again after the machine is re-started so I can quit manually doing it. Problem is I'm having difficulty understanding what to do with the init.d Any help would be appreciated! (1 Reply)
Discussion started by: BC_Kevin
1 Replies
Login or Register to Ask a Question