参考:OpenBoot3.x命令参考
说明:有部分实在无法用中文表达得或说没有必要用中文表达的,保留使用了英文。里边有些是个人对OpenBoot3.x的理解,可能存在错误。
期望指正,QQ:33033777,MSN:wa0362@126.com
OpenBootPROM的介绍
简称OBP,能够理解为普通pc的BIOS的增强版,他是控制sun服务器的引导过程、初始化配置某些硬件和提供了某些诊断的工具。其配置保存在主板的prom固件中,配置的方式是通过在OBP命令行下进行配置。
我们能够通过他来:
调整启动设备和启动参数,如从光盘引导。
检测硬件故障
完成某些必须在操作系统启动之前完成的配置,如某些硬件设备的配置。
等等功能。
显然x86系统不会有OBP
1.Overview
用户界面
能够通过下面的方式进入OBP界面
• halt您的系统,init 1,等等
• 使用组合键 Stop-A
• 没有设定auto-boot?为ture的话每次开机自动进入
• 系统硬件检测到错误,并且不能跳过的话会进入OBP界面
(This is known as a Watchdog Reset.)
设备树
跟solaris操作系统的设备的物理命名方式相同。
设备别名
设备名通常是类似下面的格式
/sbus@1f,0/esp@0,40000/sd@3,0:a
在我们的使用中很不方便,使用设备别名却是我们的操作相当的方便
devalias
显示当前的别名配置
devalias alias
显示特定设备别名对应的物理设备名
devalias alias device-path
配置别名,假如alias有重复则覆盖掉旧值
注意:这样定义的别名重启不会保存,假如想永久的修改能够考虑nvalias,nvunalias命令,稍后会说到
显示设备树
可用的命令和功能描述
Command Description
.properties 显示当前所在设备节点的属性
dev device-path 选择某个设备节点
dev node-name 在当前设备节点的下级树查找某个设备节点,并且转换到第一个
dev .. 选择当前设备节点的上一级设备
dev / 选择设备的根节点
device-end 离开设备树
" device-path" find-device Choose device node, similar to dev.
ls 显示当前设备的下级设备
pwd 显示当前设备的物理连接路径
see wordname Decompile the specified word.
show-devs [device-path] 显示设备树,单纯show-devs显示整个机器的设备树
words 显示当前设备的名字
example:
ok dev /zs@1,f0000000
ok .properties
address ffee9000
port-b-ignore-cd
port-a-ignore-cd
keyboard
device_type serial
slave 00000001
intr 0000000c 00000000
interrupts 0000000c
reg 00000001 f0000000 00000008
name zs
ok dev /sbus/ACME,widget
ok show-devs
/SUNW,UltraSPARC@0,0
/sbus@1f,0
/counter-timer@1f,3c00
/virtual-memory
/memory@0,0
.
.
.
获取在线帮助
在ok提示符下能够使用下面的命令获取帮助
help 显示帮助的分类
help category 显示特定分类的可用命令,category使用提示的第一个单词
help command 显示特定命令的帮助
example:
ok help dump
Category: Memory access
dump ( addr length -- ) display memory at addr for length bytes
ok
警告:在操作系统已开始使用后,STOP-A进入OBP执行命令可能会失败,并且某些命令可能会使系统不可用需要重新启动。如:probe-scsi
2.Booting and Testing Your System
• Boot your system
• Run diagnostics
• Display system information
• Reset the system
Booting Your System
可用参数
• auto-boot?
确定系统加点后是否自动启动,默认一般是true,假如为false则自动进入OBP配置
即ok状态
• boot-command
这个参数用来配置当auto-boot?为true是启动系统使用的命令,默认为boot。您能够使用其他启动命令如:boot –s等。
• diag-switch?
假如为true则使用最大化自检启动系统。默认为false
• boot-device
设定自动启动时的启动设备,一般是您的安装操作系统的硬盘作为引导盘。
• boot-file
This variable contains the default boot arguments that are used when
OpenBoot is not in diagnostic mode.
• diag-device
This variable contains the name of the default diagnostic mode boot device.
• diag-file
This variable contains the default diagnostic mode boot arguments.
这些参数的修改会在下面的Setting Configuration Variables中讲到.
对于普通用户来说
通常的假如auto-boot?参数设定为true,boot命令会自动启动操作系统,并且会自动执行boot-file参数指定的程式或设定。假如想在auto-boot?为false或在ok模式下启动操作系统,使用boot命令。
Boot命令的使用:
格式:ok boot [device-specifier] [arguments]
Parameter Description
[device-specifier] 指定启动系统使用的设备,能够是物理设备名或别名,通常使用的是别名
cdrom (CD-ROM drive)
disk (hard disk)
floppy (3-1/2” diskette drive)
文章整理:西部数码--专业提供域名注册、虚拟主机服务
http://www.west263.com
以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢!



