The OpenBoot PROM (OBP) Reference provides a list of useful OBP commands that can help when booting, configuring and performing diagnostics upon Sun SPARC hardware and clones.
- 1 About this Document
- 2 Entering OBP
- 3 Basic System Commands
- 4 Environment Variables and Device Aliases
- 5 Diagnostics
- 6 References
- 7 Acknowledgements
About this Document
This document provides a list of useful OBP commands that can be helpful when booting, configuring and performing diagnostics upon Sun SPARC hardware and clones.
Note that not all commands are available on all PROM versions. In particular, sun4c systems have a different input mode, and some JavaStation models are missing a lot of OBP functionality.
OBP is somewhat inconsistent when it comes to command names. Sometimes hyphens are used to seperate words, sometimes they are not. Some commands which display information start with or contain a dot (this is a FORTH convention).
The terms "OBP", "OpenBoot PROM" and "PROM" are used interchangably in this document.
Systems with Sun Keyboards
On regular Sun systems (and clones which use Sun keyboards), press
Stop+A when the system boots to enter OBP. The
Stop key is the top left key on the extra block of keys on the left hand side of the keyboards (on really old systems it might be marked
Stop+N keyboard combination at boot will reset many systems to the default PROM settings.
Stop+D will enable diagnostics on some boards.
Over Serial Console
To enter OBP over serial console, send a break. In minicom, do this by pressing
ctrl+A F . In xc, use
ctrl+A B .
Systems with Non-Sun (PC Style) Keyboards
On systems with PC-style keyboards (such as JavaStations and some Ultra clones),
alt+ctrl+break is generally used.
Note that on the JavaStation JK,
ctrl+break will restart the box rather than enter PROM. To get at OBP, you will need to set jumper J1300 pins 7-8 on the mainboard.
Basic System Commands
Halting and Restarting
power-off command will halt the box and turn off power. This command is sometimes screwy on Ultra5/10 systems.
reset command will perform a soft reset. If diagnostics are enabled, they will not be rerun. In some documents, this command is refered to as
boot command boots the system. A parameter may be provided to override the default boot device -- this can be a full device name or a device alias such as
net . Any additional arguments are passed to the bootloader or operating system.
PROM and System Information
.version command will show the OBP version.
banner command will show the system information banner.
.speed command will show bus speeds.
show-devs command will give a list of devices available to the system.
probe-scsi command will show internal SCSI devices available to the system. The
probe-scsi-all command will show both internal and external devices on every SCSI interface. After running either of these commands, you must issue a
reset-all before trying to boot an operating system.
probe-ide command is also available on IDE-based systems.
Environment Variables and Device Aliases
Getting and Setting Environment Variables
printenv to get a list of environment variables. To see the value of a specific variable, use
printenv fnord .
To set a variable, use
setenv myvar the new value .
To restore a variable's default value, use
set-default blah . To revert all variables to default, use
Note that boolean variables usually end in a
? , and that they are seperate from variables of the same name without the question mark. The values
false are used for booleans.
Useful Environment Variables
Some useful environment variables:
|| Sets the baud rate and related settings used by the serial console. By default |
|| By default OBP will automatically boot upon startup. Set this to |
|| When auto-booting, and when |
|| As |
||If set, network interfaces will use their own MAC rather than the system-wide MAC. This is consistent with how PCs behave, and in violation of the Ethernet specification.|
|| If set, additional diagnostic checks will be run at power on. Note that this can take a very long time on SMP and / or HyperSparc systems. In addition, the |
Getting and Setting Device Aliases
Device aliases can be used to simplify the arguments to many commands. Instead of typing
boot /sbus/SUNW,hme@e,8c00000 , for example, one could use
boot net . A number of device aliases are defined by default on every system.
To view all device aliases, use the
devalias command. To view a specific alias, use
devalias whatever . To set a device alias, use
devalias whatever newvalue .
Changing Monitor Resolutions
output-device variable can be used to control which framebuffer is used, and at what resolution it is run, for PROM console. For example, to use the Creator card on an Ultra 1C or 2 at a resolution of 1024x768@76Hz:
Changes will not take effect until after a reset. Not all resolutions and refresh are available on all cards.
Entering Diagnostic Mode
Before running any diagnostics, it is best to enable
diag-switch? and do a full power off / on cycle (hard power off). Additional diagnostic information will be provided over the serial console when the machine boots.
If the power on self test (POST) succeeds, additional tests can be performed using the
test somedevice command will perform checks upon the specified device (this can be a full device path or a device alias).
test-all command will perform checks upon every device capable of self tests.
watch-net command can be used to watch for broadcast packets being sent over the network.
watch-clock command can be used to verify that the internal clock is working. It should count from 0 to 59 in a loop with an interval of one second.
Extended Diagnostics Using obdiag
To enable extended diagnostics mode, run the following:
This should display a menu. First, select
16 to enable verbose messages.
Individual tests can then be run by selecting the relevant number. Note that some tests (for example, serial ports) assume that an external loopback connector is attached. The Ethernet test assumes that a cable is attached and connected to a switch.
To exit, use
- OpenBoot 3.x Quick Reference, Sun P/N 802-3240 ( PDF Version)
- OpenBoot 3.x Command Reference, Sun P/N 802-3242 ( HTML Version)
- OpenBoot 3.x Supplement for PCI, Sun P/N 802-7679 ( Collection of PDF files)
- Open Firmware Quick Reference (Not Sun OBP specific)
We would like to thank the following authors and editors for their contributions to this guide:
- Ciaran McCreesh