Sun OpenBoot PROM Quick Reference Card
Sun OpenBoot PROM Quick Reference Card
Q Qu ui ic ck k R Re ef fe er re en nc ce e C Ca ar rd d
(Last Revised 03/01/2002)
OBP Primary tasks:
1) Test and initialize the systemhardware
2) Determine the hardware configuration
3) Boot the operating systemfromeither 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 PROMcommand 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 devices
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 NVRAMand
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 newvalue
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 fromNVRAMRC.
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 systemwill
put this into a paste buffer and output the following:)
Type ^Y (Control-Y) to insert it in the command line.
(Now you dont 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
systemknows which unit address to boot fromon 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 fromthe 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
systemcan 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 defaultdiag-device is net and this will
look for a network boot server to boot from. Booting withdiag-switch?set to true
will pretty much reinstall the OS if the diag-device is set tonet 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 systemfromthe OpenBoot PROM, but not all tests
are available fromall 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 serversand 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 systemfromthe default boot device as specified
by
the boot-device configuration setting (seen with the printenv
command).
boot cdrom CDROMboot. Boots off the CDROMdevice as specified by
the cdrom device alias (seen with the devalias command).
boot disk Boots the systemfromthe device as specified by the disk
device alias (seen with the devalias command).
boot disk2 Boots the systemfromthe device as specified by the disk2
device alias if it exists.
boot device-path Boots fromthe device specified by its full device path.
boot floppy Floppy boot. Boot off a floppy disk if applicable.
boot net Network boot. Boots froma 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 Ddefault-file Boot from default -file.
boot f When booting an Autoclient system, forces boot program
to bypass clients local cache and read all files over the
network fromthe 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 SystemInformation
Commands to display additional systemrelated 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 systemto 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 PROMsettings to the factory defaults
Emergency Keyboard Commands
These are key sequences recognized by the systemto performpredetermined
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 TTYAinstead of probing. Use fxedit
to continue with the initialization sequence.
Stop-N Reset NVRAMcontents to default values.
NVRAMRCCommands
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 froma 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 fromNVRAMRC.
setenv use-nvramrc? true Enable the NVRAMRC.
NVRAMRCEditor 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 NVRAMsecurity variables control the set of operations users are allowed to
performfromthe OpenBoot PROMuser interface and can be set with the
following:
setenv security -password password Sets the PROMsecurity 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 bootand 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 wont 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
systemand 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 frompower-on can be modified with the oem-banner
and oem-banner? configuration settings. By default the banner shows information
like processor type and speed, PROMrevision, 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 custombanner.
setenv oem-banner? false Restore the original system power-on banner.
Setting and Checking NVRAMConfiguration 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 fromthe OpenBoot PROM ok command
prompt (as opposed to the OpenBoot PROMRestricted 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 systemis up and running by using
the eeprom command (/usr/sbin/eepromin Solaris 8). Not all variables can be
modified fromthe eepromcommand and EEPROMcontents may only be altered
by super user.
eeprom Display current variables and values fromthe 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: eepromauto-boot?=true )
You will notice more variables and information is available fromthe ok prompt
than the eepromcommand displays. Also, not all device information will be
displayed from the eepromcommand. 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.
OBP Variables
(Following is a partial list of OBP configuration variables. These vary based on
machine types and PROM versions.)
Variable Typical
Default
Description
asr-disable (no default) Auto System Recovery hard disable
subsystem component. Options are
available fromthe list generated by
running asr-disable with no arguments.
asr-disable-list (no default) Auto System Recovery list of device
tree paths separated by spaces which
will be ignored at boot due to a failed
or disabled status. (Soft deconfigure)
asr-enable (no default) Auto SystemRecovery hard enable
subsystem component. Options are
available fromthe list generated by
running asr-enable with no arguments.
auto-boot? true If true, boot automatically after power
on or reset.
auto-boot-on-error? true Controls whether the system will
attempt a degraded boot when a
subsystemfailure is detected. Both the
auto-boot? and auto-boot-on-error?
switches must be set to true to enable a
degraded boot.
ansi-terminal? true Configuration variable used to control
the behavior of the terminal emulator.
The value false makes the terminal
emulator stop interpreting ANSI
escape sequences, instead just
echoing them to the output device.
boot-command boot Command executed if auto-boot? Is
true.
boot-device disk net Device from which to boot.
boot-file (empty
string)
Arguments passed to booted program.
comX-noprobe (no default) Where X is the number of the serial
port, prevents device probe on serial
port X.
diag-continue? false If true, run all subtests even if an error
occurs. If false, stop diagnostics at the
first error.
diag-device net Diagnostic boot source device.
diag-file (empty
string)
Arguments passwd to booted program
in diagnostic mode.
diag-level max Level of diagnostic information.
(options: off, min, med or max)
diag-passes 1 Repeats each test the number of times
specified by n. Works with the test,
except, and test -all commands.
diag-switch? false If true, run in diagnostic mode.
diag-targets none none-Runs internal tests only, no I/O
testing.
iopath-Extends testing to external
device interfaces (connectors/cables).
media-Extends testing to external
devices and media, if present.
device-Invokes built-in self-test (BIST)
on PCI cards and external devices.
loopback-Runs external loopback tests
on the parallel, serial, keyboard, mouse
and TPE ports.
loopback2-Runs an external loopback
test on MII port.
loopbacks-Runs external loopback tests
on the parallel, serial, keyboard, mouse,
TPE, and MII ports.
nomem-Performs tests without testing
system memory.
diag-trigger power-reset power-reset-Runs diagnostics only on
power-on resets.
error-reset-Runs diagnostics only on
power-on resets, fatal hardware errors,
and watchdog reset events.
soft-reset-Runs diagnostics on all resets
(except XIR).
diag-verbosity 0 0-Prints one line that indicates the
device being tested and its pass/fail
status.
1-Prints more detailed test status, which
varies in content from test to test.
2-Prints subtest names.
4-Prints debug messages.
8-Prints back trace of callers on error.
disk-led-assoc 0 Disk slot association setting which can
be used to set up the proper
associations between disk slot numbers
and the physical and logical device
names used to identify the disk drives
installed in each slot.
Ex: setenv disk-led-assoc 0 x y
where: x is an integer identifying the
rear panel PCI slot number where the
lower UltraSCSI controller is installed
and y is an integer identifying the rear
panel PCI slot number where the upper
UltraSCSI controller is installed.
env-monitor enabled enabled-In response to an over
temperature condit ion or a fan failure in
either the CPU or disk fan tray, OBP
issues a warning and automatically
shuts down the system after 30 seconds.
advise- OBP issues a warning only,
without shutting down the system.
disable- OBP takes no action at all;
environmental monitoring at the OBP
level is disabled.
error-reset -recovery boot Recovery action after an error reset
CPU trap (options: none, sync, or boot)
fcode-debug? false If true, include name fields for plug-in
Fcodes.
hardware-revision (no default) Variable t o store hardware revision
info.
input-device keyboard Console input device (usually
keyboard, ttya, or ttyb).
keyboard-click? false If true, enable keyboard click.
keymap (no default) Keymap for customkeyboard.
last-hardware-update (no default) System update information.
load-base 16384 Default load address for client
programs.
local-mac-address? false If true, network devices use their own
MAC addresses.
memory-interleave auto auto-Determines best memory
interleaving based on number of slots
andmemory types in those slots.
max-size-
max-interleave-Enables the maximum
level of interleaving possible for a
given memory configuration, but some
memory capacity remains unused if
DIMMs of different capacities are
installed.
1-Disables interleaving; uses all of the
available memory capacity.
2-Forces two-way interleaving.
4-Forces four-way interleaving.
mfg-mode off Manufacturing mode argument for
POST. Possible values include off or
chamber. The value is passed as an
argument to POST.
mfg-switch? false If true, repeat systemself-test until
interrupted with STOP-A.
nvramrc (empty) Contents of NVRAMRC.
oem-banner (empty
string)
Custom OEMbanner (enabled by oem-
banner? true).
oem-banner? false If true, use customOEMbanner.
oem-logo (no default) Byte array custom OEMlogo (else use
Sun logo).
oem-logo? false If true, use customOEMlogo (enabled
by oem-logo? true).
output -device screen Console output device (usually screen,
ttya, or ttyb).
pci0-probe-list 1,3,2,4 0-UPA-PCI bus bridge (not probed)
1-EBus/Ethernet interface (always
probed, never included in probe list)
probed, never included in probe list)
2- On-board SCSI controller for
removable media devices and external
SCSI port
3- On-board SCSI controller for 4-slot
UltraSCSI backplane
4- Back panel PCI slot 10
pci-slot-skip-list none Used to exclude back panel slots from
the PCI probe list. Values are slot
numbers separated by commas or none.
pcia-probe-list 1, 2, 3, 4 Controls probe order of plug-in devices
under pcia.
pcib-probe-list 1, 2, 3 Controls probe order of plug-in devices
under pcib.
#power-cycles (no default) Counter for number of system power
cycles performed.
redmode-reboot? true Specify true to reboot after a redmode
reset trap. (Enterprise 10000 only)
redmode-sync? false Specify true to invoke OpenBoot
PROM's sync word after a redmode
reset trap. (Enterprise 10000 only)
sbus-probe-list 0123 Which Sbus slots to probe and in what
order.
screen-#columns 80 Number of on-screen columns
(characters/line).
screen-#rows 34 Number of on-screen rows (lines).
scsi-initiator-id 7 SCSI bus address of host adapter, range
0-f.
sd-targets 31204567 Map SCSI disk units which means that
unit 0 maps to target 3, unit 1 maps to
target 1, and so on. (OBP 1.x only).
security-#badlogins (no default) Number of incorrect security password
attempts.
security-mode none Firmware security level (options are
none, command, or full)
security-password (no default) Firmware security password (never
displayed)
selftest -#megs 1 Megabytes of RAMto test. Ignored if
diag-switch? is true.
sir-sync? false Specify true to invoke OpenBoot
PROM's sync word after a software-
initiated reset (SIR) trap. Defaults to
false. (Sun Enterprise 10000 only.)
skip-vme-loopback? false If true, POST does not do VMEbus
loopback tests.
sunmon-compat? false If true, display Restricted Monitor
prompt (>).
system-board-date (no default) Variable for system board date
information.
system-board-serial# (no default) Variable for system board serial
number information.
testarea 0 One-byte scratch field, available for
read/write test.
tpe-link-test? true Enable10baseT link test for built-in
twisted pair Ethernet.
ttya-mode 9600,8,n,1,- TTYA
(baud,#bits,parity,#stop,handshake).
Options are:
baud
110,300,1200,2400,4800,9600,38400
#bits 5,6,7,8
parity n (none), e (even), o (odd)
#stop 1 (1), . (1.5), 2 (2)
handshake -> - (none),
h(hardware:rts/cts),
s(software:xon/xoff)
ttyb-mode 9600,8,n,1,- TTYB
(baud,#bits,parity,#stop,handshake).
Options are:
baud
110,300,1200,2400,4800,9600,38400
#bits 5,6,7,8
parity n (none), e (even), o (odd)
#stop 1 (1), . (1.5), 2 (2)
handshake -> - (none),
h(hardware:rts/cts),
s(software:xon/xoff)
ttya-ignore-cd true If true, OS ignores TTYA carrier-
detect.
ttyb-ignore-cd true If true, OS ignores TTYB carrier-
detect.
ttya-rts-dtr-off false If true, OS does not assert DTR and
RTS on TTYA.
ttyb-rts-dtr-off false If true, OS does not assert DTR and
RTS on TTYB.
upa-port -skip-list (no default) CPU=0-3=Four plug-in slots
UPA-PCI bridge=4,6,1f=Soldered on
motherboard
UPAgraphics frame buffer=1d,
1e=Two plug-in slots
Ex: setenv upa-port-skip-list 4,1d
use-nvramrc? false If true, execute commands in
NVRAMRC during system start-up.
watchdog-reboot? false If true, reboot after watchdog reset.
watchdog-sync? false Specify true to invoke OpenBoot
PROM's sync word after a watchdog
reset trap. ( Sun Enterprise 10000 only.)
Troubleshooting
Symptom Possible Cause Recommended Action
Hardware failure Check for power indicator lights on
monitor. If yellow, there is no sync.
Try a new monitor or a different
cable if possible.
Keyboard not
attached
If the keyboard is not attached,
output goes to TTYA instead. Power
down, plug in or reseat keyboard,
power back on. Try new keyboard.
output -device is
set to TTYA or
TTYB
NVRAMparameter output-device is
set to ttya or ttyb instead of screen.
Connect terminal to TTYA and reset
the system. After getting to the ok
prompt on the terminal, type:
screen output to send output to the
frame buffer. Use setenv to change
the default display device, if needed.
Blank screen
System has
multiple frame
buffers
Wrong frame buffer is being used as
the console device. Connect to any
other frame buffer/graphics cards
and see if signal is going there.
Defined by output-device variable.
diag-switch?
NVRAMparam
is set to true
Interrupt the booting process with
Stop-A and run:
setenv diag-switch? false then
boot.
System boots from
net instead of disk
boot-device
NVRAMparam
set to net not disk
Interrupt the booting process with
Stop-A and run:
setenv boot-device disk and boot
Ensure disk alias is set correctly.
Fails with the
message: The file
just loaded does
not appear to be
executable
The boot block is missing or
corrupted. Install a newboot block
or Older SPARC systems dont like
root partition over 2 gig. Reload
systemwith root partition of 1.8 gig
or smaller size.
System will not
boot fromdisk
Fails with the
message: Can't
open boot device
Disk may be powered down or
unavailable/failed. Listen to see if
disk is spinning. Check cablin g or
connection, reseat disk, or try
another disk or older SPARC
systems dont like root partitions
over 2 gig. Reload system with root
partition of 1.8 gig or smaller size.
SCSI problems or
errors
Duplicate SCSI
target number
settings or device
hardware
problems
Unplug all but one disk. Run probe-
scsi and note target number and unit
number. Repeat steps for remaining
disks looking for errors or ID
conflicts. On ID conflict, change the
target number of the offending disk
to be one of the unused target
numbers or remove/replace if
hardware problem.
Helpful Web Links
http://docs.sun.com- Sun Microsystems Online Documentation Site
http://sunsolve.sun.com - Sun Microsystems Online Help Resource Site
http://searchsolaris.com- Sun Oriented Website
and of course theres always http://google.com- Great Web Search Site