Solaris Boot Process
Solaris Boot Process
Each SPARC based system has a PROM (programmable read-only memory) chip with a program
called the monitor. The monitor controls the operation of the system before the Solaris kernel is
available. When a system is turned on, the monitor runs a quick self-test procedure to checks the
hardware and memory on the system. If no errors are found, the system begins the automatic
boot process.
The following table describes the boot process on SPARC based systems.
Boot PROM 1. The PROM displays system identification information and then runs self-
test diagnostics to verify the system's hardware and memory.
2. Then, the PROM loads the primary boot program, bootblk, whose purpose
is to load the secondary boot program (that is located in the ufs file system)
from the default boot device.
Boot Programs 3. The bootblk program finds and executes the secondary boot program,
ufsboot, and loads it into memory.
4. After the ufsboot program is loaded, the ufsboot program loads the
kernel.
Kernel 5. The kernel initializes itself and begins loading modules by using ufsboot to
Initialization read the files. When the kernel has loaded enough modules to mount the root
(/) file system, the kernel unmaps the ufsboot program and continues, using
its own resources.
6. The kernel creates a user process and starts the /sbin/init process, which
starts other processes by reading the /etc/inittab file.
init 7. The /sbin/init process starts the run control (rc) scripts, which execute a
series of other scripts. These scripts (/sbin/rc*) check and mount file
systems, start various processes, and perform system maintenance tasks.
The "/etc/inittab" file tells init which runlevel to start the system at and describes the processes to be run at each runlevel.
2. For a multiuser server shutdown, find out if any users are logged in to the system.
#who
Note - This step is conditional and only required if the system is a multiuser timesharing
system and not typically used when shutting down newer Oracle Solaris servers and
processors.
#shutdowniinitstateggraceperiody
iinitstate
Brings the system to an init state that is different from the default of S. The choices are
0, 1, 2, 5, and 6.
Run levels 0 and 5 are states reserved for shutting the system down. Run level 6 reboots
the system. Run level 2 is available as a multiuser operating state.
ggraceperiod
Indicates a time (in seconds) before the system is shut down. The default is 60 seconds.
y
Continues to shut down the system without intervention. Otherwise, you are prompted to
continue the shutdown process after 60 seconds.
Doyouwanttocontinue?(yorn):y
If you used the shutdowny command, you will not be prompted to continue.
3. TypeCtrldtoproceedwithnormalstartup,
(orgiverootpasswordforsystemmaintenance):xxxxxx
4. After you have finished performing any system administration tasks, press
Control-D to return to the default system run level.
5. Use the following table to verify that the system is at the run level that you specified
in the shutdown command.
In the following example, the shutdown command is used to bring a SPARC based system to run
level S (the single-user state) in three minutes.
#who
rootconsoleJun1415:49(:0)
#shutdowng180y
Shutdownstarted.MonJun1415:46:16...
BroadcastMessagefromroot(pts/4)onvenusMonJun1415:46:16...
Thesystemvenuswillbeshutdownin3minutes.
.
.
BroadcastMessagefromroot(pts/4)onvenusMonJun1415:46:16...
Thesystemvenuswillbeshutdownin30seconds.
.
.
INIT:Newrunlevel:S
Thesystemiscomingdownforadministration.Pleasewait.
Unmountingremotefilesystems:/volnfsdone.
.
.
.
Jun1415:49:00venussyslogd:goingdownonsignal15
Killinguserprocesses:done.
RequestingSystemMaintenanceMode
SINGLEUSERMODE
Rootpasswordforsystemmaintenance(controldtobypass):xxxxxx
singleuserprivilegeassignedto/dev/console.
EnteringSystemMaintenanceMode
.
.
.
Example 3-2 Bringing a System to a Shutdown State (Run Level 0) by Using the shutdown
Command
In the following example, the shutdown command is used to bring a SPARC based system to run
level 0 in five minutes without requiring additional confirmation.
#shutdown
Shutdownstarted.ThuJun1712:40:25...
BroadcastMessagefromroot(console)onpretendThuJun1712:40:25...
Thesystempretendwillbeshutdownin5minutes
.
.
.
Changingtoinitstate0pleasewait
#
INIT:Newrunlevel:0
Thesystemiscomingdown.Pleasewait.
Systemservicesarenowbeingstopped.
.
.
.
Thesystemisdown.
syncingfilesystems...done
Programterminated
Typehelpformoreinformation
ok
See Also
Regardless of why you shut down a system, you will probably want to return to run level 3,
where all file resources are available, and users can log in. For instructions on bringing a system
back to a multiuser state, see Booting a SPARC Based System to a Multiuser State (Run Level
3).
#init5
Example 3-3 Bringing a System to a Shutdown State (Run Level 0) by Using the init
Command
In this example, the init command is used to bring a system to the run level where it is safe to
turn off power.
#init0
#
INIT:Newrunlevel:0
Thesystemiscomingdown.Pleasewait.
.
.
.
Thesystemisdown.
syncingfilesystems...[11][10][3]done
Pressanykeytoreboot
See Also
Regardless of why you shut down the system, you will probably want to return to run level 3,
where all file resources are available, and users can log in. For instructions on bringing a system
back to a multiuser state, see Booting a SPARC Based System to a Multiuser State (Run Level
3).
Copyright 2012, Oracle and/or its affiliates. All rights reserved. Legal Notices
The init command is an executable shell script that terminates all active processes on a system
and then synchronizes the disks before changing run levels.
o To reboot the system to the state that is defined by the initdefault entry in
the /etc/inittab file, type the following command:
#init6
o To reboot the system to a multiuser state, type the following command:
#init2
Example 4-1 Bringing a System to a Single-User State (Run Level S) by Using the init
Command
In this example, the init command is used to bring a system to a single-user state (run level S).
#inits
#
INIT:Newrunlevel:S
Thesystemiscomingdownforadministration.Pleasewait.
Unmountingremotefilesystems:/volnfsdone.
Printservicesstopped.
syslogd:goingdownonsignal15
Killinguserprocesses:done.
SINGLEUSERMODE
Rootpasswordforsystemmaintenance(controldtobypass):xxxxxx
singleuserprivilegeassignedto/dev/console.
EnteringSystemMaintenanceMode
#
#reboot
Shutdown
You have more than one command option that you can use. The best command is this,
executed as root:
This will immediately shut the system down. You can also use the older command that
still works:
sync;sync;init 5
poweroff
Reboot
If you are trying to reboot the system as opposed to turning it off, you could use:
Or:
sync;sync;init 6
Or even:
reboot