System Administration Guide: Basic Administration

SPARC: Using the Boot PROM

System administrators typically use the PROM level to boot a system. Occasionally, however, you might need to change the way the system boots. For example, you might want to reset the device to boot from or run hardware diagnostics before you bring the system to a multiuser level.

You need to change the default boot device to do the following:

For a complete list of PROM commands, see monitor(1M) or eeprom(1M).

SPARC: How to Find the PROM Revision for a System

Display a system's PROM revision level with the banner command.


ok banner
Sun Ultra 5/10 UPA/PCI (UltraSPARC-IIi 333MHz), No Keyboard
OpenBoot 3.15, 128 MB memory installed, Serial #number.
Ethernet address number, Host ID: number.

Hardware configuration information, including the revision number of the PROM, is displayed. In this example, the PROM revision number is 3.15.

SPARC: How to Identify Devices on the System

You might need to identify the devices on the system to figure out what are the appropriate devices to boot from.

Before you can safely use the probe commands to find out what devices are attached to the system, you need to do the following:

If you run the probe commands without clearing the system registers, the following message is displayed:


ok probe-scsi
This command may hang the system if a Stop-A or halt command
has been executed.  Please type reset-all to reset the system 
before executing this command. 
Do you wish to continue? (y/n) n
  1. Change the PROM auto-boot? parameter to false.


    ok setenv auto-boot? false
    
  2. Clear the system's registers.


    ok reset-all
    
  3. Identify the devices on the system.


    ok probe-device
    

Example—Identifying the Default Boot Device

The following example shows how to identify the devices connected to an Ultra10 system.


ok setenv auto-boot? false
auto-boot? =          false
ok reset-all
Resetting ... 

Sun Ultra 5/10 UPA/PCI (UltraSPARC-IIi 333MHz), No Keyboard
OpenBoot 3.15, 128 MB memory installed, Serial #10933339.
Ethernet address 8:0:20:a6:d4:5b, Host ID: 80a6d45b.

ok probe-ide
  Device 0  ( Primary Master ) 
          ATA Model: ST34321A                                

  Device 1  ( Primary Slave ) 
         Not Present

  Device 2  ( Secondary Master ) 
         Removable ATAPI Model: CRD-8322B                               

  Device 3  ( Secondary Slave ) 
         Not Present

ok 

SPARC: How to Change the Default Boot Device

  1. Become superuser.

  2. Change to run level 0.


    # init 0
    

    The ok PROM prompt is displayed.

    For more information, see init(1M).

  3. Change the value of the boot-device parameter.


    ok setenv boot-device device[n]

    boot-device

    Identifies the parameter for setting the device from which to boot. 

    device[n]

    Identifies the boot-device value such as a disk or the network. The n can be specified as the disk number.

    Use the probe-scsi-all command if you need help with identifying the disk number.

  4. Verify that the default boot device is changed.


    ok printenv boot-device
    
  5. Save the new boot-device value.


    ok reset
    

    The new boot-device value is written to the PROM.

SPARC: Examples—Changing the Default Boot Device

In this example, the default boot device is set to disk.


# init 0
# 
INIT: New run level: 0
.
.
.
The system is down.
syncing file systems... done
Program terminated
ok setenv boot-device disk
boot-device =         disk
ok printenv boot-device
boot-device           disk                    disk
ok reset
Sun Ultra 5/10 UPA/PCI (UltraSPARC-IIi 333MHz), No Keyboard
OpenBoot 3.15, 128 MB memory installed, Serial #number.
Ethernet address number, Host ID: number.

Boot device: disk  File and args:
SunOS Release 5.9 Version 64-bit
.
.
.
pluto console login:

In this example, the default boot device is set to the network.


# init 0
# 
INIT: New run level: 0
.
.
.
The system is down.
syncing file systems... done
Program terminated
ok setenv boot-device net
boot-device =         net
ok printenv boot-device
boot-device           net                    disk
ok reset
Sun Ultra 5/10 UPA/PCI (UltraSPARC-IIi 333MHz), No Keyboard
OpenBoot 3.15, 128 MB memory installed, Serial #number.
Ethernet address number, Host ID: number.



Boot device: net  File and args:
.
.
.
pluto console login:

SPARC: How to Reset the System

Run the reset command from the ok prompt.


ok reset

This self-test program, which runs diagnostic tests on the hardware, is executed and the system is rebooted.