C H A P T E R 2

Booting and Testing Your System

This chapter describes the most common tasks that you perform using the OpenBoot firmware. These tasks let you:


Booting Your System

The most important function of the OpenBoot firmware is to boot the system. Booting is the process of loading and executing a standalone program such as the operating system. Once it is powered on, the system usually boots automatically, without user intervention. If necessary, you can explicitly initiate the boot process from the OpenBoot command interpreter. Automatic booting uses the default boot device specified in non-volatile RAM (NVRAM); user-initiated booting uses either the default boot device or one specified by the user.

If you want to boot the system from the default boot device, type the following command at the Forth Monitor prompt:

ok boot 

If you are at the Restricted Monitor prompt, and you want to boot your system, type:

> b 

The boot command has the following format:

boot [ device-specifier ] [ filename ] [ options ]

The optional parameters for the boot command are described in the following table.

TABLE 2-1 Common Options for the boot Command

Parameter

Description

[ device-specifier ]

The name (full path name or alias) of the boot device. Typical values include:

cdrom (CD-ROM drive)

disk (hard disk)

floppy (3-1/2" diskette drive)

net (Ethernet)

tape (SCSI tape)

[ filename ]

The name of the program to be booted (for example, stand/diag ). filename is relative to the root of the selected device and partition (if specified). If filename is not specified, the boot program uses the value of the boot-file NVRAM parameter (see Chapter 3).

[ options ]

-a - Prompt interactively for the device and name of the boot file.

-h - Halt after loading the program.

( These options are specific to the operating system, and may differ from system to system .)




Note - Many commands (such as boot and test) that require a device name, accept either a full device path name or a device alias. In this manual, the term device-specifier is used to indicate that either a device path name or a device alias is acceptable for such commands.


To explicitly boot from the internal disk (for diskfull systems), type:

ok boot disk 

To explicitly boot from Ethernet, type:

ok boot net 

To specify a boot device at the Restricted Monitor prompt, use the b command with the name of the boot device as shown in the examples below.

> b disk (to explicitly boot from the internal disk for diskfull systems)
> b net (to explicitly boot from Ethernet)

Device alias definitions vary from system to system. Use the devalias command, described in Chapter 1 , for definitions of your system's aliases the following table is an example of device aliases and their definitions based on SPARCstation 2 and SPARCstation IPX systems. The heading "Old Path" refers to the OpenBoot Version 1. x usage for the equivalent SBus device.

TABLE 2-2 Typical Device Aliases

Alias

Boot Path

Old Path

Description

disk

/sbus/esp/sd@3,0

sd(0,0,0)

Default disk (1st internal).

disk0

/sbus/esp/sd@3,0

sd(0,0,0)

First internal disk sd0 .

disk1

/sbus/esp/sd@1,0

sd(0,1,0)

Second internal disk sd1 .

disk2

/sbus/esp/sd@2,0

sd(0,2,0)

External disk sd2 .

disk3

/sbus/esp/sd@0,0

sd(0,3,0)

External disk sd3 .

tape

/sbus/esp/st@4,0

st(0,0,0)

First tape drive st0 .

tape0

/sbus/esp/st@4,0

st(0,0,0)

First tape drive st0 .

tape1

/sbus/esp/st@5,0

st(0,1,0)

Second tape drive st1 .

cdrom

/sbus/esp/sd@6,0:c

sd(0,6,2)

CD-ROM partition c .

cdroma

/sbus/esp/sd@6,0:a

sd(0,6,0)

CD-ROM partition a .

net

/sbus/le

le(0,0,0)

Ethernet.

floppy

/fd

fd(0,0,0)

Floppy drive.


Note that in the following table the names sd0 , sd1 , and so on, are terms used in the Solaris® 1. x operating environment to describe these devices. The Solaris 2. x operating environment names are different, as shown in below.

TABLE 2-3 Alias Names in the Solaris Operating Environment

Alias

Solaris 1. x Name

Solaris 2.x Name

disk and disk0

sd0

c0t3d0s0

disk1

sd1

c0t1d0s0

disk2

sd2

c0t2d0s0

disk3

sd3

c0t0d0s0



Running Diagnostics

Several diagnostic routines are available from the Forth Monitor. These on-board tests let you check devices such as the network controller, the floppy disk system, memory, installed SBus cards and SCSI devices, and the system clock. User-installed devices can be tested if their firmware includes a self-test feature.

The following table lists diagnostic test commands. Remember: device-specifier refers to either a device path name or a device alias.

TABLE 2-4 Diagnostic Test Commands

Command

Description

probe-scsi

Identify devices attached to the built-in SCSI bus.

probe-scsi-all [ device-path ]

Perform probe-scsi on all SCSI buses installed in the system below the specified device tree node. (If device-path is absent, the root node is used.)

test device-specifier

Execute the specified device's self-test method. For example:

test floppy - test the floppy drive, if installed

test /memory - test number of megabytes specified in the selftest-#megs
NVRAM parameter; or test all of memory if diag-switch? is true

test net - test the network connection

test-all [ device-specifier ]

Test all devices (that have a built-in self-test method) below the specified device tree node. (If device-specifier is absent, the root node is used.)

watch-clock

Test the clock function.

watch-net

Monitor the network connection.


Testing the SCSI Bus

To check the built-in SCSI bus for connected devices, type:

ok probe-scsi 
Target 1
  Unit 0  Disk  SEAGATE ST1480  SUN04246266  Copyright (C) 1991 Seagate  
All rights reserved 
Target 3
  Unit 0  Disk  SEAGATE ST1480  SUN04245826  Copyright (C) 1991 Seagate  
All rights reserved 
ok

:

To test all SCSI buses installed in the system, type:

ok probe-scsi-all
/iommu@f,e0000000/sbus@f,e0001000/esp@3,200000
Target 6
  Unit 0  Disk  Removable Read Only device   SONY   CD-ROM CDU-8012 3.1d
/iommu@f,e0000000/sbus@f,e0001000/espdma@f,400000/esp@f,800000
Target 1
  Unit 0  Disk  SEAGATE ST1480  SUN04246266  Copyright (C) 1991 Seagate  
All rights reserved 
Target 3
  Unit 0  Disk  SEAGATE ST1480  SUN04245826  Copyright (C) 1991 Seagate  
All rights reserved 
ok

The response depends on the devices on the SCSI bus.

Testing Installed Devices

To test a single installed device, type:

ok test device-specifier

This executes the device method (named selftest ) of the specified device node. Response depends on the self-test of the device node.

To test a group of installed devices, type:

ok test-all 

All devices below the root node of the device tree are tested. The response depends on the devices that have a self-test method. If you use the device-specifier option with the test-all command, all devices below the specified device tree node are tested.

Testing the Diskette Drive

The diskette drive test determines whether the diskette drive is functioning properly. A formatted, high-density (HD) disk must be in the diskette drive for this test to be successful.

To test the diskette drive, type:

ok test floppy
Testing floppy disk system. A formatted
disk should be in the drive.
Test succeeded.
ok 

If the test fails, you see an error message.

To eject the diskette, type:

ok eject-floppy 
ok

If this command fails, you can physically eject the diskette by inserting a straightened paper clip into the little hole near the diskette slot.

Testing Memory

When you use the memory testing routine, the system tests the number of megabytes of memory specified in the NVRAM parameter selftest-#megs . (See Chapter 3 , for information about NVRAM parameters.) One megabyte of memory is tested as the default. If either the hardware diagnostic switch (if the system has one) or the NVRAM parameter diag-switch? is enabled, all the memory is tested.

To test memory, type:

ok test /memory 
Testing 16 megs of memory at addr 4000000 11
ok 

In the preceding example, the first number (4000000) is the base address of the testing, and the following number (11) is the number of megabytes to go.

There will be a delay while the PROM tests the system. If the system fails this test, you see an error message.

Testing the Ethernet Controller

To test the on-board Ethernet controller, type:

ok test net 
Internal Loopback test - (result)
External Loopback test - (result)
ok 

The system responds with a message indicating the result of the test.



Note - The external loopback portion of this test will fail unless the system is connected to Ethernet.


Testing the Clock

To test the clock function, type:

ok watch-clock 
Watching the'seconds' register of the real time clock chip.
It should be ticking once a second.
Type any key to stop.
1 
ok 

The system responds by incrementing a number once a second. Press any key to stop the test.

Monitoring the Network

To monitor the network connection, type:

ok watch-net 
Internal Loopback test - succeeded
External Loopback test - succeeded
Looking for Ethernet packets.
'.' is a good packet. 'X' is a bad packet.
Type any key to stop
....................X.....X...............
ok 

The system monitors network traffic, displaying " . "each time it receives an error-free packet and "X " each time it receives a packet with an error that can be detected by the network hardware interface.



Note - Not all OpenBoot 2.x systems include this test word.



Displaying System Information

The Forth Monitor provides several commands to display system information. These commands, listed in the following table, let you display the system banner, the Ethernet address for the Ethernet controller, the contents of the ID PROM, and the version number of the OpenBoot firmware. (The ID PROM contains information specific to each machine, including the serial number, date of manufacture, and Ethernet address assigned to the machine.)

TABLE 2-5 System Information Display Commands

Command

Description

banner

Display power-on banner.

show-sbus

Display list of installed and probed SBus devices.

.enet-addr

Display current Ethernet address.

.idprom

Display formatted ID PROM contents.

.traps

Display a list of SPARC trap types.

.version

Display version and date of the boot PROM.


Also see the device tree browsing commands.



Note - If you halt the operating system, type banner, then resume the system, you may find that your color tables have been altered. To restore these tables on pre-Solaris 2.0 operating environments, type clear_colormap, then select Refresh from the Utilities menu. To restore these tables on Solaris 2.0 or 2.1 operating environments, select Color Chooser from the Properties... menu.



Resetting the System

Occasionally, you may need to reset your system. The reset command resets the entire system and is similar to performing a power cycle.

To reset the system, type:

ok reset 

If your system is set up to run the power-on self-test (POST) and initialization procedures on reset, these procedures begin executing when you initiate this command. (On some systems, POST is only executed after power-on.) Once POST completes, the system either boots automatically or enters the Forth Monitor, just as it would have after a power cycle.



Note - If you were browsing the device tree, you may need to use the device-end command before you reset the system.


Copyright © 2001, Sun Microsystems, Inc. All rights reserved.