Last updated on December 26th, 2019 at 10:32 pm
What is OK Prompt?
Most of the time, when you start the server with Solaris OS installed, it boots at run level 2 or run level 3, which are multi-user states with access to full system and network resources.
Occasionally, you might operate the system at run level 1, which is a single-user administrative state.
The lowest operational state is run level 0. At this state, it is safe to turn off power to the system. When the server is at run level 0, the ok prompt appears.
There are a number of scenarios under which OpenBoot firmware control (OK Prompt) can occur:
- By default, before the operating system is installed the system comes up under OpenBoot firmware control.
- When the auto-boot? OpenBoot configuration variable is set to false, the system boots to the ok prompt.
- After the Solaris OS is halted, the system transitions to run level 0 in an orderly way.
- During the boot process, when there is a serious hardware problem that prevents the operating system from running, the system reverts to OpenBoot firmware control.
- When you deliberately place the system under firmware control in order to execute firmware-based commands, you have the ok prompt.
Reaching the ok Prompt
There are several ways to reach the OK prompt, depending on the state of the system and the means by which you are accessing the system console.
The preferred method of reaching the ok prompt is to shut down the operating system by typing an appropriate command. For example, if you type init 0 at the Solaris prompt the system gradually takes you to the ok prompt:
If the operating system is already halted, you can use the start /SP/console command without using
set /HOST send_break_action=break
to reach the ok prompt.
Gracefully shutting down the system prevents data loss, enables you to warn users beforehand, and causes minimal disruption. You can usually perform a graceful shutdown, provided the Solaris OS is running and the hardware has not experienced serious failure.
You can perform a graceful system shutdown from the ALOM system controller command prompt using command.
You can also use the system Power button to initiate a graceful system shutdown.
OK Prompt Commands
OK show-disks ——> To show the disks
OK probe-scsi ——> To search the scsi devices attached to the primary scsi controller
OK probe-scsi-all —> To search all the scsi devices
OK devalias —-> to list device alias names
OK devalias <alias> <path> —>To temporarily create a device alias
OK printenv —->To view the current NVRAM settings
OK setenv <env> <value> —–> To set the envirement variables
OK set-defaults —–> To set the open boot prompt settings to the factory default
OK nvalias <alias> <path> —>To set the device alias permanently to NVRAM
OK nvunalias cdrom1 —-> To remove the nvalias ‘cdrom1’ from NVRAMRC
OK .version ——> To find out the Open boot prompt version
OK .ent_addr —–> To find out the ethernet MAC address
OK .speed —–> To find out the CPU and PCI bus speeds
OK banner —–> To display the Model,Architecture,processor,openboot version,ethernet address,hostid and etc
OK set-defaults —-> To reset variable values to the factory defaults
OK reset-all —–> To reboot the system from OK Prompt
OK show-devs —–>To show the PCI devices
OK boot —> boot the system from the default boot devices
OK boot cdrom —-> to boot from cdrom
OK boot disk —-> boots the system from device as specified by the disk device alias
OK boot device-path —->boot from the full device mentioned
OK boot net —-> network boot .boots from a TFTP boot server or Jumpstart server
OK boot net -install —–> Jumpstart boot.
OK boot tape —–> Tape boot.boots off a SCSI tape if available
OK boot -h —-> boot halted .boot into a halted state(ok prompt) intersting for troubleshooting boot at the lowest level
OK boot -r —-> Reconfiguration boot.Boot and search for all attached device.useful when new device attached to the system
OK boot -s —-> Single user.boots the system to run level 1
OK boot -v —-> verbose boot.show good debugging information.
OK boot -F failsafe —> to boot the server to failsafe mode
Displaying System Information
Commands to display additional system related information .Not all commands work on all Platforms
OK .idprom ——–> Display ID PROM contents
OK .traps ——–> Display a list of processor-dependent trap types
OK show-devs —–>display list of installed and probed devices
OK eject floppy —-> Eject the floppy
OK eject cdrom ——>eject the cdrom
OK sync —–> call the operating system to write information to hard disk
Emergency Keyboard Commands
These are key sequences recognized by the system to perform predetermined
actions at boot time or during normal operation.
Stop —> Bypass POST .(This command does not depend on security-mode)
Stop-A —> Abort.(This will also stop a running system. You can
resume normal operations if you enter go at the prompt.
Enter anything else and you will stay halted)
Stop-D —> Enter diagnostic mode(set diag-switch?to true)
Stop-N —> Reset NVRAM contents to default values.