Understand Boot Command
Boot arguments may include more than one string. All argument strings are passed to the secondary boot program; 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
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
ok boot [device-specifier] [arguments]
This behavior is found on most OpenBoot 2.x and 3.x based systems. Note that differences may occur on some platforms.
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. For a system with an older EEPROM , replace cdrom with sd(0,6,2) to boot from the system’s CD-ROM. Systems with proms this old do not support Solaris versions that are contained on DVD media.
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.
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.
-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.
-m smf_options . This boot option is new in Solaris 10 and works in conjunction with the Solaris 10 service management facility.
D. Network booting background
Network booting 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 ROMs 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. The boot command syntax for specifying the two methods of network booting are:
Ok> boot net:rarp
OK> boot net:dhcp
OK> 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 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, which implements the further activities of the DHCP.
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.
ask :Specifies that the installation program prompt you to type the location of the compressed configuration file after the system boots and connects to the network. If you bypass the prompt by pressing Return, the installation program interactively configures the network parameters. The installation program then prompts you for the location of the compressed configuration file. If you bypass the prompt again by pressing Return, the Solaris suninstall program begins.
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
Ok> boot cdrom – install File://jumpstart_dir_path/compressed_config_file
Ok> boot net – install nfs://server/jumpstart_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:
ok> boot net – install http://188.8.131.52/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:
ok> boot net – install http://www.shadow.co/config.tar&proxy=184.108.40.206