Contained Within
Find More Documentation
Featured Support Resources
| Download this book in PDF
Startup and Shutdown
8
- This chapter describes changes to procedures for booting and shutting down a system.
-
- See "Administration Supplement for Solaris Platforms" 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 2.4 boot process makes system administration easier. Some of the major changes include:
-
- The kernel is self-configuring so you no longer need to rebuild it manually.
- Kernel memory consumption is reduced by automatic loading of devices when first opened.
- File systems are checked only when necessary, improving bootup time.
- The boot block can read UNIX file systems, eliminating boot errors when the boot program moves.
- Third-party bootable devices are supported.
-
- The SunOS release 4.x fastboot command is available only on Solaris 2.4 systems that have the SunOS/BSD Source Compatibility Package installed.
- The SunOS release 4.x halt and reboot commands have shutdown(1M) and init(1M) equivalents in SunOS release 5.4.
- In the Solaris 2.4 operating environment, the shutdown and init commands are the preferred way to halt, shut down, or reboot your system. The reboot command is available in the Solaris 2.4 operating environment, but it brings the system down quickly, without orderly shutting down services. Table 8-1 shows the SunOS release 5.4 commands that replace those in SunOS release 4.x.
-
Table 8-1 reboot
| SunOS release 4.x | SunOS release 5.4 |
| reboot | shutdown -i 6 |
| fastboot | boot |
boot Command Changes
- SunOS release 5.4 has these additional options for the boot command:
-
- Type boot -r when you add new hardware or alter its location. This option creates the physical and logical device names, with the logical device name linked to the physical device name.
- Type boot -v when you want to see all the system bootup messages; the default is to boot silently. Note the messages are always displayed in the console message buffer.
- Type boot -a when you want to be prompted for the name of the system to boot.
Booting From the PROM
- Be aware of these changes when booting from PROM:
-
- The PROM loads ufsbootblk from the disk. This file is similar to the previous SunOS release 4.x boot block, except that it is specific to the ufs file system. As in SunOS release 4.x, you need to use installboot(1M) to put the boot program in the system.
-
/ufsbootblk opens the boot device and, using the file system you specify, finds and loads /ufsboot.
-
-
/ufsboot loads the kernel from /kernel/unix. SunOS release 4.x systems used /vmunix; however, in SunOS release 5.4 the /kernel directory contains all kernel modules, including unix.
- The kernel, in turn, loads other drivers, such as sbus, from the /kernel/drv directory. These drivers had to be built as part of the SunOS release 4.x kernel, but can be dynamically loaded in SunOS release 5.4 systems when they are needed.
- The /sbin/init command generates processes to set up the system based on the directions in /etc/inittab. The next section describes the run levels that init uses.
Summary of Boot Differences
-
Table 8-2 summarizes booting differences.
-
Table 8-2
| SunOS release 4.x | SunOS release 5.4 | Feature |
| bootsd | ufsbootblk | Now loads ufsboot from disk |
| boot program | ufsboot | Now loads unix from disk |
| /vmunix | /kernel/unix | 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, load modules as
needed |
-
Table 8-2
| SunOS release 4.x | SunOS release 5.4 | Feature |
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" on page 65. |
| 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 SunOS release 5.4. 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:
-
- SunOS release 5.4 system software has eight initialization states (init states or run levels). The default init state is defined in the /etc/inittab file.
- The SunOS release 5.4 init command uses a different script for each run level instead of grouping all of the run levels together in the /etc/rc, /etc/rc.boot, and /etc/rc.local files. The files, named by run level, are located in the /sbin directory.
-
SPARC: Installing Solaris Software describes this command in detail. See man Pages(1): User Commands.
Changing System Run Levels
- The SunOS release 5.4 init command lets you control the run level (initialization state) of your system and move easily between various modes of operation. SunOS release 5.4 uses /sbin/rc scripts to 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.
- SunOS release 4.x had three run levels: prom monitor, single user, and multiuser. These correspond to run levels 0, 1, and 3 in SunOS release 5.4.
-
Table 8-3 gives an overview of what each run level's /sbin/rc script does.
-
Table 8-3
| Run Level | Default SunOS release 5.4 Function |
| rc0 | 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. |
| rc1 | 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. |
| rc2 | Normal multiuser operation without NFS systems exported. 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.
|
| rc3 | Normal multiuser operation of a file server with NFS systems exported. Completes all of the tasks in run level 2. Starts the NFS system daemons.
|
| rc4 | Alternative multiuser state (not used). |
-
Table 8-3
| Run Level | Default SunOS release 5.4 Function |
| rc5 | Software reboot, prompts for a boot device other than the EEPROM default. |
| rc6 | Reboot. Kills all active processes. Unmounts the file systems and reboots to the initdefault entries in /etc/inittab.
|
| rcS,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.
-
- The SunOS release 4.x fasthalt commands are available only on SunOS release 5.4 systems that have the SunOS /BSD Source Compatibility Package installed.
- The SunOS release 4.x halt and reboot commands have shutdown and init equivalents.
- See "Common Administration Tasks" for detailed descriptions of shutdown procedures. man pages for each command are available in man Pages(1): User Commands.
- In SunOS release 5.4, the shutdown command is the preferred way to halt or shut down a system. shutdown and init use rc scripts to kill running processes. The halt command is available in SunOS release 5.4, but it stops the system quickly, without orderly shutting down services. Table 8-4 shows the SunOS release 5.4 commands that replace those in the SunOS release 4.x system.
-
Table 8-4 shutdown
| SunOS release 4.x | SunOS release 5.4 |
| halt | init 0 |
| fasthalt | 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 of man Pages(1M): System Administration Commands for information about the run-level numbers.
Changes to the shutdown Command
- The SunOS release 5.4 shutdown command includes only the options in Table 8-5. This command and its options are described in File System Administration.
-
Table 8-5 shutdown
| Option | SunOS release 5.4 Function |
| -g | Selects "grace" period before shutdown begins. |
| -i [init state] | Specifies an initial run level (see Table 8-3 on page 77). |
| -y | Runs shutdown without asking confirmation questions.
Assumes a "yes" response to all questions. |
- By default, the SunOS release 5.4 shutdown command asks you to confirm before an actual shutdown begins, but it has an option (-y) that allows it to run without operator intervention.
- The SunOS release 5.4 shutdown command does not support any of the options available with SunOS release 4.x shutdown. Therefore, SunOS release 4.x options are available only in BSD source compatibility mode on Solaris 2.4 systems.
- See Appendix A, "Commands Reference Table," for a summary of changes. See the shutdown man page 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 2.4 systems. The file-system checking features of these commands are not appropriate to Solaris 2.4.
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.4 systems are not available on other AT&T SVR4 systems, both commands have shutdown and init equivalents.
|
|