|Skip Navigation Links|
|Exit Print View|
|Booting and Shutting Down Oracle Solaris 11.1 Systems Oracle Solaris 11.1 Information Library|
The following procedures are provided in this section:
Normally, the system reboots at power-up or after a system crash. You can reboot a system by using either the init command or the reboot command. The init 6 command asks for stop methods (either SMF or rc.d). Whereas, the reboot command does not, thereby making the reboot command a more reliable way of rebooting a system. See init(1M) and reboot(1M) for details.
The reboot performs the following actions:
Restarts the kernel
Performs a sync operation on the disks
Initiates a multi-user boot.
Although the reboot command can be used by the root user at any time, in certain cases, as with the reboot of a server, the shutdown command is used first to warn all users who are logged in to the system of the impending loss of service. For more information, see Chapter 3, Shutting Down a System (Tasks).
The system is always running in one of a set of well-defined run levels. Run levels are also referred to as init states because the init process maintains the run level. The init command can be used to initiate a run level transition. When using the init command to reboot a system, run levels 2, 3, and 4 are available as multiuser system states. See How Run Levels Work.
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. The init 6 command stops the operating system and reboots to the state that is defined by the initdefault entry in the /etc/inittab file.
Note - Starting with the Oracle Solaris 11 release, the SMF service, svc:/system/boot-config:default, is enabled by default. When the config/fastreboot_default property is set to true (which is the case for all x86 based systems), the init 6 command bypasses certain firmware initialization and test steps, depending on the specific capabilities of the system. On SPARC based systems, this property is set to false by default, but the property can be manually enabled. See Accelerating the Reboot Process.
# init 6
# init 2
Example 4-12 Rebooting a System to a Single-User State (Run Level S) by Using the init Command
In this example, the init command is used to reboot a system to a single-user state (run level S).
~# init s ~# svc.startd: The system is coming down for administration. Please wait. Jul 20 16:59:37 system-04 syslogd: going down on signal 15 svc.startd: Killing user processes. Requesting System Maintenance Mode (See /lib/svc/share/README for more information.) SINGLE USER MODE Enter user name for system maintenance (control-d to bypass): root Enter root password (control-d to bypass): xxxxxx single-user privilege assigned to root on /dev/console. Entering System Maintenance Mode Jul 20 17:11:24 su: 'su root' succeeded for root on /dev/console Oracle Corporation SunOS 5.11 11.1 June 2012 You have new mail. ~# who -r . run-level S Jul 20 17:11 S 1 3
Use this procedure to reboot a running system to a multiuser state (run level 3).
Note - On x86 platforms, using the reboot command initiates a fast reboot of the system, bypassing the BIOS or UEFI firmware and certain boot processes. To perform a standard reboot of an x86 based system that has the Fast Reboot feature enabled, use the -p option with the reboot command. See Initiating a Standard Reboot of a System That Has Fast Reboot Enabled.
The Fast Reboot feature of Oracle Solaris is supported on both SPARC and x86 platforms. The Fast Reboot feature implements an in-kernel boot loader that loads the kernel into memory and then switches to that kernel, so that the reboot process occurs within seconds.
Support for the Fast Reboot feature is facilitated by a new boot-config service, svc:/system/boot-config:default. This service provides a means for setting or changing the default boot configuration properties of a system, if required. When the config/fastreboot_default property is set to true, the system automatically performs a fast reboot. By default, this property is set to true on an x86 based system and false on a SPARC based system.
On an x86 based system, a fast reboot of the system bypasses the system firmware (BIOS or UEFI) and the boot loader processes. Fast Reboot and Panic Fast Reboot (a fast reboot of system after a system panic) are enabled by default on x86 platforms, so there is no need to use the -f option with the reboot command to initiate a fast reboot of an x86 based system.
The Fast Reboot feature works differently on SPARC based systems than it does on an x86 based systems. Note the following additional information about Fast Reboot support on SPARC platforms:
Fast Reboot is not supported on sun4u systems.
Fast Reboot is supported on sun4v systems. However, a fast reboot of a SPARC based system is not the same as a fast reboot of an x86 based system. On SPARC sun4v systems, a fast reboot is a minimal hypervisor initiated restart that delivers that same basic performance as a fast reboot of an x86 based system.
Fast Reboot behavior on SPARC based systems is not enabled by default. To initiate a fast reboot of a SPARC based system, you must use the -f option with the reboot command. Or, to make a fast reboot the default behavior, you can set the config/fastreboot_default property to true. For instructions, see Changing the Default Fast Reboot Behavior.
On SPARC based systems the boot-config service also requires the solaris.system.shutdown authorization as the action_authorization and value_authorization.
The system's capability to bypass the firmware when booting a new OS image has dependencies on the device drivers' implementation of a new device operation entry point, quiesce. On supported drivers, this implementation quiesces a device, so that at completion of the function, the driver no longer generates interrupts. This implementation also resets the device to a hardware state, from which the device can be correctly configured by the driver's attach routine, without a power cycle of the system or being configured by the firmware. For more information about this functionality, see the quiesce(9E) and dev_ops(9S) man pages.
Note - Not all device drivers implement the quiesce function. For troubleshooting instructions, see x86: Conditions Under Which Fast Reboot Might Not Work and x86: How to Clear a Failed Automatic Boot Archive Update on a System That Does Not Support Fast Reboot.
# reboot -f
# init 6
Running either of these commands reboots the system to the default entry in the grub.cfg file.
There are several ways that you can perform a fast reboot of an x86 based system to an alternate boot environment. The following examples illustrate some of these methods.
Example 4-13 x86: Initiating a Fast Reboot of a System to a Newly Activated Boot Environment
The following example shows how to initiate a fast reboot of a system to the newly activated boot environment, 2012-06-10-be.
# beadm activate 2012-06-10-be # reboot
Example 4-14 x86: Initiating a Fast Reboot of a System by Specifying an Alternate Boot Environment
To fast reboot a system to an alternate boot environment, for example zfsbe2, you would type the following command:
# reboot -- 'rpool/zfsbe2'
To initiate a fast reboot of a system to a dataset named rpool/zfsbe1, you would type the following command:
# reboot -- 'rpool/zfsbe1'
For example, you would initiate a fast reboot of a system to an alternate ZFS root dataset as follows:
# reboot -- 'rpool/ROOT/zfsroot2'
Example 4-15 x86: Initiating a Fast Reboot of a System to an Alternate Boot Environment With the Kernel Debugger Enabled
Initiate a fast reboot of a system to the zfsbe3 boot environment as follows:
# reboot -- 'rpool/zfsbe3 /platform/i86pc/kernel/amd64/unix -k'
Example 4-16 x86: Initiating a Fast Reboot of a System to a New Kernel
Initiate a fast reboot of a system to a new kernel named my-kernel as follows:
# reboot -- '/platform/i86pc/my-kernel/amd64/unix -k'
Example 4-17 x86: Initiating a Fast Reboot of a Mounted Disk or a Mounted Dataset
Initiate a fast reboot of a mounted disk or a mounted dataset as follows:
# reboot -- '/mnt/platform/i86pc/my-kernel/amd64/unix -k'
Example 4-18 x86: Initiating a Fast Reboot of a System to a Single-User State With the Kernel Debugger Enabled
Initiate a fast reboot of a system to a single-user state, with the kernel debugger enabled, as follows:
# reboot -- '-ks'
The Fast Reboot feature is controlled by SMF and implemented through a boot configuration service, svc:/system/boot-config. The boot-config service provides a means for setting or changing the default boot parameters.
The fastreboot_default property of the boot-config service enables an automatic fast reboot of the system when either the reboot or the init 6 command is used. When the config/fastreboot_default property is set to true, the system automatically performs a fast reboot, without the need to use the reboot -f command. By default, this property's value is set to true on an x86 based system and false on a SPARC based system.
Example 4-19 x86: Configuring Properties of the boot-config Service
The svc:/system/boot-config:default service consists of the following properties:
These properties can be configured by using the svccfg and svcadm commands.
For example, to disable the default behavior of the fastreboot_onpanic property on an x86 based system, you would set the property's value to false, as shown here:
# svccfg -s "system/boot-config:default" setprop config/fastreboot_onpanic=false # svcadm refresh svc:/system/boot-config:default
Changing one property's value does not affect the default behavior of the other property.
Example 4-20 SPARC: Configuring Properties of the boot-config Service
The following example shows how to make a fast reboot the default behavior on a SPARC based system by setting the boot-config SMF service property to true.
# svccfg -s "system/boot-config:default" setprop config/fastreboot_default=true # svcadm refresh svc:/system/boot-config:default
Setting the property's value to true accelerates the reboot process, which enables systems that support the Fast Reboot feature to bypass certain POST tests. When the property is set to true, you can perform a fast reboot of the system without having to use the -f option with the reboot command.
To reboot a system that has the Fast Reboot feature enabled, without reconfiguring the boot-config service to disable the feature, use the -p option with the reboot command, as shown here:
# reboot -p