This procedure is not as good in most situations as logging in remotely, su'ing to root, and issuing a
reboot or halt command or similar. However, sometimes a machine will be hung so hard that you can't do that (and then there's fallback-reboot, which is less effective at preventing data loss than this procedure, but better if there's no one near the
machine's physical location).
This procedure is almost always better than just turning off the power and turning it back on again
Rebooting a hung Sun from the keyboard:
Bring the Sun down to an OK prompt. See the section below on this topic for full specifics.
Type "sync" at the "OK" prompt
The machine should count for a while, as it dumps data to your swap device. If this doesn't happen, and the
machine just sits there for longer than a few minutes, the machine is probably so hung that you'll have to power
cycle it instead.
Eventually, the screen should go black (whether your "sync" worked, or you had to power cycle the machine).
After the screen becomes lit up again, you have two main choices:
If you want to come up multiuser, which is the machine's normal mode of operation:
Don't do anything. The machine should attempt to come up multiuser by default.
If you want to come up singleuser, which is good for system maintenance sometimes:
Go to the OK prompt again using the procedure described below again. IMO, the best
time for this is while the machine says "Initializing memory", but about any time before the machine starts
checking filesystems should be fine.
This time, instead of "sync", type "boot" to come up in multiuser mode, or "boot -sw" to come up in singleuser
Enter the root password when it's requested
Bring the Sun down to an "OK" prompt. This is generally done in one of four ways:
If your keyboard has a "stop" key at the upper left (modern Sun keyboards have this), hold down that key as
though it were a shift key, and then type an "A". That is, first depress the stop key, then depress the A key,
then let go of both the stop and A keys.
If your keyboard has an "L1" key at the upper left (really old Sun keyboards have this), hold down that key as
though it were a shift key, and then type an "A". That is, first depress the L1 key, then depress the A key,
then let go of both the L1 and A keys.
If you are on a serial console, you need to generate a break sequence. How you do this will be specific to
what terminal emulation software you are using, or many physical serial terminals will have a key labeled "break".
If your Sun has had the "alternate break sequence" enabled, instead of a stop key or an L1 key, you'll use
one of the following:
enter, tidle, control-b
return, tidle, control-b
If none of these work, odds are either the keyboard isn't working, or the machine is so hung that you'll have to
turn the machine off and back on. That's unfortunate, but them's the breaks.