The OpenBoot PROM

Team-Fly    

Solaris™ Operating Environment Boot Camp
By David Rhodes, Dominic Butler
Table of Contents
Chapter 2.  Booting and Halting the System


We've mentioned that when a Solaris server is switched on, we are presented with the OK prompt of the PROM, or monitor program, as it is also known. Its purpose is to enable us to:

  • Identify basic system information

  • Set the boot device

  • Boot the system from local disk

  • Boot the system across the network

  • Perform hardware checks

  • Modify Electrically Erasable/Programmable ROM (EEPROM) parameters

  • Recover from a hung system

Since revision 2, the Solaris PROM has been called the OpenBoot PROM (OBP). The aim of this was to end up with a firmware that could probe hardware devices installed within the system and automatically download the required device driver from the device into the PROM.

The PROM actually consists of a chip on the system board that contains the following four sections:

  • Power on self-test (POST) diagnostics code

  • Basic device drivers

  • User interface (or monitor program)

  • Default parameter values

On older systems the PROM chip had to be replaced to upgrade it to a newer revision, but in newer systems (PROM revision 3 and above) the chip is permanently fixed and is, instead, flash upgradeable. Apart from the ability to flash-upgrade the entire PROM code, no changes can be made to any of the code or parameters in it. The PROM has an associated chip called the Non-Volatile RAM (NVRAM). This works in conjunction with the PROM and holds any changes you make to any of its parameters.

The NVRAM has its own battery, so it can retain data while the system is powered off. It holds the following information:

  • System host ID

  • Current date and time

  • System Ethernet address (for the onboard Ethernet card)

  • EEPROM values

The system host ID is a unique code assigned to each Sun server and is often used for licensing software. If you ever need to replace a system board, you should ensure that you move the NVRAM chip from the old board to the new one.

If any of the default parameters of the PROM are changed, the changes are stored in the EEPROM section of the NVRAM chip.

Table 2.7 summarizes the most common of the PROM commands.

Table 2.7. PROM Commands

Command

Description

banner

This will display system information including PROM revision, memory installed, Ethernet address, and host ID.

Boot

Start loading the operating system from the default device, or the device specified as an argument.

printenv

This command will display all the PROM environment variables along with their current settings, if no parameter is supplied; otherwise, it will display the value of the parameter supplied (e.g., printenv boot-device).

setenv variable value

This will assign the value specified to the PROM environment variable specified.

set-defaults

Typing this will revert the PROM to the original factory configuration settings.

Reset

This command will store any changed PROM variables in the NVRAM and reboot the system.

Probe-scsi

This will probe for Small Computer System Interface (SCSI) devices on the onboard SCSI controller and report all devices that can be seen.

Probe-scsi-all

This command also probes for SCSI devices, but will look on the Sbus SCSI controllers as well as the onboard controller. This will also highlight most SCSI-related problems (such as duplicate SCSI IDs). See Chapter 17, "Adding SCSI Devices."

Probe-ide

This can be used instead of probe-scsi on IDE-based Sun servers.

Help

This will display a list of all available PROM commands and display help on individual commands.

See

This command will display a breakdown of the actions performed by the OBP command supplied as an argument.

Displaying System Information

The output from the banner command is displayed automatically during bootup, but it can be useful to run it manually if you are not quick enough to make a note of the information you require before it moves off the screen. It is often used to find how much memory is installed in a Sun server or to check the PROM revision level:

 ok banner SPARCstation LX, keyboard present ROM Rev. 2.10 96 MB memory installed, Serial #7345324 Ethernet address 8:0:20:18:c9:6c, Host ID 807014ac. ok 

The PROM revision level in this example shows a major version of 2 so it is not flash upgradeable.

The Boot Command

At the start of this chapter, we saw that we can simply type "boot" at the OK prompt to bring the system up to the run level specified as the default in the /etc/inittab file.

Typing "boot" on its own will cause the PROM to start loading Solaris from the default boot device, which is stored in the boot-device variable. If you wish to boot from an alternative device, you can type that instead. If you wanted to boot from a CD, you could enter "boot cdrom." You could even choose to boot across the network from another Solaris server by typing "boot net." The latter example will only work if at least one other server on the network has been set up to perform a remote boot of this server. You might also have a spare disk in your system with a Solaris image on it, so if your main disk fails you can boot the system by specifying that device as the parameter to boot.

The boot command can also take a number of options to alter the way in which it loads Solaris. These are summarized in Table 2.8.

Table 2.8. Boot Summary

Command

Description

Boot

Load Solaris from the default boot-device.

boot alternate-device

Load Solaris from the device alternate-device. If booting across the network (boot net) the local ethernet address must have been registered with the host from which we want to boot.

boot -r

The "-r" option tells Solaris to perform a reconfigure boot, which will cause all devices to be reprobed and the /devices and /dev entries are recreated.

boot -a

This option will perform an interactive boot procedure. You will be prompted to enter the root and swap devices and the path names of various system files. Default responses are provided to each question.

boot -s

This will bring the system up to single-user mode, rather than the run level defined as the default in /etc/inittab.

boot -v

This option to boot will cause the system to boot in verbose mode. You will be given a lot more information about what is happening as the machine comes up.

Displaying and Changing PROM Parameters

The current value of all PROM parameters can be displayed using the OpenBoot PROM printenv command:

 ok printenv Variable Name             Value                Default Value tpe-link-test?            true                 true output-device             screen               screen input-device              keyboard             keyboard sbus-probe-list    40123               40123 keyboard-click?    false               false keymap ttyb-rts-dtr-off   false               false ttyb-ignore-cd            true                 true ttya-rts-dtr-off   false               false ttya-ignore-cd            false                false ttyb-mode          9600,8,n,1,-        9600,8,n,1,-ttya- ttya-mode          9600,8,n,1,-        9600,8,n,1,-ttya- fcode-debug?               false                false diag-file diag-device        net                 net boot-file boot-device        disk                disk auto-boot                  true                 true scsi-initiator-id          7                    7 <lines removed for clarity> More [<space>,<cr>,q] ? q 

In this output segment, the first column shows the parameter name, the second column shows the current parameter value, and the third column shows the default value. This allows you to see which parameters have been changed and what the values will go to should you set them all back to their factory defaults using the set-defaults command.

To find out the current boot-device we would use the printenv command as follows:

 ok printenv boot-device boot-device disk ok 

If we wanted to change the boot-device (for example, to boot over the network) we would use the setenv command to set the new boot-device and the reset command to store the new setting:

 ok setenv boot-device net ok printenv boot-device boot-device net ok reset ok 

You can also display and change the value of PROM parameters from the shell by using the eeprom command:

 hydrogen# eeprom 'auto-boot?' auto-boot?=true hydrogen# eeprom 'auto-boot?=false' hydrogen# eeprom | grep auto auto-boot?=false hydrogen# 

When you change parameters using eeprom, you don't need to issue any further commands to save the value. The new value you have assigned will remain, even across reboots, until you next change it.

The "auto-boot?" parameter is an example of a Boolean PROM parameter; it can only be set to true or false. Boolean parameters are identifiable by the fact that they all end in a question mark character (?). The effect of setting the "auto-boot?" parameter to false is that when the server is next switched on or rebooted it will remain at the OpenBoot PROM OK prompt rather than automatically starting to boot from the default boot-device. It can be useful to do this if your server is having a problem causing it to crash and you want the system to remain at the OpenBoot PROM following a crash to attempt to gather some diagnostic information. By default a server will attempt to reload the operating system following a system crash. You may have noted that we quoted the above example. This was to hide the question mark character from the shell.

Getting to the OpenBoot PROM

It is also possible to get to the PROM while Solaris is running by pressing the <STOP> and letter <A> keys together on the system console (on older console keyboards the <STOP> key is marked as <L1>). If you arrive at the PROM this way, then you can return immediately to the state Solaris was in by typing the command "go." If you wish to reboot the system at this point, it is recommended that you first flush the disk buffers by typing "sync." If you wish to enter any diagnostic commands after pressing <STOP-A> while Solaris was running, you should first enter the reset command, which will clear any values left in the registers and buffers.

The <STOP> key can also be used in conjunction with a couple of other keys to help if the system appears to hang or get into difficulty. It should be noted that these can help resolve certain system problems, but are definitely not for everyday use. Table 2.9 summarizes the effect of the three available key combinations.

Table 2.9. <STOP> Key Sequences

Command

Description

<STOP-A>

If this key sequence is pressed during bootup or at any time while Solaris is running, you will be taken to the PROM OK prompt. Typing "go" will cause the system to resume from the point it was at when you pressed <STOP-A>.

<STOP-D>

This sequence will cause the NVRAM to switch to diagnostics mode and run a more extensive version of the power on a start-up test than is normally performed.

<STOP-N>

It is possible for a Solaris system to fail to boot due to incorrect NVRAM settings. If you suspect one of your systems is failing to boot for this reason, pressing STOP-N> while the power is turned on will set all the NVRAM parameters back to their default values.

In summary, the OpenBoot PROM provides a number of useful features that enable you to alter the configuration of many system attributes and also perform some useful diagnostics.


    Team-Fly    
    Top
     



    Solaris Operating Environment Boot Camp
    Solaris Operating Environment Boot Camp
    ISBN: 0130342874
    EAN: 2147483647
    Year: 2002
    Pages: 301

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net