Modifying Boot Parameters on a SPARC Based System
The boot PROM is used to boot a SPARC based system and to modify boot parameters. For example, you might want to reset the device from which to boot, change the default boot file or kernel, or run hardware diagnostics before bringing the system to a multiuser state.
If you need to perform any of the following tasks, you need to change the default boot device:
- Add a new drive to the system either permanently or temporarily
- Change the network boot strategy
- Temporarily boot a stand-alone system from the network
For a complete list of PROM commands, see the monitor(1M) and eeprom(1M) man pages.
How to Identify the PROM Revision Number for a System
- Bring the system to the ok PROM prompt.For more information, see How to Shut Down a System by Using the init Command.
- Display a system’s PROM revision number by using the banner command.
ok banner
How to Identify Devices on a System
You might need to identify the devices on a system to determine the appropriate devices from which to boot.
Before You Begin
Before you can safely use the probe commands to determine what devices are attached to the system, you need to do the following:
- Change the PROM auto-boot? parameter to false.
ok setenv auto-boot? false
- Issue the reset-all command to clear system registers.
ok reset-all
You can view the probe commands that are available on your system by using the sifting probe command:
ok sifting probe
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
- Identify the devices on the system.
ok probe-device
- (Optional) If you want the system to reboot after a power failure or after you use the reset command, then reset the auto-boot? parameter to true.
ok setenv auto-boot? true auto-boot? = true
- Boot the system to a multiuser state.
ok reset-all
Example 6-1 Identifying the Devices on a System
The following example shows how to identify the devices connected to a system.
ok setenv auto-boot? false auto-boot? = false ok reset-all SC Alert: Host System has Reset Sun Fire T200, No Keyboard . . . OpenBoot 4.30.4.a, 16256 MB memory available, Serial #69069018. Ethernet address 0:14:4f:1d:e8:da, Host ID: 841de8da. ok probe-ide Device 0 ( Primary Master ) Removable ATAPI Model: MATSHITACD-RW CW-8124 Device 1 ( Primary Slave ) Not Present Device 2 ( Secondary Master ) Not Present Device 3 ( Secondary Slave ) Not Present ok setenv auto-boot? true auto-boot? = true
Alternatively, you can use the devalias command to identify the device aliases and the associated paths of devices that might be connected to the system. For example:
ok devalias ttya /pci@7c0/pci@0/pci@1/pci@0/isa@2/serial@0,3f8 nvram /virtual-devices/nvram@3 net3 /pci@7c0/pci@0/pci@2/network@0,1 net2 /pci@7c0/pci@0/pci@2/network@0 net1 /pci@780/pci@0/pci@1/network@0,1 net0 /pci@780/pci@0/pci@1/network@0 net /pci@780/pci@0/pci@1/network@0 ide /pci@7c0/pci@0/pci@1/pci@0/ide@8 cdrom /pci@7c0/pci@0/pci@1/pci@0/ide@8/cdrom@0,0:f disk3 /pci@7c0/pci@0/pci@1/pci@0,2/LSILogic,sas@2/disk@3 disk2 /pci@7c0/pci@0/pci@1/pci@0,2/LSILogic,sas@2/disk@2 disk1 /pci@7c0/pci@0/pci@1/pci@0,2/LSILogic,sas@2/disk@1 disk0 /pci@7c0/pci@0/pci@1/pci@0,2/LSILogic,sas@2/disk@0 disk /pci@7c0/pci@0/pci@1/pci@0,2/LSILogic,sas@2/disk@0 scsi /pci@7c0/pci@0/pci@1/pci@0,2/LSILogic,sas@2 virtual-console /virtual-devices/console@1 name aliases
How to Determine the Default Boot Device
- Bring the system to the ok PROM prompt.For more information, see How to Shut Down a System by Using the init Command.
- Determine the default boot device.
ok printenv boot-device
- boot-device
- Identifies the parameter for setting the device from which to boot.
For more information, see the printenv(1B) man page.
The default boot-device is displayed in a format that is similar to the following:
boot-device = /pci@7c0/pci@0/pci@1/pci@0,2/LSILogic,sas@2/disk@0,0:a
If the boot-device parameter specifies a network boot device, the output is similar to the following:
boot-device = /sbus@1f,0/SUNW,fas@e,8800000/sd@a,0:a \ /sbus@1f,0/SUNW,fas@e,8800000/sd@0,0:a disk net
How to Change the Default Boot Device by Using the Boot PROM
Before You Begin
You might need to identify the devices on the system before you can change the default boot device to some other device. For information about identifying devices on the system, see How to Identify Devices on a System.
- Bring the system to the ok PROM prompt.
# init 0
- Change the value of the boot-device parameter.
ok setenv boot-device device[n]
- device[n]
- Identifies the boot-device value, such as disk or network. The n can be specified as a disk number. Use one of the probe commands if you need help identifying the disk number.
- Verify that the default boot device has been changed.
ok printenv boot-device
- Save the new boot-device value.
ok reset-all
The new boot-device value is written to the PROM.
Example 6-2 Changing the Default Boot Device by Using the Boot PROM
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 /pci@1f,4000/scsi@3/disk@1,0 boot-device = /pci@1f,4000/scsi@3/disk@1,0 ok printenv boot-device boot-device /pci@1f,4000/scsi@3/disk@1,0 ok boot Resetting ... screen not found. Can't open input device. Keyboard not present. Using ttya for input and output. . . . Rebooting with command: boot disk1 Boot device: /pci@1f,4000/scsi@3/disk@1,0 File and args:
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 . . . Boot device: net File and args: pluto console login:
How to Change the Default Boot Device by Using the eeprom Utility
- Become the root role.
- Specify the alternate device from which to boot.
# eeprom boot-device new-boot-device
- Verify that the new boot parameter has been set.
# eeprom boot-device
The output should display the new eeprom value for the boot-device parameter.
How to Change the Default Boot File by Using the Boot PROM
- Bring the system to run level 0.
# init 0
The ok PROM prompt is displayed. For more information, see the init(1M) man page.
- Set the boot-file property to an alternate boot file or kernel.
ok setenv boot-file boot-file
- Verify that the default boot file or kernel has been changed.
ok printenv boot-file
- Save the new boot-file value.
ok reset-all
The new boot-file value is written to the PROM.
How to Change the Default Boot File by Using the eeprom Utility
- Become the root role.
- Specify the alternate boot file or kernel to boot.
# eeprom boot-file new boot-file
For example:
# eeprom boot-file=kernel.name/sparcv9/unix
- Verify that the default boot file has been changed.
# eeprom boot-file