Sun Ultra 5 Primer

Here are a few tips I’ve gathered for working with Sun’s Ultra 5, and indeed other Sun hardware in general. While many are familiar with the intimate details of the x86 BIOS system, and how to go about configuring a BIOS, dealing with a Sun system is very different.

So I’m going to go over a few quick (albeit non-comprehensive) tips on working with Sun systems. These are tips to help one get acclimated to the SPARC platform, as well as get started with installing an operating system (or two, or three, or four…).


Introduction To OpenBoot Firmware


The OBP, or OpenBoot PROM/Firmware, is the mechanism that acts much like the
BIOS on x86 systems. There are many differences, however, and the OpenBoot is
geared more towards servers, and offers many advantages in that realm over
(most) BIOS implementations.

The OpenBoot is command-line driven, as opposed to x86 text-based (and some
graphical) menu systems in the BIOS. Because of its command-line nature, the
OpenBoot is arguably better suited for data canter and remote installations,
where control of the system is possible with a simple, low-bandwidth (9600
baud) serial connection. While some x86 BIOS systems allow output to serial
console, those systems are rare.

Because of this, it’s much more practical (and less expensive in terms of
remote management equipment) to administer systems at a remote location,
greatly reducing (but not eliminating entirely) the need for hands-on access.
On Sun systems, OpenBoot is shown with what’s commonly referred to as the
“OK” prompt:

ok>


With the OpenBoot, you can halt, interrupt, change boot-parameters, go into
diagnostics, perform SCSI and IDE bus probing, and fully control the hardware,
all from a 9600 baud serial connection.

Here are a few commands that will help you:

This will check to see what IDE devices are connected to the system.

ok> probe-ide


If you’ve got a SCSI system (such as the SPARCStation 5), the command is
probe-scsi.

This command boots from the CD-ROM drive, such as when you’re installing a new
operating system.

ok> boot cdrom

To boot from disk:

ok> boot disk


To boot from the default device, use this command.

ok> boot


To reset the system, which also usually boots the system from the default
device:

ok> reset


Any time the boot command is issued, it automatically resets the system
(regardless of whether an operating system is running or not).

That just scratches the surface of the OpenBoot system, but this should help
get your started if you’re looking to boot and install the various operating
systems covered. One such resource is the OpenBoot 3.x Command
Reference Manual
from the Sun docs site (The OB version for my Ultra 5 is
3.10). There are numerous FAQs available to help answer any questions you
might have.
How to Get to the OK Prompt
If you’re using a serial connection, sending a break signal at any time when
the system is powered up will bring you to the ok> prompt, even if an
operating system is running (the operating system will be “paused”)

If you’re using the keyboard and screen, the “stop” key from the left
vertical row of keys, just above the “props” key (the key used to give
someone props; combine with the shift key to give someone mad props) in
combination with the “a” key will pause the operating system and bring you
to the ok> prompt.

Here is
an image of a typical Sun keyboard layout.

It’s best to do this right as the system is in its startup cycle and not when
a system is running an operating system, as that will completely stop the
system operation dead in its tracks. If you’re running a database, this
probably isn’t a good idea.

If you do pause the system, either deliberately or accidentally, you can type
go at the ok> prompt and the operating will resume where it left off. I’ve done this and
resumed without any problems, but it’s also possible to really muck things up.

Terminal Software


If you’re using a Windows machine, the HyperTerminal application (often found
in Programs, Accessories, Communication) can connect your serial port (COM1,
COM2, etc) to a Sun system. Be sure to use 9600, 8-N-1, and select “none”
for flow control.

If you’re using a Unix-like system, you can use cu, tip, Minicom, or my
favorite, Kermit. (Here’s an interesting bit of geek history and
name-dropping: By a chance meeting, I met the young woman for whom the name
for Kermit was derived.).


Keyboard/Screen or Serial Console


In the OpenBoot firmware you can specify whether the system will use the
keyboard/screen or the serial console to output it’s boot-up sequence.
There are two ways you can set these variables: Through OpenBoot itself, or
through a system utility. (Again, if you use OpenBoot, the system should
either be halted, or stopped during the system startup, rather than while an
operating system is still running.)

The two commands to switch to keyboard/screen are:

ok> setenv input-device keyboard
ok> setenv output-device screen


And the two commands for setting the serial console as the input/out are:

ok> setenv input-device ttya
ok> setenv output-device ttya


Additionally, many (if not all) of the operating systems reviewed (including
Solaris and NetBSD) include a utility called eeprom, which allows you to set
the OBP settings without going to the ok> prompt.

netbsd1# eeprom "input-device=ttya"
netbsd1# eeprom "output-device=ttya"


To see the current settings, type printenv at the ok> prompt, or just run
eeprom in your operating system.

Any change in settings will not take effect until the system is
rebooted/reset.

The system uses either the keyboard/screen or serial port for input/output,
not both. If the system is setup to use the serial port, the screen will be
blank, unless the X server kicks in, at which point the keyboard and screen
will work.

If the input-device is set for keyboard and no keyboard is plugged in, the
system will use the serial console for interaction.

As far as I can tell, if your system is set to use the serial console, there’s
no way to switch it to keyboard/screen unless you plug in a serial console and
change it with the ok> prompt or eeprom. The Sun documents I’ve searched don’t
seem to say anything about that particular scenario. If you know of a trick,
shoot me an email.


Serial Cable Madness


It’s a good idea to have a serial cable when dealing with Sun equipment, and
indeed other Unix systems and network devices. But the myriad of connectors,
genders, and wirings makes it difficult (and expensive) to always have the
right cable.

Over years of data center work, I’ve found an easy way handle the myriad of
possible connectors for serial cables. By using unassembled modular adapters
and Cat 5 cable, I can cheaply and effectively make sure I’m covered no matter
what serial need I come up against.

The trick is using the unassembled modular adapters and a wiring guide
allowing the easy creation of custom cables. They only take a few minutes to
assemble, and they very inexpensive when compared to stocking multiple serial
cables. The cable length is determined only by the what Cat 5 you have
available. I’m not sure of the limitations in length of the cable, but I’ve
used 50 foot cables before without any problem.

I published an article a few years ago on this method, entitled Serial Madness. You can find the
wiring guides here.


Conclusion


This was just a quick introduction to dealing with the OpenBoot firmware as well as some specifics regarding serial connections. There are plenty of resources for Sun systems, serial connections, and OpenBoot on the Internet.

16 Comments

  1. 2004-03-09 7:36 pm
  2. 2004-03-09 7:47 pm
  3. 2004-03-09 7:47 pm
  4. 2004-03-09 7:49 pm
  5. 2004-03-09 8:49 pm
  6. 2004-03-09 10:20 pm
  7. 2004-03-09 10:32 pm
  8. 2004-03-10 1:51 am
  9. 2004-03-10 3:02 am
  10. 2004-03-10 3:54 am
  11. 2004-03-10 4:26 am
  12. 2004-03-10 5:25 am
  13. 2004-03-10 6:04 am
  14. 2004-03-10 7:28 am
  15. 2004-03-10 3:45 pm
  16. 2004-03-12 12:44 pm