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.
but very helpful , now i know how to take care of my own sparc, big thanks
typing help at the prompt can be rewarding
one in particular topic refers to redirecting input/output from keyboard/screen to ttya/ttyb
if you try the example given, there is no other option but to reset(!) the machine (provided it is already installed in the local ethernet, who could care less about ttys ..)
in pc solaris there is also a way to change the foreground/background colors in command line
> 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.
Stop-N should work.
The diag mode (boot with stop-d or “setenv diag-switch? true”) will put the system in diag mode. In diag mode the system will boot from the diag-device which is “net” by default. Most people don’t expect the diag mode to do that.)
If you’re using Solaris then you can try “boot -s” to boot in single user mode or “boot -r” to boot and reconfigure.
To see all variables just type “printenv”
Sun systems use one MAC address per system. (following the official Ethernet standard) Jus change local-mac-address? if you don’t like that.
OBP’s are really nice. Especially “boot net”
For Ultra5 & Ultra 10 the latest OBP is 3.31 (search on sunsolve.sun.com if you like to upgrade)
To turn the power off just enter “power-off”
yeah, “boot net” is really nice function.
you can install your Solaris from network
(e.g. in case that your SPARC box doesn’t has a cd-rom)
just put the Solaris installation cd into any machine,
and run an install server.
the install server will broadcast its signal all over subnet.
when you boot another machine with “boot net”
it will grasp that signal and then start booting from network. (and you can also issue “boot net” command from other terminal program — i.e. you do installation from machine A, the installation cd is in machine B, install to machine C)
very useful function
Wasn’t there a similar article like this not to long ago? I remember everyone being Ultra 5 gitty and surfing Ebay non-stop for a few days =)
Intersting read nontheless!
– j
Yeah… Knowing the OpenBoot is a very important thing for every Sun administrator. I think that Sun doesn’t put enough importance to this in their training.
Regards!
It should also be mentioned that this is an IEEE 1275 standard which is also used on Power Macs and IBM pSeries machines.
The Ultra 5 is a nice machine, but so are Alpha’s, AMD64, and such. I have an Ultra 5, but I dont see it as a machine to write home about.
u5’s are cheap IDE based machines which have a serious pci bug that can hang them. They were mass produced and sold. I agree with Bob that they are nothing to brag about. (maybe in some x86 only channels perhaps).
As for the article, I don’t see a point to write anything about OBP when you can find all what you’ll ever need to know on http://sunsolve.sun.com/handbook_pub/Systems/U5/U5.html“> and docs.sun.com
There should be better articles on Sun’s on osnews and not just some OBP primer. If the author wanted to do justice, they should have compared it’s specs, design and performance etc.
Thans for the Diag mode note. I set this on my ultra 10 the other day (forgot, and slightly paniced when it took the machine a while to come up ) and wondered why it tried to boot from the network.
some of these open boot commands works in sun4m machines too…. and it supports some more booting commands, like
“boot floppy” or “boot tape”….
My old dds-scsi-tape drive works on my old sun4m engines flawlessly…and yes, they can boot the system!!
Some another commands for better control of that scsi devices..
probe-scsi
probe-scsi-all
BSDero
It should have been titled “An OpenBoot primer”. Or is the author under any illusion that the OBP info he published, is in any way different on a SunFire V880 (for instance)?
Introduced in S10 (with the Sunblade 1000/2000, later extended to all destop systems from U5-SunBlade 2500), and at least partially backported to an S9 update is a neat feature called “Power Button Abort”. Basically, instead of hitting L1-A, you hit the power button rapidly three times (i.e. in less than a second), and you’re dropped to the OK prompt.
This is great if you work with a non-Sun keyboard, and is generally nifty. I know it’s available in Solaris Express, I’m not sure how much made it into 9.
Apples have used open firmware for a while now, which is mostly the same as open boot, as it’s an ieee standard… it’s so good, there’s a song about it!
<a href=”HTTP://playground.sun.com:80/pub/p1275/misc/ofwsong.au”>Song
Hi, all
i just got one used Ultra 5 but i could not get any scrren output from my pc (lcd) monitor connection. someone say monitor not match with ultra 5??
(i open the case , ATI rage2 + Dvd video chip on board–8 bit?)
please help,
thanks,
anthony