Sunteți pe pagina 1din 5

Document Display https://support.oracle.com/epmos/faces/SearchDocDisplay?_adf.ctrl-stat...

Copyright (c) 2019, Oracle. All rights reserved. Oracle Confidential.

Basics of Using The 'boot' Command (Doc ID 1006057.1)

In this Document

Goal
Solution
1. This would be the case for rare race conditions and other timing-related problems.
2. Using the boot Command
A. Common boot Syntax
B. Common Boot [device-specifier] disk
C. Common Boot [arguments]
D. Network booting background
E. Network boot syntax
F. Example syntax for custom JumpStart boot commands
3. Troubleshooting
References

APPLIES TO:

Solaris Operating System - Version 8.0 and later


All Platforms

GOAL

This document describes the basics of using the boot command, and how to use the boot options in x86 GRUB menu.

SOLUTION

Using boot command options can change the timing of booting by starting and stopping its execution, so it could change the nature of the
problem being looked at.

1. This would be the case for rare race conditions and other timing-related problems.

- Error messages are common when using verbose booting or when using the set -x; in the rc scripts. For these reasons (and others) it can
be difficult to understand verbose boot output and may have only limited value in debugging a problem.

2. Using the boot Command

Boot arguments may include more than one string. All argument strings are passed to the secondary booter; they are not interpreted by
OpenBoot. If any arguments are specified on the boot command line, then neither the boot-file nor the diag-file nvram variable is used. The
contents of the nvram variables are not merged with command line arguments. For example, the command

ok boot -s

ignores the settings in both boot-file and diag-file; it interprets the string -s; as arguments. Boot will not use the contents of boot-file or
diag-file.

The commands:

ok boot net

and

ok boot cdrom

have no arguments; they will use the settings in boot-file or diag-file, if they are set, as default filename and arguments and pass them to
boot. Accordingly, if boot-file is set to the 64-bit kernel filename and you attempt to boot the installation CD with boot cdrom, boot will fail if

1 of 5 12-03-2019, 00:59
Document Display https://support.oracle.com/epmos/faces/SearchDocDisplay?_adf.ctrl-stat...

the installation CD contains only a 32-bit kernel.

A. Common boot Syntax

For Sparc system:

ok boot [device-specifier] [arguments]

For x86 you have to use GRUB menu and if you want to use some boot option you have to edit the menu and put the option at the end of
the kernel line

kernel$ /platform/i86pc/multiboot -B $ZFS-BOOTFS <boot-option>

To Edit the GRUB menu see this document:

How to boot single user mode from the Grub boot loader in Solaris 10 x86 3/05 or 1/06 (Document 1008146.1)

B. Common Boot [device-specifier] disk

Boots from the alias named disk. You can view the physical device path for the disk alias by typing devalias disk; at the ok prompt, or, to
view all aliases, type devalias.

cdrom - Specifies to boot from a CD or a DVD.

net - Specifies to boot from a network boot image.

url - Specifies the location of the custom JumpStart configuration files in compressed format. See section F below for the URLs that can be
specified, syntax, and examples.

C. Common Boot [arguments]

Below is a list of the most commonly used boot command flags along with a brief explanation. Each command must be entered at the
system OK prompt level or at the end of the kernel line in the GRUB menu.

Option : Definition

-a: Ask the user for configuration information, such as where to find the system file, where to mount root, and even override the name of
the kernel itself. Default responses will be contained in square brackets ([]), and the user may simply enter to use the default response
(note that is labeled on some keyboards). To help repair a damaged /etc/system file, enter /dev/null at the prompt that asks for the
pathname of the system configuration file. See system(4).

-v: Boot with verbose messages enabled.

-s: Boot only to init level 's' Single User Mode.

All local file systems are mounted. Only a small set of essential kernel processes are left running. This mode is for administrative tasks such
as installing optional utility packages. All files are accessible and no users are logged in on the system.

-x: Do not boot in clustered mode.This option only has an effect when a version of Sun Cluster software that supports this option has been
installed.

-r: Reconfiguration boot. The system will probe all attached hardware devices and assign nodes in the file system to represent only those
devices actually found. It will also configure the logical namespace in /dev as well as the physical namespace in /devices.

See add_drv(1M) and rem_drv(1M) for additional information about maintaining device drivers.

-f: Causes Autoclient systems to flush and reinitialize the client system's local cache and read all files over the network from the client's file
server. This flag is ignored for all non-Autoclient systems.

-D: default-file

Explicitly specify the default-file. On some systems, boot chooses a dynamic default file, used when none is otherwise specified. This option
allows the default file to be explicitly set and can be useful when booting kadb(1M) since, by default, kadb loads the default-file as exported
by the boot program.

-w: This option is supposed to mount the root filesystem as read-write during boot process however it is not implemented. The ufs root

2 of 5 12-03-2019, 00:59
Document Display https://support.oracle.com/epmos/faces/SearchDocDisplay?_adf.ctrl-stat...

filesystem is mounted read-only to avoid problems during fsck. After fsck runs, it is remounted read-write.

-m: smf_options, see this doc to know what the new options are

New Boot Options in Solaris 10 and later (Document 1006328.1)

-F failsafe: this option is introduce to support ZFS boot in Sparc system kernel solaris 10 update 6 (kernel patch 137137-09).

Its primary purpose is for troubleshooting when the OS on the primary boot environment fails to boot.

-L: This allows booting from specific zfs bootable datasets on the disk.

The "boot -L" bootable zfs datasets are determined from the /rpool/boot/menu.lst file. This is common to all datasets under the rpool.
Additional entries to the menu.lst are added via the Live Upgrade process for Boot Environments(BEs).
The menu.lst file is updated during the shutdown process(init 0 | init 6) after an luactivate has been performed.

Summary of this activity:


lucreate -n BE_name
luactivate BE_name
init 0 <--------------- /rpool/boot/menu.lst updated with new BE
boot -L <--------------- discovers all Bootable datasets

ok> boot -L

Rebooting with command: boot -L


Boot device: /pci@1f,700000/scsi@2/disk@0,0:a File and args: -L

1. zfsroot

1. zfsroot-with-patch

1. Select environment to boot: [ 1 - 1 ]: 1

To boot the selected entry, invoke: boot [ root-device ] -Z rootpool/ROOT/zfsroot

-Z: this option allow to boot form a ZFS data set with has a BE

ok> boot -Z rootpool/ROOT/zfsroot

D. Network booting background

Network booting for Sparc systems, can follow either of two paths, RARP/bootparams or DHCP (Dynamic Host Configuration Protocol),
depending on the functions available in and configuration of the PROM. Machines of the sun4u kernel architecture have DHCP-capable
PROMs and boot from the network using RARP/bootparams by default. Whichever network boot path is specified, RARP or DHCP, is followed
all the way through to multi-user mode; there is no mixture of the RARP and DHCP activities.

For x86 systems the network boot is using PXE see this doc: Oracle Solaris 10 8/11 Installation Guide: Network-Based Installations (x86:
Overview of Booting and Installing Over the Network With PXE)

The boot command syntax for specifying the two methods of network booting are:

boot net:rarp
boot net:dhcp

The command:

boot net - without a rarp or dhcp specifier, invokes the default method for network booting over the network interface for which net is an
alias.

The sequence of events for network booting using RARP/bootparams and DHCP is described in the following two paragraphs.

When booting over the network using RARP/bootparams, the PROM makes a reverse ARP request and when it receives a reply, the PROM
broadcasts a TFTP request to fetch inetboot
over the network from any server that responds and executes it. inetboot also makes another reverse ARP request, then uses the
bootparams protocol (see bootparams(4)) to locate its root filesystem. It then fetches the kernel across the network using the NFS protocol
and then executes it.

When booting over the network using DHCP, the PROM broadcasts the hardware address and kernel architecture and requests an IP
address, boot parameters, and network configuration information. After a DHCP server responds and is selected (from among potentially

3 of 5 12-03-2019, 00:59
Document Display https://support.oracle.com/epmos/faces/SearchDocDisplay?_adf.ctrl-stat...

multiple servers), that server sends to the client an IP address and all other information needed to boot the client. After receipt of this
information, the client PROM downloads inetboot, loads that file into memory, and executes it. inetboot invokes the kernel, which loads the
files it needs and releases inetboot.

Startup scripts then initiate the DHCP agent (see dhcpagent(1M)), which implements the further activities of the DHCP.

Effective with Solaris 9 (12/03 release) a wide area network boot option is now available. Please check this manual to see the new WAN
boot feature:
Oracle Solaris 10 8/11 Installation Guide: Network-Based Installations (Installing Over a Wide Area Network)

E. Network boot syntax

ok boot cdrom|net - install [[url|ask]] [[dhcp]] [[nowin]]

Below is a list of the most commonly used network boot command flags along with a brief explanation. Each command must be entered at
the system OK; prompt level.

dhcp - Specifies to use a DHCP server to obtain network installation information that is needed to boot the system. If you do not specify to
use a DHCP server, the system uses the /etc/bootparams file or the name service bootparams database.

nowin - Specifies not to begin the X program. You do not need to use the X program to perform a custom JumpStart installation, so you
can reduce the installation time by using the nowin option.

F. Example syntax for custom JumpStart boot commands

Local hard disk


file://jumpstart_dir_path/compressed_config_file

NFS server
nfs://server_name|IP_address/jumpstart_dir_path/compressed_config_file

HTTP server
http://server_name|IP_address/jumpstart_dir_path/compressed_config_file&proxy_info

Examples:
boot cdrom - install file://jumpstart_dir_path/compressed_config_file
boot net - install nfs://server_name/jumpstart_dir_path/compressed_config_file

If you placed a sysidcfg file in the compressed configuration file, you must specify the IP address of the server that contains the file, as in
the following example:

boot net - install http://131.141.2.32/jumpstart/config.tar

If you saved the compressed configuration file on an HTTP server that is behind a firewall, you must use a proxy specifier during boot. You
do not need to specify an IP address for the server that contains the file. You must specify an IP address for the proxy server, as in
the following example:

boot net - install http://www.shadow.com/jumpstart/config.tar&proxy=131.141.6.151

3. Troubleshooting

A. Common Boot flag combination to use

Here are 3 common troubleshooting methods of using boot and its flags:

Ex. 1. boot disk -avs -- a=interactive, v=verbose, s=singleuser mode


Ex. 2. boot cdrom -avs -- a=interactive, v=verbose, s=singleuser mode
Ex. 3. boot net -avs -- a=interactive, v=verbose, s=singleuser mode

The first example is being run against the disk. The second example is booting to a bootable Solaris cdrom and the third example is booting
from the network. The flags -avs will let us proceed and see how far in the boot process the kernel attempts to load before it hangs.

Additional information about Solaris booting topics is available at the Oracle Solaris 10 Booting Information Center and the Oracle Solaris 11
Booting Information Center.

Still have questions about the boot command in Solaris? Consider asking them in the My Oracle Support Community (MOSC) for
Solaris Installation, Booting and Patching

4 of 5 12-03-2019, 00:59
Document Display https://support.oracle.com/epmos/faces/SearchDocDisplay?_adf.ctrl-stat...

REFERENCES

NOTE:1397794.1 - Oracle Solaris 10 Booting Resource Center


NOTE:1006328.1 - New Boot Options in Solaris 10 and Later
NOTE:1008146.1 - How to Boot Single User Mode from the Grub Boot Loader in Solaris 10 x86 3/05 or 1/06
NOTE:1397513.1 - Oracle Solaris 11 Booting Resource Center
Didn't find what you are looking for?

5 of 5 12-03-2019, 00:59

S-ar putea să vă placă și