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

The command:
     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

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=



I have started unixadminschool.com ( aka gurkulindia.com) in 2009 as my own personal reference blog, and later sometime i have realized that my leanings might be helpful for other unixadmins if I manage my knowledge-base in more user friendly format. And the result is today's' unixadminschool.com. You can connect me at - https://www.linkedin.com/in/unixadminschool/

4 Responses

  1. Viswanadh says:

    Mention “ok> boot disk0 -F failsafe” as well. It is also quite useful.

    • Gurkulindia Gurkulindia says:

      @Viswanadh – Thanks for the input. I have to extend this post to include all the boot parameters which were introduced in solaris 10

  1. September 16, 2015

    […] Read – Understand Boot Command […]

  2. September 18, 2015

    […] Read – Understand Boot Command […]

What is in your mind, about this post ? Leave a Reply

  Our next learning article is ready, subscribe it in your email

What is your Learning Goal for Next Six Months ? Talk to us