Sie sind auf Seite 1von 5

9/13/12

Document Display

Basics of using the "boot" Command [ID 1006057.1]


Modified: Jul 31, 2012 Type: HOWTO Migrated ID: 208446 Status: PUBLISHED Priority: 3

Applies to:
Solaris SPARC Operating System - Version: 8.0 to 11 11/11 - Release: 8.0 to 11.0 Solaris x64/x86 Operating System - Version: 8 6/00 U1 to 11 11/11 [Release: 8.0 to 11.0] 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 diagfile nvram variable is used. The contents of the nvram variables are not merged with command line arguments. For example, the command

o bo k ot 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 the installation CD contains only a 32-bit kernel. A. Common boot Syntax For Sparc system:

o bo [eieseiir [ruet] k ot dvc-pcfe] agmns

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
https://support.oracle.com/epmos/faces/ui/km/SearchDocDisplay.jspx?_adf.ctrl-state=o3b53xn10_127 1/5

9/13/12

at the end of the kernel line

Document Display

kre$/ltomi6cmliot- $F-OTS<ototo> enl pafr/8p/utbo B ZSBOF bo-pin

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,

https://support.oracle.com/epmos/faces/ui/km/SearchDocDisplay.jspx?_adf.ctrl-state=o3b53xn10_127

2/5

9/13/12

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 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) failsafe: this option is introduce to support ZFS boot in Sparc system kernel solaris 10 update 6 (kernel patch 137137-09) -L: this option prints the BE availables in the system;

Document Display

o>bo k ot L Rboigwt cmad bo eotn ih omn: ot L Bo dvc:/c@f700/ci2ds@,: Fl adag:ot eie pi1,000ss@/ik00a ie n rs L

1. z s o t fro 1. z s o t w t - a c fro-ihpth 1. S l c e v r n e t t b o : [ 1 - 1 ] 1 eet niomn o ot : T bo teslce ety ivk:bo [ro-eie]- ropo/OTzsot o ot h eetd nr, noe ot otdvc Z otolRO/fro

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

o>bo - ropo/OTzsot k ot Z otolRO/fro


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:

bo ntrr ot e:ap bo ntdc ot e:hp

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.

https://support.oracle.com/epmos/faces/ui/km/SearchDocDisplay.jspx?_adf.ctrl-state=o3b53xn10_127

3/5

9/13/12

which net is an alias.

Document Display

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 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: &nbsp;&nbsp;&nbsp; Oracle Solaris 10 8/11 Installation Guide: Network-Based Installations (Installing Over a Wide Area Network) E. Network boot syntax

o bo crmnt-isal[ulak][dc] [nwn] k ot do|e ntl [r|s] [hp] [oi]

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 https://support.oracle.com/epmos/faces/ui/km/SearchDocDisplay.jspx?_adf.ctrl-state=o3b53xn10_127

4/5

9/13/12

Document Display

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:

E.1 bo ds -v - aitrcie vvroe ssnlue md x . ot ik as - =neatv, =ebs, =igesr oe E.2 bo crm-v - aitrcie vvroe ssnlue md x . ot do as - =neatv, =ebs, =igesr oe E.3 bo nt-v - aitrcie vvroe ssnlue md x . ot e as - =neatv, =ebs, =igesr oe

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 (Document 1397794.1) and the Oracle Solaris 11 Booting Information Center (Document 1397513.1)

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

https://support.oracle.com/epmos/faces/ui/km/SearchDocDisplay.jspx?_adf.ctrl-state=o3b53xn10_127

5/5

Das könnte Ihnen auch gefallen