Showing posts with label inittab. Show all posts
Showing posts with label inittab. Show all posts

31 July 2010

Run level - Solaris

The first thing I noticed was /etc/inittab file is different from the Linux version. However, runlevel are quite identical

Default Solaris Run Level

• S : Single user state (useful for recovery)
• 0 : Access Sun Firmware ( ok> prompt)
• 1 : System administrator mode
• 2 : Multi-user w/o NFS
• 3 : Multi-user with NFS
• 4 : Unused
• 5 : Completely shutdown the host (like performing a power-off @ OBP) 
• 6 : Reboot but depend upon initdefault entry in /etc/inittab

Solaris 8/9 Find out runlevel

To find out current runlevel use who command:

$ who -r

Output:

. run-level 3 Mar 3 14:04 3 0 S

Solaris changing runlevels after bootup

You need to use init command, for example change runlevel to 2.

# /sbin/init 2

Solaris changing the default runlevel

An entry with initdefault (in /etc/inittab file) is scanned only when init is initially invoked. init uses this entry to determine which run level to enter initially.

Open /etc/inittab file:

# vi /etc/inittab
Find out this entry:
is:3:initdefault:

Change is:3 to number you want, don't use S, 0, 6 ;). Save file.



* Only init states 0, 1, 5, 6, and S can be reached using shutdown.

18 December 2007

"init: Id "x" respawning too fast: disabled for 5 minutes."

In most distributions this means that the system is booting by default into runlevel 5, which is supposed to respawn (re-start again after it's been exited) a graphical login via xdm, kdm, gdm, or whatever,and the system can't locate the program.

However, "Id" can also indicate the absence or misconfiguration of another program, like mingetty, if init tries to respawn itself more than 10 times in 2 minutes.

Id "x" is the number in the leftmost column of the /etc/inittab file:

# Run gettys in standard runlevels

1:2345:respawn:/sbin/mingetty tty1
2:2345:respawn:/sbin/mingetty tty2
3:2345:respawn:/sbin/mingetty tty3
4:2345:respawn:/sbin/mingetty tty4
5:2345:respawn:/sbin/mingetty tty5
6:2345:respawn:/sbin/mingetty tty6

Commenting the offending line out and then fixing the errant program and testing on the command line will allow you to see any error messages that go to standard error output (console) if the errors are not going to the system log file. Uncomment the line and restart init with "kill -SIGHUP 1" or "telinit q" to cause init to reinitialize and reread the /etc/inittab file.