Solaris inittab

The /etc/inittab file plays a crucial role in the Solaris boot sequence.

For versions prior to Solaris 10, the /etc/inittab was edited manually. Solaris 10 now manages the /etc/inittab through SMF. The Solaris 10 inittab should not be edited directly.

Solaris 8 and 9

The line entries in the inittab file have the following format:



id A two-character unique identifier. Entries will contain one of the following keywords:
fs sysinit (usually /etc/rcS)
is default init level (usually 3, sometimes 2)
s# script associated with a run level (usually /sbin/rc#)
runlevel Indicates the run level involved
action Indicates how the process is to be run. The action field of each entry will contain one of the following keywords:
powerfail The system has received a "powerfail" signal.
wait Wait for the command to be completed before proceeding.
respawn Restart the command.
process The command to be executed

At boot time, all entries with runlevel "sysinit" are run. Once these processes are run, the system moves towards the init level indicated by the "initdefault" line. For a default inittab, the line is:


(This indicates a default runlevel of 3.)

By default, the first script run from the inittab file is /etc/bcheckrc, which checks the state of the root and /usr filesystems. The line controlling this script has the following form:

fs::sysinit:/sbin/bcheckrc >/dev/console 2>&1 </dev/console

The inittab also controls what happens at each runlevel. For example, the default entry for runlevel 2 is:

s2:23:wait:/sbin/rc2 >/dev/console 2>&1 </dev/console

Solaris 10

The default Solaris 10 inittab contains the following:

ap::sysinit:/sbin/autopush -f /etc/iu.ap
sp::sysinit:/sbin/soconfig -f /etc/sock2path
smf::sysinit:/lib/svc/bin/svc.startd >/dev/msglog 2<>/dev/msglog
p3:s1234:powerfail:/usr/sbin/shutdown -y -i5 -g0 >/dev/msglog 2<>/dev/...

The lines accomplish the following:

  • Initializes Streams
  • Configures socket transport providers
  • Initializes SMF master restarter
  • Describes a power fail shutdown

In particular, the default keyword is not used any more in Solaris 10. Instead, the default run level is determined within the SMF profile.

When the init process is started, it first sets environment variables set in the /etc/default/init file; by default, only TIMEZONE is set. Then init executes process entries from the inittab that have sysinit set, and transfers control of the startup process to svc.startd.