Introduction to Openboot Prom
All sun machines have a firmware for basic hardware testing and initialization, as well as a user program that provides a variety of important features.
Basic elements
The basic hardware elements of the sun system include:
Boot Prom chip, which is permanently fastened to the motherboard.
Non-volatile random access memory (non-volatile random access Memory (NVRAM)) chip that contains basic information about the host.
Boot Prom Content
The boot prom has the following features:
Dot Self Test (power-on self-tests (POST))
The system resets to start execution.
Detecting Basic CPU Board
Vary depending on the machine model.
Device driver
There are small device drivers that enable you to communicate with different peripherals during startup initialization
User Action Interface
NVRAM Content
In addition to the permanent existence of the Ethernet address, host ID, clock, but also save the system can be modified configuration parameters.
Basic Boot PROM Commands
OK banner
OK boot
OK help
OK printenv
OK setenv
OK set-defaults
OK PROBE-SCSI
OK probe-scsi-all
OK probe-ide
OK reset
The Open Boot banner Command
The banner command lists several pieces of useful information about the system such as model, amount of memory, and HostID . You can also with the banner command to identify your system ' PROM version number. Three boot PROM levels are discussed in this module.
OK banner
Sun UltraSPARC Upa/pci (2 X ultrasparc-ii 296MHz), keyboard Present
Openboot 3.11, 256 MB memory installed, serial #3159808.
Ethernet address 8:0:22:1a:e7:3f, Host id:72303700.
Ok
Boot Commands and Parameters
You can type one or more parameters after the boot command. These parameters are passed to the operating system kernel, which affects the entire boot process.
Command format
OK boot [device_name]-[options]
Parameters
A interactive boot system. Prompt for root and switch devices and some important system files
R starts the system to find all the devices again, rebuilds the files in the/devices and//dev directories, and updates the/etc/path_to_inst files.
s system starts to stay at the s run level. Can be used to troubleshoot system errors.
V Displays the system's startup information in detail. Sometimes it can be used to troubleshoot system errors.
printenv command
The printenv command displays the parameters of the NVRAM and the default values for the parameters.
To view the default boot device
You can use Printenv to display the default boot device.
OK printenv
Parameter Name Value Default value
Tpe-link-test? True True
Output-device Ttya Screen
Input-device Ttya Keyboard
Sbus-probe-list f0123 f0123
Keyboard-click? False false
Diag-file
Diag-device Net Net
Boot-file
Boot-device Disk Disk
Auto-boot? True True
More [,, Q]? Q
You can view the default boot device in the system's output, which is boot-device. You can also enter Printenv Boot-device, which displays only the value of the boot device.
Redefining Prom Boot values
Use the setenv command to redefine the value of the prom. The following example of the Auto-boot? To false, and then the Reset command causes the system to reboot for the change to take effect.
OK printenv auto-boot?
Auto-boot?true true
Ok
Ok setenv auto-boot? False
Auto-boot? = False
OK reset
Resetting default values
Use the Set-defaults command to reset all parameters to their default values.
OK set-defaults
____________________________________
Note The-set-defaults command takes effect only for parameters that have a default value.
____________________________________
The keys that affect system startup and self-test are:
Stop
If you press the STOP key while the system is on the power self-test, cancel the post (Power on self-test) diagnostics and stay in the OK state.
Stop+d
When you press both the stop and D keys at the system self-test, the system will automatically go to diagnostic mode and the system will perform a more complete self-test in diagnostic mode.
Stop+n
If the system does not start properly because the NVRAM is set incorrectly, you can press the stop and N keys at the same time as the system power on the self-test. Its role is to set the NVRAM parameter value to the default value.
Stop+a
Pressing the stop and a key at the same time will disrupt the operation of the operating system and retire to the OK state.
Warning: Try not to press STOP+A while the operating system is running, which will cause the operating system to stop and result in loss of data. When you are not able to, after pressing Stop+a, type the sync command to synchronize the memory data to the hard disk.
Detection System bus
The I/O bus that connects peripherals such as optical drives, hard disks, and motherboards has a SCSI (small computer system interface) bus and an IDE (Integrated Drive electronics) bus.
Use probe-command in Openboot 3.x system
In a Openboot 3.x system, you will see a warning when you use the probe-command. If you are running the operating system, use STOP-A to force the system to pause, or use halt to exit the operating system. Using the probe-command in such a state can cause the machine to hang. Therefore, you must run the Reset-all command first.
Please set Auto-boot to False before running Reset-all, the system will self-test, stay in OK State, and then run this command.
Display devices attached to the SCSI bus
9, Init 0 back to OK State
10, type: setenv auto-boot? False
11. Type: RESET
12, at this time after the system reboot to stay in the OK State
13. Type: Probe-scsi-all
14, the system will list all the SCSI devices can be found, to see if the actual number of consistent
15, if inconsistent, indicating that the hard drive has been damaged, need to replace
The PROBE-SCSI command identifies the device attached to the SCSI controller.
OK PROBE-SCSI
Target 3
Unit 0 Disk SEAGATE ST1480 SUN0424626600190016
Copyright (c)
All Rights Reserved
Target 6
Unit 0 removable Read only device SONY CD-ROM
OK probe-scsi-all
Display IDE devices attached to the PCI bus
OK probe-ide
Device 0 (Primary Master)
ATA model:st 34342A
Device 1 (Primary Slave)
Not Present
Device 2 (secondary Master)
Removable ATAPI model:cdr-8240b
Device 3 (Secondary Slave)
Removable ATAPI Model yyyyyyyyyyyyyyy
You can use the Devalias command to view the physical address of the device alias so that you know the physical device that started the device.
OK Devalias
screen/sunw,ffb@1e,0
mydisk/pci@1f,0/pci@1,1/ide@3/disk@0,0
net/pci@1f,0/pci@1,1/network@1,1
Cdrom/pci@1f,0/pci@1,1/ide@3/cdrom@2,0:f
disk/pci@1f,0/pci@1,1/ide@3/disk@0,0
disk3/pci@1f,0/pci@1,1/ide@3/disk@3,0
disk2/pci@1f,0/pci@1,1/ide@3/disk@2,0
disk1/pci@1f,0/pci@1,1/ide@3/disk@1,0
disk0/pci@1f,0/pci@1,1/ide@3/disk@0,0
Ide/pci@1f,0/pci@1,1/ide@3
Floppy/pci@1f,0/pci@1,1/ebus@1/fdthree
Ttyb/pci@1f,0/pci@1,1/ebus@1/se:a
Ttya/pci@1f,0/pci@1,1/ebus@1/se:b
keyboard! /pci@1f,0/pci@1,1/ebus@1/su@14,3083f8
Keyboard/pci@1f,0/pci@1,1/ebus@1/su@14,3083f8
Mouse/pci@1f,0/pci@1,1/ebus@1/su@14,3062f8
The device alias is in the left column. The device physical address is in the right column.
If the operating system hangs (no response) and you cannot log on remotely, you have no other choice but to force the operating system to break.
Interrupting a suspended system
If the system hangs, you can try the following steps:
1. Interrupt the operating system with STOP-A. If successful, the system will remain in the prom state. If you are using a character terminal as the system console, press the break key.
2. Synchronize the contents of the memory with the sync command to disk to reduce the loss of data. The system automatically resets when it is finished.
Type the sync command at the OK prompt.
OK sync
Note-You can also use STOP-A to force the operating system to break, and then type go to restore the operating system to run. Use of this feature is not recommended.
1.1OK prompt
Sun's operating system has a boot-prom state prior to entering the Solaris operating system or system startup. The way to enter this state is to press the Stop+a on the keyboard at the same time, if there is no stop this function key (PC keyboard), you can use the Ctrl+break key to enter. If you are in a boot-prom state, at the OK prompt and your Solaris operating system is still running, you can use the Go command at the OK prompt to keep the system running.
1.2 In the serial port State test
Boot-prom can enter means that the computer has a monitor and keyboard or display terminal. If the system is booted and there is no keyboard and monitor, the input output defaults to the first serial port (/dev/ttya, usually called a). You can use a terminal or other computer to connect to it using a cross port.
1.3 Restart Sun Workstation
Before restarting, Sun's workstation needs an appropriate way to select one of the following commands:
# init 5 shut down all processes and power off the computer
# init 6 Shut down all processes and restart the computer
# init 0 shut down all processes and bring the computer back to OK
in these 3 command modes, the k* script in the/ETC/RC0.D directory will be executed to reboot or shutdown the system. Important databases will also be shut down and the network server will shut down all process IDs. If none of the above commands respond, you can try the following command:
-stop+a
-sync
Note: The core of the system will be temporarily stored in/var/crash/