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.
The Solaris 7 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 because devices load automatically when first opened.
File systems are checked only when necessary, improving boot time.
The boot block can read UNIX file systems, eliminating boot errors when the boot program moves.
Third-party bootable devices are supported.
Secondary boot programs, ufsboot and inetboot, have been modified to read CacheFS file systems. This new booting capability enables Solstice AutoClientTM systems to boot more quickly and with less impact on network resources.
The SunOS release 4 fastboot command is available only on Solaris 7 systems that have the SunOS/BSD Source Compatibility Package installed. The fastboot command is obsolete in Solaris 7 systems because file systems are only checked if the file system state is identified as not clean.
The SunOS release 4 halt and reboot commands have shutdown(1M) and init(1M) equivalents in the SunOS release 5.7 software.
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 commands.
Table 8-1 SunOS release 5.7 Replacements for reboot and fastboot
SunOS Release 4Command |
SunOS Release 5.7 Command Replacement |
---|---|
reboot |
shutdown -i 6, init 6 |
fastboot |
boot, init 6 |
The SunOS release 5.7 software 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. The messages are always stored in the /var/adm/messages file.
Type boot -a when you want to be prompted for the name of an alternate kernel, /etc/system file, or path name for kernel module directories.
Be aware of these changes when booting from the PROM:
The PROM loads bootblk from the disk. This file is similar to the previous SunOS release 4 boot block except that it is specific to the UFS file system.
As in the SunOS release 4 software, you need to use installboot(1M) to install boot blocks on a partition to be used for booting.
bootblk opens the boot device and, using the file system you specify, finds and loads ufsboot.
The boot PROM loads the kernel, /kernel/genunix, after ufsboot is loaded into memory. SunOS release 4 systems used /vmunix; however, in the SunOS release 5.7 software the /kernel directory contains all platform-independent kernel modules, including unix, needed to boot the system.
The kernel, in turn, loads other drivers, such as esp, from the /kernel/drv directory. These drivers had to be built as part of the SunOS release 4 kernel but can be dynamically loaded in SunOS release 5.7 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.
Table 8-2 summarizes booting differences.
Table 8-2 Booting Differences
SunOS release 4 |
SunOS release 5.7 |
Feature |
---|---|---|
Now loads ufsboot from disk |
||
boot program |
ufsboot |
Now loads unix from disk |
Bootable kernel image |
||
Mounts and copies unix from network |
||
Mounts /usr and checks file systems |
||
System config scripts |
||
Customizes system kernel, loads modules as needed |
||
PROM monitor, single user, multiuser |
Run states 0 - 6, and S |
System run levels |
/dev/dsk/c0t1d0s6 |
More descriptive logical device names. See "Device Naming Conventions". |
|
boot -r, |
The init(1M) command replaces the SunOS release 4 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).
Note the following changes to the init command:
SunOS release 5.7 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.7 init command uses a different script for each run level instead of grouping all 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.
System Administration Guide, Volume I describes this command in detail.
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 systems controlled run levels using /etc/rc, /etc/rc.boot, and /etc/rc.local files.
The SunOS release 4 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
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 fasthalt commands are available only on SunOS release 5.7 systems that have the SunOS /BSD Source Compatibility Package installed.
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 system.
Table 8-4 SunOS Release 5.7 Replacements for halt and fasthalt
SunOS Release 4 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.
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.
The SunOS release 4 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.
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.