Wednesday, December 31, 2008

Important open boot commands in solaris OBP commands

Basic Boot PROM Commands

When the system is turned on or reset, it first runs POST, and then one of the following two things can happen:

The system will automatically reboot if the value of the configuration variable auto-boot? is true, the value of the boot-command variable is boot, and OpenBoot is not in diagnostic mode. In order to boot, the system will automatically load, and executes the program and its arguments specified by the boot-file variable from the device described by the boot-device variable.

If the configuration variable auto-boot? is false, the system may stop at the OpenBoot user interface without booting the system and will display the ok prompt.

You can issue the Boot PROM commands at the ok prompt. One obvious command is the boot command to boot the system, which you can use in one of the following ways:

Issue the boot command without any arguments if you want to boot the system from the default boot device using the default boot arguments.

Issue the boot command with an explicit boot device as an argument if you want to boot the system from the specified boot device using the default boot arguments.

Issue the boot command with explicit boot arguments if you want to boot the system from the default device by using the specified arguments.

Issue the boot command with an explicit boot device and with explicit arguments if you want to boot the system from the specified device with the specified arguments.

The general syntax of the boot command is shown here:

boot [device] [arguments]

Arguments and options are described here:

{device}. Specifies the full path or the alias for the boot device. The typical values are:

ok cdrom for CD-ROM drive

ok disk for hard disk

ok floppy for 3.5 inch diskette drive

ok net for network

ok tape for SCSI tape

{arguments}. Specify the arguments for the boot command such as the name of the file that contains the program that will be started as a result of the command. The name is relative to the selected device and partition. If this argument is not specified, the boot program uses the value of the NVRAM parameter: boot-file.

In addition to the boot command there are other administrative and diagnostic commands that you can issue at the Boot PROM prompt: ok. The commonly used OpenBoot PROM commands issued from the ok prompt are described below

ok banner - Displays current power-on banner. (-h ) can be used

ok boot [arguments] [options] - Boots the system.
ok boot - Boots with default options.

ok .enet-addr - Displays current Ethernet address of the machine.

ok .version - Displays the version of the Boot PROM

ok eject media - Ejects the media.
ok eject floppy
ok eject cdrom
ok eject tape

ok help [category]

ok help [command]
ok help [command]
The help command without arguments displays a list of command categories, and, with a category as an argument, displays help for all the commands in that category.

Example :- ok help setenv - Displays help for the setenv command.

ok password - Sets the security password.

ok printenv - Displays a table showing the boot configuration variable names, their current values, and default values.

ok reset-all - Resets the system. It's equivalent to performing a power cycle.

ok set-default [varName] - Sets the value of the specified variable to its default value.

Example :- ok set-default auto-boot?

ok setenv [varName] [value] - Sets the value of a boot configuration variable.

Example - ok auto-boot? false

ok show-devs - Displays the list of all the devices in the OpenBoot device tree.

ok test [device] - Tests the specified device. No message displayed means test succeeded.

Example -
ok test floppy
ok test cdrom
ok test /memory
ok test tape

ok probe-scsi-all - to see all scsi based hardware.

Rebooting the Hung System

In order to reboot the hung system and force a crash dump, perform the following steps. This procedure will work even if the system is not hung.

Press the stop key sequence for your system. The specific stop key sequence depends on your keyboard type. For example, it could be Stop-A or L1-A. On terminals, press the Break key. The system will go to the PROM phase and display the ok prompt.

Synchronize the file systems and write the crash dump.
1)> n
ok sync

After the crash dump has been written to disk, the system will continue to reboot.

Verify that the system boots to run level 3. The login prompt is displayed when the boot process has finished successfully.

[login prompt]:


Login as root, and issue the following command to force a crash dump:

halt -d

At the ok prompt, issue the boot command to boot the system:

ok boot

Making boot device alias

In case system can not boot from primary disk and it is needed to make another boot disk to access the data , nvalias command is used .

nvalias command makes the device alias and assigns an alternate name to a physical disk. Physical address of target disk is required which can be had by show-disk command on ok>.

ok nvalias disk7 /iommu@f,e0000000/sbus@f,e0001000/dma@3,81000/esp@3,80000/sd2,0
The new aliased disk can be named as boot disk or can be used for booting by refering its name .
ok setenv boot-device disk7
ok reset
or
ok boot disk7

No comments:

Custom Search

Feeds from my other blog

Samsung S2 Brand new for 25900 White piece sealed box

For Sale, Mobile Phones - Accessories in India, Andhra Pradesh, Hyderabad. Date September 17

For Sale in Hyderabad