Skip Navigation Links | |
Exit Print View | |
Booting and Shutting Down Oracle Solaris 11.1 Systems Oracle Solaris 11.1 Information Library |
1. Booting and Shutting Down a System (Overview)
2. x86: Administering the GRand Unified Bootloader (Tasks)
3. Shutting Down 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
SPARC: How to Set the Default Boot Device by Using the eeprom Utility
x86: Managing Shutdown Animation Through SMF
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)
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
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)
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:
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
|
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
|
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.
Then, init reads the inittab file and does the following:
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.
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.
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.
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 $
|
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.
# init 0
ok boot
# 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.
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
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.
# init 0
ok boot -s
SINGLE USER MODE Root password for system maintenance (control-d to bypass): xxxxxx
# 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.
See x86: Adding Kernel Arguments by Editing the GRUB Menu at Boot Time for more information about editing the GRUB menu at boot time.
# who -r
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
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.
# cp /etc/system /etc/system.bak # cp /boot/solaris/filelist.ramdisk /boot/solaris/filelist.ramdisk.orig # echo "etc/system.bak" >> /boot/solaris/filelist.ramdisk
# reboot -p
Name of system file [etc/system]: /etc/system.bak
Pressing Return without providing any information accepts the system defaults.
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.
# 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: