JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Booting and Shutting Down Oracle Solaris 11.1 Systems     Oracle Solaris 11.1 Information Library
search filter icon
search icon

Document Information

Preface

1.  Booting and Shutting Down a System (Overview)

2.  x86: Administering the GRand Unified Bootloader (Tasks)

3.  Shutting Down a System (Tasks)

4.  Booting a System (Tasks)

Displaying and Setting Boot Attributes

SPARC: Displaying and Setting Boot Attributes by Using the OpenBoot PROM

SPARC: How to Identify the PROM Revision Number of a System

SPARC: How to Identify Devices on a System

SPARC: How to Determine the Default Boot Device

SPARC: How to Change the Default Boot Device by Using the Boot PROM

Setting EEPROM Parameters

SPARC: How to Set the Default Boot Device by Using the eeprom Utility

x86: Managing Shutdown Animation Through SMF

Booting a System

How Run Levels Work

What Happens When a System Is Booted to a Multiuser State (Run Level 3)

When to Use Run Levels or Milestones

Determining a System's Current Run Level

How to Boot a System to a Multiuser State (Run Level 3)

How to Boot a System to a Single-User State (Run Level S)

How to Boot a System Interactively

Booting From an Alternate Operating System or Boot Environment

SPARC: How to Boot From an Alternate Operating System or Boot Environment

x86: How to Boot From an Alternate Operating System or Boot Environment

Rebooting a System

How to Reboot a System by Using the init Command

How to Reboot a System by Using the reboot Command

Accelerating the Reboot Process

x86: About the quiesce Function

How to Initiate a Fast Reboot of a System

x86: Initiating a Fast Reboot of a System to a Newly Activated Boot Environment

Changing the Default Fast Reboot Behavior

Initiating a Standard Reboot of a System That Has Fast Reboot Enabled

5.  Booting a System From the Network (Tasks)

6.  Troubleshooting Booting a System (Tasks)

Index

Booting a System

The following procedures describe how to boot a system to various states, also known as run level booting

The following procedures are provided in this section:

How Run Levels Work

A system's run level (also known as an init state) defines what services and resources are available to users. A system can be in only one run level at a time.

Oracle Solaris has eight run levels, which are described in the following table. The default run level is specified in the /etc/inittab file as run level 3.

Table 4-1 Oracle Solaris Run Levels

Run Level
Init State
Type
Purpose
0
Power-down state
Power-down
To shut down the operating system so that it is safe to turn off power to the system.
s or S
Single-user state
Single-user
To run as a single user with some file systems mounted and accessible.
1
Administrative state
Single-user
To access all available file systems. User logins are disabled.
2
Multiuser state
Multiuser
For normal operations. Multiple users can access the system and all file systems. All daemons are running except for the NFS server daemons.
3
Multiuser level with NFS resources shared
Multiuser
For normal operations with NFS resources shared. This is the default run level.
4
Alternative multiuser state
Multiuser
Not configured by default, but available for customer use.
5
Power-down state
Power-down
To shut down the operating system so that it is safe to turn off power to the system. If possible, automatically turns off power on systems that support this feature.
6
Reboot state
Reboot
To stop the operating system and reboot to the state that is defined by the initdefault entry in the /etc/inittab file.

The SMF service, svc:/system/boot-config:default, is enabled by default. When the config/fastreboot_default property is set to true, init 6 bypasses certain firmware initialization and test steps, depending on the specific capabilities of the system. See Accelerating the Reboot Process.

In addition, the svcadm command can be used to change the run level of a system, by selecting a milestone at which to run. The following table shows which run level corresponds to each milestone.

Table 4-2 Run Levels and SMF Milestones

Run Level
SMF Milestone FMRI
S
milestone/single-user:default
2
milestone/multi-user:default
3
milestone/multi-user-server:default

What Happens When a System Is Booted to a Multiuser State (Run Level 3)

  1. The init process is started and reads the properties defined in the svc:/system/environment:init SMF service to set any environment variables. By default, only the TIMEZONE variable is set.

  2. Then, init reads the inittab file and does the following:

    1. Executes any process entries that have sysinit in the action field so that any special initializations can take place before users log in to the system.

    2. Passes the startup activities to svc.startd.

    For a detailed description of how the init process uses the inittab file, see the init(1M) man page.

When to Use Run Levels or Milestones

In general, changing milestones or run levels is an uncommon procedure. If it is necessary, using the init command to change to a run level will change the milestone as well and is the appropriate command to use. The init command is also good for shutting down a system.

However, booting a system using the none milestone can be very useful for debugging startup problems. There is no equivalent run level to the none milestone. For more information, see Chapter 2, Managing Services (Overview), in Managing Services and Faults in Oracle Solaris 11.1.

Determining a System's Current Run Level

To determine a system's current run level, use the who -r command.

Example 4-3 Determining a System's Run Level

The output of the who -r command displays information about a system's current run level, as well as previous run levels.

$ who -r
 .    run-level 3  Dec 13 10:10  3  0 S
$
Output of who -r command
Description
run-level 3
Identifies the current run level
Dec 13 10:10
Identifies the date of last run level change
3
Also identifies the current run level
0
Identifies the number of times the system has been at this run level since the last reboot
S
Identifies the previous run level

How to Boot a System to a Multiuser State (Run Level 3)

Use this procedure to boot a system that is currently at run level 0 to run level 3. Any information in this procedure that applies to either the SPARC or x86 platforms is noted accordingly.

  1. Assume the root role.

    See How to Use Your Assigned Administrative Rights in Oracle Solaris 11.1 Administration: Security Services.

  2. Depending on the platform, do one of the following:
    • For SPARC platforms:
      1. Bring the system to the ok PROM prompt.
        # init 0
      2. Boot the system to run level 3.
        ok boot
    • For x86 platforms, reboot the system to run level 3.
      # reboot

      The boot process displays a series of startup messages and brings the system to run level 3. For more information, see the boot(1M) and reboot(1M) man pages.

  3. Verify that the system has booted to run level 3.

    The login prompt is displayed when the boot process has finished successfully.

    hostname console login:

Example 4-4 SPARC: Booting a System to a Multiuser State (Run Level 3)

The following example shows the messages from booting a SPARC based system to run level 3 after the boot process has started.

ok boot
Probing system devices
Probing memory
ChassisSerialNumber FN62030249
Probing I/O buses

.
.
.
.
OpenBoot 4.30.4.a, 8192 MB memory installed, Serial #51944031.
Ethernet address 0:3:ba:18:9a:5f, Host ID: 83189a5f.
Rebooting with command: boot
Boot device: /pci@1c,600000/scsi@2/disk@0,0:a  File and args:
SunOS Release 5.11 Version 11.1 64-bit
Copyright (c) 1983, 2011, Oracle and/or its affiliates. All rights reserved.
misc/forthdebug (455673 bytes) loaded
Hardware watchdog enabled
Hostname: portia-123
NIS domain name is solaris.example.com

portia-123 console login: NIS domain name is solaris.example.com

Example 4-5 x86: Booting a System to a Multiuser State (Run Level 3)

The following example shows the messages when booting an x86 based system to run level 3 after the boot process has started. Because the Fast Reboot feature is the default in this release (on x86 platforms), booting the system with the reboot command initiates a fast reboot of the system, meaning the BIOS or UEFI firmware is bypassed. Also, the GRUB menu is not displayed during the system boot. If you need to access the system's firmware or edit the GRUB menu at boot time, use the reboot command with the -p option. See Initiating a Standard Reboot of a System That Has Fast Reboot Enabled.

~# reboot
Apr 23 13:30:29 system-04 reboot: initiated by ... on /dev/console
Terminated
system-04% updating /platform/i86pc/boot_archive
updating /platform/i86pc/amd64/boot_archive

system-04 console login: syncing file systems... done
SunOS Release 5.11 Version 11.1 64-bit
Copyright (c) 1983, 2012, Oracle and/or its affiliates. All rights reserved.
Hostname: system-04

system-04 console login: <username>
Password: xxxxxx
Last login: Mon Apr 23 11:06:05 on console
Oracle Corporation      SunOS 5.11      11.1    April 2012
# who -r
        run-level 3  Apr 23 13:31     3      0  S

How to Boot a System to a Single-User State (Run Level S)

You boot a system to a single-user state for the purpose of performing system maintenance, such as backing up a file system or to troubleshoot other system issues.

  1. Assume the root role.

    See How to Use Your Assigned Administrative Rights in Oracle Solaris 11.1 Administration: Security Services.

  2. Depending on the platform, do one of the following:
    • For SPARC platforms:
      1. Bring the system to the ok PROM prompt.
        # init 0
      2. Boot the system to a single-user state.
        ok boot -s
      3. Type the root password when the following message is displayed:
        SINGLE USER MODE
        
        Root password for system maintenance (control-d to bypass): xxxxxx
    • For x86 platforms:
      1. Perform a standard reboot of the system.
        # reboot -p

        Because the Fast Reboot feature is enabled by default, you must specify the -p option when rebooting the system, which enables the GRUB menu to be displayed at boot time. To disable the Fast Reboot feature so that the -p option does not need to be specified, see Changing the Default Fast Reboot Behavior.

        • If the system displays the Press Any Key to Reboot prompt, press any key to reboot the system. Or, you can also use the Reset button at this prompt.
        • If the system is shut down, turn the system on with the power switch.
      2. When the GRUB menu is displayed, select the boot entry that you want to modify, then type e to edit that entry.
      3. Using the arrow keys, navigate to the $multiboot line, then type -s at the end of the line.
      4. To exit the GRUB edit menu and boot the entry you just edited, press Control-X. If you are not using a serial console on a system with UEFI firmware, pressing F10 also boots the entry.

        See x86: Adding Kernel Arguments by Editing the GRUB Menu at Boot Time for more information about editing the GRUB menu at boot time.

  3. Verify that the system is at run level S.
    # who -r
  4. Perform the maintenance task that required the change to run level S.
  5. Reboot the system.

Example 4-6 SPARC: Booting a System to a Single-User State (Run Level S)

The following example shows the messages from booting a SPARC based system to run level S after the boot process has started.

# init 0
# svc.startd: The system is coming down.  Please wait.
svc.startd: 122 system services are now being stopped.
Mar  5 10:30:33 system1 syslogd: going down on signal 15
svc.startd: Killing user processes.
umount: /ws busy
umount: /home busy
Mar  5 17:30:50 The system is down.  Shutdown took 70 seconds.
syncing file systems... done
Program terminated
{1c} ok boot -s

SC Alert: Host System has Reset
NOV 17 21:46:59 ERROR: System memory downgraded to 2-channel mode from 4-channel mode
NOV 17 21:47:00 ERROR: Available system memory is less than physically installed memory
NOV 17 21:47:00 ERROR: System DRAM  Available: 008192 MB  Physical: 016384 MB
Sun Fire T200, No Keyboard
.
.
.
Ethernet address 0:14:4f:1d:e8:da, Host ID: 841de8da.



ERROR: The following devices are disabled:
    MB/CMP0/CH2/R0/D0

Boot device: /pci@7c0/pci@0/pci@1/pci@0,2/LSILogic,sas@2/disk@0,0:a 
File and args: -s

SunOS Release 5.11 Version 11.1 64-bit
Copyright (c) 1983, 2012, Oracle and/or its affiliates. All rights reserved.
NOTICE: Hypervisor does not support CPU power management
Booting to milestone "milestone/single-user:default".
Hostname: system1
Requesting System Maintenance Mode
SINGLE USER MODE
Enter root password (control-d to bypass): xxxxxx
single-user privilege assigned to root on /dev/console.
Entering System Maintenance Mode

Mar  5 10:36:14 su: 'su root' succeeded for root on /dev/console
Oracle Corporation      SunOS 5.11      11.1    January 2012
root@system1:~# who -r
run-level S  Mar  5 10:35     S      0  0
root@tsystem1:~#

Example 4-7 x86: Booting a System to a Single-User State (Run Level S)

The following example shows the messages from booting an x86 based system to run level S after the boot process has started.

root@system-04:~# init 0
root@system-04:~# svc.startd: The system is coming down.  Please wait.
svc.startd: 129 system services are now being stopped.
Apr 23 13:51:28 system-04 syslogd: going down on signal 15
svc.startd: Killing user processes.
umount: /home busy
Apr 23 13:51:36 The system is down.  Shutdown took 26 seconds.
syncing file systems... done
Press any key to reboot.
.
.
.LSI Corporation MPT SAS BIOS
MPTBIOS-6.26.00.00 (2008.10.14)
Copyright 2000-2008 LSI Corporation.

Initializing..|Press F2 to runS POPUP  (CTRL+P on Remote Keyboard)
Press F12 to boot from the network (CTRL+N on Remote Keyboard)
System Memory : 8.0 GB , Inc.
Auto-Detecting Pri Master..ATAPI CDROM                              0078
            Ultra DMA Mode-2 
.
.
.
GNU GRUB  version 1.99,5.11.0.175.1.0.0.14.0

 ****************************************************************************
 *Oracle Solaris 11.1                                                       *
 *                                                                          *
 *                                                                          *
 *                                                                          *
 *                                                                          *
 *                                                                          *
 *                                                                          *
 *                                                                          *
 *                                                                          *
 *                                                                          *
 *                                                                          *
 ****************************************************************************

      Use the * and * keys to select which entry is highlighted.
      Press enter to boot the selected OS, 'e' to edit the commands
      before booting or 'c' for a command-line.

 GNU GRUB  version 1.99,5.11.0.175.1.0.0.14.0

 ****************************************************************************
 * setparams 'Oracle Solaris 11.1'                                          *
 *                                                                          *
 * insmod part_msdos                                                        *
 * insmod part_sunpc                                                        *
 * insmod part_gpt                                                          *
 * insmod zfs                                                               *
 * search --no-floppy --fs-uuid --set=root cd03199c4187a7d7                 *
 * zfs-bootfs /ROOT/s11u1/@/ zfs_bootfs                                     *
 * set kern=/platform/i86pc/kernel/amd64/unix                               *
 * echo -n "Loading ${root}/ROOT/s11u1   /@$kern: "                         *
 * $multiboot /ROOT/s11u1/@/$kern $kern -B $zfs_bootfs -s                            
 * set gfxpayload="1024x768x32;1024x768x16;800x600x16;640x480x16;640x480x1\ *
 * 5;640x480x32"                                                            **
 ****************************************************************************

      Minimum Emacs-like screen editing is supported. TAB lists
      completions. Press Ctrl-x or F10 to boot, Ctrl-c or F2 for
      a command-line or ESC to discard edits and return to the GRUB menu.

Booting a command list

Loading hd0,msdos1,sunpc1/ROOT/s11u1/@/platform/i86pc/kernel/amd64/unix: 0
%...done.
Loading hd0,msdos1,sunpc1/ROOT/s11u1/@/platform/i86pc/amd64/boot_archive:
0%...
.
.
.
SunOS Release 5.11 Version 11.1 64-bit
Copyright (c) 1983, 2012, Oracle and/or its affiliates. All rights reserved.
NOTICE: kmem_io_2G arena created
Booting to milestone "milestone/single-user:default".
Hostname: system-04
Requesting System Maintenance Mode
SINGLE USER MODE


Enter user name for system maintenance (control-d to bypass): root
Enter root password (control-d to bypass): xxxxxxx
single-user privilege assigned to root on /dev/console.
Entering System Maintenance Mode

May  8 11:13:44 su: 'su root' succeeded for root on /dev/console
Oracle Corporation      SunOS 5.11      11.1    April 2012
You have new mail.

root@system-04:~# who -r
   .       run-level S  Apr 23 14:49     S      0  0

How to Boot a System Interactively

Booting a system interactively is useful if you need to specify an alternate kernel or the /etc/system file during the boot process because the original file is damaged or the system will not boot. Use the following procedure to boot a system interactively.

The following procedure describes how to specify an alternate /etc/system file during an interactive boot of a system that has only one boot environment. Alternatively, you can boot an alternative boot environment.

  1. Make backup copies of the /etc/system and boot/solaris/filelist.ramdisk files, then add the etc/system.bak file name to the /boot/solaris/filelist.ramdisk file.
    # cp /etc/system /etc/system.bak
    # cp /boot/solaris/filelist.ramdisk /boot/solaris/filelist.ramdisk.orig
    # echo "etc/system.bak" >> /boot/solaris/filelist.ramdisk
  2. Depending on the platform, do one of the following:
    • For SPARC platforms:
      1. Bring the system to the ok PROM prompt.
        # init 0
      2. Boot the system interactively.
        ok boot -a
    • For x86 platforms:
      1. Perform a standard reboot of the system.
        # reboot -p
      2. When the GRUB menu is displayed, select the boot entry that you want to boot interactively, then type e to edit the entry.
      3. Type -a at the end of the $multiboot line.
      4. To exit the GRUB edit menu and boot the entry you just edited, press Control-X. If you have a system with UEFI firmware, and you are not using a serial console, pressing F10 also boots the entry.
  3. When prompted for the alternate file system, specify the backup file that you created, the press Return. For example:
    Name of system file [etc/system]: /etc/system.bak

    Pressing Return without providing any information accepts the system defaults.

  4. At the Retire store prompt, press Return or specify /dev/null to bypass.

    Note - The /etc/devices/retire_store file is the backing store for devices that are retired by the Fault Management Architecture (FMA). The system no longer uses these devices. You can provide an alternate file for /etc/devices/retire_store, if necessary. However, for recovery purposes, specifying /dev/null is the most useful choice to boot the system without respecting the contents of the /etc/devices/retire_store file.


  5. After the system has booted, correct the problem with the /etc/system file.
  6. Reboot the system.
    # reboot

Example 4-8 SPARC: Booting a System Interactively

In the following example, the system defaults (shown in square brackets []) are accepted.

# init 0
# svc.startd: The system is coming down.  Please wait.
svc.startd: 121 system services are now being stopped.
Apr 22 00:34:25 system-28 syslogd: going down on signal 15
svc.startd: Killing user processes.
umount: /home busy
Apr 22 06:34:37 The system is down.  Shutdown took 18 seconds.
syncing file systems... done
Program terminated
{11} ok boot -a

SC Alert: Host System has Reset

Sun Fire T200, No Keyboard
Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
OpenBoot 4.30.4.d, 16256 MB memory available, Serial #74139288.
Ethernet address 0:14:4f:6b:46:98, Host ID: 846b4698.

Boot device: /pci@780/pci@0/pci@9/scsi@0/disk@0,0:a  File and args: -a
Name of system file [/etc/system]:  /etc/system.bak
SunOS Release 5.11 Version 11.1 64-bit
Copyright (c) 1983, 2012, Oracle and/or its affiliates. All rights reserved.
Retire store [/etc/devices/retire_store] (/dev/null to bypass): Press Return


system-28 console login:

Example 4-9 x86: Booting a System Interactively

In the following example, an x86 based system is booted interactively.

root@system-04:~# reboot -p
Apr 23 15:37:04 system-04 reboot: initiated by user1 on /dev/consoleTerminated
system-04% syncing file systems... done
rebooting...
.
.
.LSI Corporation MPT SAS BIOS
MPTBIOS-6.26.00.00 (2008.10.14)
Copyright 2000-2008 LSI Corporation.

Initializing..|Press F2 to runS POPUP  (CTRL+P on Remote Keyboard)
Press F12 to boot from the network (CTRL+N on Remote Keyboard)
System Memory : 8.0 GB , Inc.
Auto-Detecting Pri Master..ATAPI CDROM                              0078
            Ultra DMA Mode-2 
GNU GRUB  version 1.99,5.11.0.175.1.0.0.14.0

 ****************************************************************************
 *Oracle Solaris 11.1                                                       *
 *                                                                          *
 *                                                                          *
 *                                                                          *
 *                                                                          *
 *                                                                          *
 *                                                                          *
 *                                                                          *
 *                                                                          *
 *                                                                          *
 *                                                                          *
 *                                                                          *
 *                                                                          *
 ****************************************************************************

      Use the * and * keys to select which entry is highlighted.
      Press enter to boot the selected OS, 'e' to edit the commands
      before booting or 'c' for a command-line.

 GNU GRUB  version 1.99,5.11.0.175.1.0.0.15.1

 +--------------------------------------------------------------------------+
 | setparams 'Oracle Solaris 11.1'                                          |
 |                                                                          |
 | insmod part_msdos                                                        |
 | insmod part_sunpc                                                        |
 | insmod part_gpt                                                          |
 | insmod zfs                                                               |
 | search --no-floppy --fs-uuid --set=root cd03199c4187a7d7                 |
 | zfs-bootfs /ROOT/s11u1/@/ zfs_bootfs                                     |
 | set kern=/platform/i86pc/kernel/amd64/unix                               |
 | echo -n "Loading ${root}/ROOT/s11u1/@$kern: "                            |
 | $multiboot /ROOT/s11u1/@/$kern $kern -B $zfs_bootfs -a                   |
 | set gfxpayload="1024x768x32;1024x768x16;800x600x16;640x480x16;640x480x1\ |
 +--------------------------------------------------------------------------+

      Minimum Emacs-like screen editing is supported. TAB lists
      completions. Press Ctrl-x or F10 to boot, Ctrl-c or F2 for
      a command-line or ESC to discard edits and return to the GRUB menu.

 Booting a command list

Loading hd0,msdos1,sunpc1/ROOT/s11u1/@/platform/i86pc/kernel/amd64/unix: 0
%...done.
Loading hd0,msdos1,sunpc1/ROOT/s11u1/@/platform/i86pc/amd64/boot_archive:
0%...
.
.
.
Name of system file [/etc/system]:  /etc/system.bak
SunOS Release 5.11 Version 11.1 64-bit
Copyright (c) 1983, 2012, Oracle and/or its affiliates. All rights reserved.: 0
Retire store [/etc/devices/retire_store] (/dev/null to bypass): Press Return 

NOTICE: kmem_io_2G arena created
Hostname: system-04

system-04 console login: