Hardware manual

S
S
u
u
n
n
O
O
p
p
e
e
n
n
B
B
o
o
o
o
t
t
P
P
R
R
O
O
M
M
Q
Q
u
u
i
i
c
c
k
k
R
R
e
e
f
f
e
e
r
r
e
e
n
n
c
c
e
e
C
C
a
a
r
r
d
d
(Last Revised 03/01/2002)
OBP Primary tasks:
1) Test and initialize the system hardware
2) Determine the hardware configuration
3) Boot the operating system from either a mass storage device or the network
4) Provide interactiv e debugging facilities for testing hardware and software
Prompts
> Restricted Monitor Prompt. Limited options.
ok OpenBoot PROM command prompt. All OBP command access is
available in this mode.
Devices
Devices are represented in device tree format similar to the following:
/sbus@1f,0/SUNW,fas@e,8800000/sd@3,0:a
driver-name Case sensitive string consisting of 1-31 letters, digiet and
punctuation characters from the set “,._+-“
@ Must precede the address parameter
unit-address Text string representing the physical address of the device.
: Must precede the arguments parameter
device-arguments Text string to pass additional information to the device’s
software
The devalias command can be used to display the default device aliases on your
system, the nvalias command will show the aliases defined in the NVRAM and
the show -devs command will show all devices in the OpenBoot device tree.
devalias Display all current device aliases.
devalias alias Display the device path name corresponding to the alias.
devalias alias device-path Define an alias representing the device path.
If an alias with the same name already exists, the new value
supersedes the old. This alias is not persistent across reboots,
so if you reset or reboot, this alias is lost. Use nvalias to
preserv your alias.
nvalias alias device-path Store the command “devalias alias device-path” in
NVRAMRC. The alias persists until the nvunalias or
set-defaults commands are executed. Turns on
use-nvramrc?.
nvunalias alias Delete the corresponding alias from NVRAMRC.
show -disks Command particularly useful to get a list of known disk
paths from the system in a format ready to be pasted into
devalias or nvalias command string.
Running show -disks produces output similar to the following:
a) /pci@1f,4000/scsi@3/disk
b) /pci@1f,4000/ebus@1/fdthree@14,3023f0
c) /pci@1f,6000/scsi@3/disk
q) NO SELECTION
Enter Selection, q to quit:
(Here you would enter the letter of the disk you want to use. The system will
put this into a paste buffer and output the following:)
Type ^Y (Control-Y) to insert it in the command line.
(Now you don’t have to retype all of the device path when setting an alias. You
can use Control-y for most of the device path.)
Example using the path defined by letter c in the previous sample:
nvalias newdisk (Control-y)@2,0
Would setup an nvalias for newdisk which would use the device path
/pci@1f,6000/scsi@3/disk@2,0
. The trailing @2,0 adds the unit address 2,0 so the
system knows which unit address to boot from on that device path. The device
paths and unit address will vary, so this shortcut saves some typing, but it will not
do everything for you.
Help
Help is available from the ok prompt. The format is as follows:
help List main help categories
help category Show help for all commands in the category
help command Show help for individual command (when available)
Testing and Diagnostics
Several diagnostic routines and tests are available in the OpenBoot PROM. The
system can be put into diagnostic mode by setting the diag-switch? configuration
variable to true, setting the machines diagnostic switch (if available) or by a system
dependant request. The level of diagnostic output is controlled by the configuration
setting diag-level (max is the default). The default diag-device is net and this will
look for a network boot server to boot from. Booting with diag-switch? set to true
will pretty much reinstall the OS if the
diag-device is set to net and there is a
jumpstart server available and configured for the machine. (There may be
another
purpose, but information is hard to come by on the true benefits of this process.)
There are tests available for the system from the OpenBoot PROM, but not all tests
are available from all machines, Following are some of the more common tests.
probe-scsi Identify devices attached to a SCSI bus (will not work for
PCI devices – use show -devs instead)
probe-scsi-all Identify devices attached to all SCSI buses (will not work
for
PCI devices – use show -devs instead)
test device-specifier Test the device specified in device-specifier
test floppy Test the floppy drive (requires a formatted floppy be in the
drive for this to work)
test net Test the primary network controller
test scsi Test the primary SCSI controller
test-all Test all devices available with the self test capability
test /memory Test memory (Not all OpenBoot systems have this test)
watch-clock Shows ticks of the real time clock, one per second
watch-net Monitors network broadcast packets for default interface
(“.” for a good packet, “X” for a bad packet)
watch-net-all Monitors network broadcast packets for all interfaces
obdiag Invokes an optional interactive menu tool which lists all
self-test methods available on a system; provides commands
to run self tests. (More for servers and very machine
specific. Reference the specific hardware manual for your
machine to get additional information on running obdiag.)
Booting
There are numerous methods for booting your system. The boot process relies on
device aliases, input parameters and configuration options to determine where to
boot from and what options are to be used. Examples:
boot [device-specifier] [arguments]
boot Boots the system from the default boot device as specified
by
the boot-device configuration setting (seen with the printenv
command).
boot cdrom CDROM boot. Boots off the CDROM device as specified by
the cdrom device alias (seen with the devalias command).
boot disk Boots the system from the device as specified by the disk
device alias (seen with the devalias command).
boot disk2 Boots the system from the device as specified by the disk2
device alias if it exists.
boot device-path Boots from the device specified by it’s full device path.
boot floppy Floppy boot. Boot off a floppy disk if applicable.
boot net Network boot. Boots from a TFTP boot server or jumpstart
server.
boot net – install Jumpstart boot. Boot off the network jumpstart server and
install/upgrade the operating system. (NOTE: There is a
space both before and after the - . The – serves as a
placeholder argument for the command.)
boot tape Tape boot. Boots off a SCSI tape if available.
boot –a Ask me. Interactive mode prompts for the names of the
boot files. (Helpful if you need to boot off an alternate
/etc/system file after kernel t unable modifications.)
boot –D default-file Boot from default -file.
boot –f When booting an Autoclient system, forces boot program
to bypass client’s local cache and read all files over the
network from the file server.
boot –h Boot halted. Boot into a halted state (ok prompt). Interesting,
for troubleshooting boot at the lowest level.
boot –r Reconfigure boot. Boot and search for all attached devices,
then build device entries for anything which does not already
exist. Useful when new devices are added to the system.
boot –s Single user. Boots the system to run level 1.
boot –v Verbose boot. Show good debugging information.
boot –V Verbose boot. Show a little debugging information.
boot kernel/unix 32-bit boot. Boots off the 32-bit kernel explicitly.
boot kernel/sparcv9/unix 64-bit boot. Boots off the 64-bit kernel explicitly.
boot disk2 kernel/sparcv9/unix –asv Boot single-user, interactive, 64-bit
off the device defined as disk2.
Displaying System Information
Commands to display additional system related information. Not all commands
work on all platforms.
.enet-addr Display current Ethernet address
.idprom Display ID PROM contents
.traps Display a list of processor-dependent trap types
.version Display version and date of the boot PROM
(You can use prtconf –V in a shell when booted.)
.speed Display processor and bus speeds
banner Display power-on banner
firmware
-
version
Displays major/minor CPU firmware version.
show -sbus Display list of installed and probed Sbus devices
show -devs Display list of installed and probed devices
show -pci-devs Display all PCI devices.
show -disks Display a list of known disks in format for use in creating
device alias.
Miscellaneous Commands and Resets
Not all commands work on all platforms.
eject floppy Eject the floppy. (May also be eject-floppy )
eject cdrom Eject the CDROM.
sync Call the operating system to write information to
hard disk.
reset Reset entire system (similar to performing a power cycle)
reset-all Reset entire system (similar to performing a power cycle)
set-defaults Reset all the PROM settings to the factory defaults
Emergency Keyboard Commands
These are key sequences recognized by the system to perform predetermined
actions at boot time or during normal operation.
Stop Bypass POST. This command does not depend on
security-mode.
Stop-A Abort. (This will also stop a running system. You can
resume normal operations if you enter go at the prompt.
Enter anything else and you will stay halted.)
Stop-D Enter diagnost ic mode (set diag-switch? to true)
Stop-F Enter Forth on TTYA instead of probing. Use fxedit
to continue with the initialization sequence.
Stop-N Reset NVRAM contents to default values.
NVRAMRC Commands
The NVRAMRC can be accessed with some simple editing commands. Following
are a basic set of these commands for entering and manipulating information in the
NVRAMRC.
nvalias alias device-path Store the command “devalias alias device-path” in
NVRAMRC. The alias persists until the nvunalias or
set-defaults commands are executed. Turns on
use-nvramrc?.
nvedit Enter the NVRAMRC editor. If data remains in the
temporary buffer from a previous nvedit session, resume
editing those previous contents. If not, read the contents of
NVRAMRC into the temporary buffer and begin editing it.
nvquit Discard the contents of the temporary buffer without writing
it to NVRAMRC.
nvrecover Recover the contents of NVRAMRC if they have been lost
as a result of the execution of set -defaults, then enter the
editor with nvedit.
nvrun Execute the contents of the temporary buffer.
nvstore Copy the contents of the temporary buffer to NVRAMRC
then discard the contents of the temporary buffer.
nvunalias alias Delete the corresponding alias from NVRAMRC.
setenv use-nvramrc? true Enable the NVRAMRC.
NVRAMRC Editor Commands
Control-b Moves backward one character.
Escape b Moves backward one word.
Control-f Moves forward one character.
Escape f Moves forward one word.
Control-a Moves backward to beginning of line.
Control-e Moves forward to the end of the line.
Control-n Moves to the next line of the script edit buffer.
Control-p Moves to the previous line of the script edit buffer.
Return (Enter) Inserts a new line at the cursor position and advances to the
next line.
Control-o Inserts a newline at the cursor position and stays on the
current line.
Control-k Erases from the cursor position to the end of the line, storing
the erased characters in a save buffer. If at the end of the line
joins t he next line to the current.
Delete Erases the previous character.
Backspace Erases the previous character.
Control-h Erases the previous character.
Escape h Erases from beginning of word to just before the cursor,
storing erased characters in the save buffer.
Control-w Erases from beginning of word to just before the cursor,
storing erased characters in a save buffer.
Control-d Erases the next character.
Escape d Erases from the cursor to the end of the word, storing the
erased characters in a save buffer.
Control-u Erases the entire line, storing the erased characters in a save
buffer.
Control-y Inserts the contents of the save buffer before the cursor.
Control-q Quotes the next character (allows you to insert control chars)
Control-r Retypes the line.
Control-l Displays the entire contents of the editing buffer.
Control-c Exits the script editor, returning to the OpenBoot command
interpreter. The temporary buffer is preserved, but is not
written back to the script. (Use nvstore to write it back.)
Setting Security Variables
The NVRAM security variables control the set of operations users are allowed to
perform from the OpenBoot PROM user interface and can be set with the
following:
setenv security -password password Sets the PROM security password to
what is specified in the password field. This
password must be between zero and eight
characters (any characters after the eight are
ignored) and the password takes affect
immediately – no reset is required. Once set, if
you enter an incorrect password there is a delay
of around 10 seconds before you are able to try
again and the security -#badlogins counter is
incremented. The password is never shown as
you type it or with printenv .
printenv security-mode Display the current mode for the PROM security.
setenv security -mode mode Where mode can be none, command, or full.
none No password required (default).
command All commands except for boot and go
require the password.
full All commands except for go require
the password.
?? CAUTION: You must set your security password before setting the
security mode. (The password is blank by default, but if already set by
someone, you won’t know what it is and will not be able to disable it.)
If you forget the security password, you may not be able to use your
system and must call the vendor for a replacement PROM.
printenv security-#badlogins Display the number of failed security password
attempts (since any reset of the counter).
setenv security -#badlogins number Reset the security -#badlogins
counter. This counter keeps track of the number
of failed security password attempts.
Changing the Power-on Banner
The banner information seen from power-on can be modified with the oem-banner
and oem-banner? configuration settings. By default the banner shows information
like processor type and speed, PROM revision, memory, hostid and Ethernet
address.
banner Display the power-on banner.
setenv oem-banner string Set the power-on banner to string.
setenv oem-banner? true Activate the custom banner.
setenv oem-banner? false Restore the original system power-on banner.
Setting and Checking NVRAM Configuration Variables
These variables determine startup and communication characteristics. They are set
and checked with the Cshell-style setenv and printenv commands. Following is a
list of commands which are available from the OpenBoot PROM ok command
prompt (as opposed to the OpenBoot PROM Restricted mode prompt > ):
printenv Display current variables and current default values.
printenv variable Shows the current value of the named variable.
setenv variable value Set variable to the given decimal or text value.
set-default variable Reset the value of variable to the factory default.
set-defaults Reset variable values to the factory defaults.
password Set security-password
Some variables can be checked or set while the system is up and running by using
the eeprom command (/usr/sbin/eeprom in Solaris 8). Not all variables can be
modified from the eeprom command and EEPROM contents may only be altered
by super user.
eeprom Display current variables and values from the EEPROM.
eeprom variable=value Set variable to the given decimal or text value.
Note: If the variable has special characters like # or ?, you
should enclose the variable in double quotes.
(Example: eeprom “auto-boot?”=true )
You will notice more variables and information is available from the ok prompt
than the eeprom command displays. Also, not all device information will be
displayed from the eeprom command. You may see “data not available” for those
settings which can not be viewed from the booted/running state via eeprom. You
may need to shut down to be able to change or view this information.