Solaris Transition Guide

Chapter 8 Startup and Shutdown

This chapter describes changes to procedures for booting and shutting down a system.

See System Administration Guide, Volume I for detailed descriptions of boot procedures. Man pages for each command are available on line in the "User Commands" section of SunOS 4.x Reference Manual, or in man Pages(1): User Commands.

Booting

The Solaris 7 boot process makes system administration easier. Some of the major changes include:

In the Solaris 7 operating environment, the shutdown and init commands are the preferred way to halt, shut down, or reboot your system. While the reboot command is available in the Solaris 7 operating environment, it brings the system down quickly without shutting down services in an orderly way. Table 8-1 shows the SunOS release 5.7 commands that replace SunOS release 4.x commands.

Table 8-1 SunOS release 5.7 Replacements for reboot and fastboot

SunOS release 4.x Command 

SunOS release 5.7 Command Replacement 

reboot

shutdown -i 6, init 6

fastboot

boot, init 6

boot Command Changes

The SunOS release 5.7 software has these additional options for the boot command:

Booting From the PROM

Be aware of these changes when booting from PROM:

Summary of Boot Differences

Table 8-2 summarizes booting differences.

Table 8-2 Summary of Booting Differences

SunOS release 4.x 

SunOS release 5.7 

Feature 

bootsd

bootblk

Now loads ufsboot from disk

boot program

ufsboot

Now loads unix from disk

/vmunix

/kernel/genunix

Bootable kernel image 

boot.sun4c.sunos.4.1

inetboot

Mounts and copies unix from network

rc.boot rc.single

/etc/rcS

Mounts /usr and checks file systems

rc.local

/etc/rc2 /etc/rc3

System config scripts 

/etc/config

modload /etc/system

Customizes system kernel, loads modules as needed 

Prom monitor, single user, multiuser 

Run states 0 - 6, and S 

System run levels 

/dev/sd1g

/dev/dsk/c0t1d0s6

More descriptive logical device names. See "Device Naming Conventions".

MAKEDEV

boot -r,

add_drv

Makes device nodes

Using the init Command

The init(1M) command replaces the SunOS release 4.x fasthalt command in the SunOS release 5.7 software. Use it to shut down a single-user system. You can use init to place the system in a power-down state (init 0) or into single-user state (init 1).

init Command Changes

Note the following changes to the init command:

System Administration Guide, Volume I describes this command in detail.

Changing System Run Levels

The SunOS release 5.7 init command enables you to control the run level (initialization state) of your system and move easily between various modes of operation. The SunOS release 5.7 /sbin/rc scripts control each individual run level instead of putting all system states into one file. This enables you to make changes in a unique file if you create new scripts or modify existing ones. SunOS release 4.x systems controlled run levels using /etc/rc, /etc/rc.boot, and /etc/rc.local files.

The SunOS release 4.x software had three run levels: prom monitor, single user, and multiuser. These correspond to run levels 0, 1, and 3 in the SunOS release 5.7 software.

Table 8-3 gives an overview of what each run level's /sbin/rc script does.

Table 8-3 SunOS release 5.7 System Initialization Run Levels

Run Level 

Default SunOS release 5.7 Function 

Shuts down the system so it is safe to turn off power. Stops system services and daemons. Terminates all running processes. Unmounts all file systems. 

Single-user (system administrator) state for tasks that allow only one user on the system. Stops system services and daemons. Terminates all running processes. Unmounts all file systems. 

Normal multiuser operation without NFS file systems shared. Sets the timezone variable. Mounts the /usr file system. Cleans up the /tmp and /var/tmp directories. Loads the network interfaces and starts processes. Starts the cron daemon. Cleans up the uucp tmp files. Starts the lp system. Starts the sendmail daemon.

Normal multiuser operation of a file server with NFS systems shared. Completes all of the tasks in run level 2. Starts the NFS system daemons. 

Alternative multiuser state (not used). 

Shut down the system so that it is safe to remove power. If possible, automatically turn off system power on systems that support this feature. 

S,s

Single-user state, running with some file systems mounted and accessible.

Shutting Down

Use the shutdown(1M) command when shutting down a system with multiple users. The command sends a warning to all logged-in users and, after 60 seconds, shuts the system down to single-user state.

See System Administration Guide, Volume I for detailed descriptions of shutdown procedures. .

In the SunOS release 5.7 software, the shutdown command is the preferred way to halt or shut down a system. shutdown and init use rc scripts to kill running processes. While the halt command is available in the SunOS release 5.7 software, it stops the system quickly without shutting down services in an orderly way. Table 8-4 shows the SunOS release 5.7 commands that replace those in the SunOS release 4.x system.

Table 8-4 SunOS release 5.7 Replacements for halt and fasthalt

SunOS release 4.x Command 

SunOS release 5.7 Command Replacement 

halt

shutdown -i 0, init 0

fasthalt

shutdown -i 0, init 0

The shutdown and init commands accept a numerical "run-level" argument that controls the shutdown sequence. See the shutdown and init man pages for information about the run-level numbers.

Changes to the shutdown Command

The SunOS release 5.7 shutdown command includes only the options in Table 8-5. This command and its options are described in System Administration Guide, Volume I.

Table 8-5 SunOS release 5.7 shutdown Command Options

Option 

Description 

-g

Selects "grace" period before shutdown begins.

-i [init state]

Specifies an initial run level (see Table 8-3).

-y

Runs shutdown without asking confirmation questions.

Assumes a "yes" response to all questions. 

-message

Specifies user-supported message. If more than one word, use quotes around the message. 

By default, the SunOS release 5.7 shutdown command asks you to confirm before an actual shutdown begins. You can use the -y option to run it without operator intervention.

The shutdown options are available only in BSD source compatibility mode on Solaris 7 systems.

See Appendix A, Commands Reference Table, for a summary of changes. See shutdown(1M) for information about how the command works.

Using the fasthalt and fastboot Commands

The SunOS release 4.x fastboot and fasthalt commands are available if you are running the SunOS/BSD Source Compatibility Package on Solaris 7 systems. The file-system checking features of these commands are not appropriate to a Solaris 7 system.

Using the halt and reboot Commands

The halt and reboot commands do not run the rc scripts in /sbin, so they are not recommended. Since the halt and reboot commands in SunOS release 5.7 systems are not available on other AT&T SVR4 systems, both commands have shutdown and init equivalents.