免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1374 | 回复: 0
打印 上一主题 下一主题

OBP 学习(一) [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-06-28 17:55 |只看该作者 |倒序浏览
环境:一台U5,一台E450,两台机器之间用串口线连接起来。因为对OBP的一些相关操作不是很熟,需要一边看文档,所以才利用U5登录到U450上,其实效果等同于拿个笔记本,然后用串口线相联。
下面零零碎碎地讲一些我的相关操作:
1.登录:
[email=root@Ultra5]root@Ultra5[/email]
# tip -9600 /dev/ttyb
connected
再回车,输入用户名和密码
此时端口被独占,如果另有其它用户登录,则显示busy
[email=froot@Ultra5]froot@Ultra5[/email]
# tip -9600 /dev/ttyb
all ports busy

2.banner
{1} ok banner
Sun Enterprise 450 (2 X UltraSPARC-II 296MHz), No Keyboard
OpenBoot 3.30, 384 MB memory installed, Serial #8932396.
Ethernet address 8:0:20:88:4c:2c, Host ID: 80884c2c.
若直接对显示器操作,还可以看到sun的logo。

3.devalias
{1} ok devalias
screen                   /pci@4,4000/SUNW,m64B@4
disk                     /pci@1f,4000/scsi@3/disk@0,0
disk0                    /pci@1f,4000/scsi@3/disk@0,0
disk1                    /pci@1f,4000/scsi@3/disk@1,0
disk2                    /pci@1f,4000/scsi@3/disk@2,0
disk3                    /pci@1f,4000/scsi@3/disk@3,0
scsi                     /pci@1f,4000/scsi@3
diskx0                   /pci@1f,4000/scsi@2/disk@0,0
diskx1                   /pci@1f,4000/scsi@2/disk@1,0
diskx2                   /pci@1f,4000/scsi@2/disk@2,0
diskx3                   /pci@1f,4000/scsi@2/disk@3,0
cdrom                    /pci@1f,4000/scsi@2/disk@6,0:f
tape                     /pci@1f,4000/scsi@2/tape@4,0
scsix                    /pci@1f,4000/scsi@2
pci                      /pci@1f,4000
pcia                     /pci@1f,2000
pcib                     /pci@1f,4000
pci0                     /pci@1f,4000
pci1                     /pci@1f,2000
pci2                     /pci@4,4000
pci3                     /pci@4,2000
pci4                     /pci@6,4000
More [,,q,n,p,c] ?
pci5                     /pci@6,2000
flash                    /pci@1f,4000/ebus@1/flashprom@10,0
nvram                    /pci@1f,4000/ebus@1/eeprom@14,0
parallel                 /pci@1f,4000/ebus@1/ecpp@14,3043bc
net                      /pci@1f,4000/network@1,1
ebus                     /pci@1f,4000/ebus@1
i2c                      /pci@1f,4000/ebus@1/SUNW,envctrl
floppy                   /pci@1f,4000/ebus@1/fdthree
tty                      /pci@1f,4000/ebus@1/se
ttyb                     /pci@1f,4000/ebus@1/se:b
ttya                     /pci@1f,4000/ebus@1/se:a
keyboard!                /pci@1f,4000/ebus@1/su@14,3083f8:forcemode
keyboard                 /pci@1f,4000/ebus@1/su@14,3083f8
mouse                    /pci@1f,4000/ebus@1/su@14,3062f8
name                     aliases

在对设备进行重命名的时候可利用Ctrl+Y
EP.
ok show-disks
(select a disk from the list)
ok nvalias mydisk /pci@1f,0/pci@1/pci@1/SUNW,isptwo@4/sd
To paste the device path, for the selected disk, on the command line
press Control-y.
A shortcut provided with the show-disks command enables
you to select a device and use the Control-y keys to copy the device
path onto the command line.
这样做的好处在于避免人工输入错误。
For example:nvalias mydev ^Y

4.probe-fcal
to identify peripheral
devices on systems containing the Fiber Channel Arbitrated Loop
(FC-AL) GBIC Gigabit Interface Converters.

5.意外关机或误操作按了stop+a 造成系统挂起
Shutting down the Solaris operating system abruptly with
the Stop-a sequence, or with the halt command, creates a
condition where running the probe command hangs the
system unless you run the reset-all command first.
When the Solaris Operating Environment has been running before the
Stop-a key sequence, you must complete the following steps before
using the probe- commands, because these commands can cause the
system to freeze
解决方法:
If the Solaris Operating Environment had been running before the
Stop-a key sequence, enter the reset command at the ok prompt to
clear all buffers and registers before entering any diagnostic commands.


The reset command reads the changes to the environment variables.
The reset command halts the system, clears all buffers, registers the
system, and does one of the following:
l Reboots the system if the auto-boot? parameter is set to true
l Redisplays the ok prompt if the auto-boot? parameter is set to
false
之间最好先将auto-boot? 置为false
OK set auto-boot? false
OK reset

当系统已经调入了kernel或是在正常模式下你按了stop+a ,此时利用probe-scsi  probe-ide probe-scsi-all 时会出现如下提示:
{1} ok probe-scsi-all
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

6.diag-switch?
To run extensive POST diagnostics during power up using STOP-d
Power on the system while holding down the Stop key and the
“d” key simultaneously. This action sets the value of the parameter
diag-switch? to true. This also forces the system to boot from
the parameter diag-device. Its default value is usually set to
net.
The firmware automatically switches to diagnostic mode to run
extensive POST diagnostics on the system hardware.
By default, the parameter diag-level defaults to the maximum
(max) setting, which instructs POST to run all available tests.
By modifying the value of diag-level to the minimum (min)
setting, POST only runs an abbreviated set of tests, (in
approximately half the time of the maximum setting).

注释:stop+d相当于将setenv diag-swithc? true stop+d 将post的结果送到ttya
     diag-level 默认为maximum 如果设置为minimum 则Post所用时间仅为原来的一半
     最大化自检启动系统有什么好处?


7.set-default 和set-defaults ,后者将全部参数设为默认,前者指定具体参数为默认
设置好后可用printenv查看

8.boot device
device :设备别名,如:cdrom,disk,net
我输入boot device 这个命令后直接重启,不加任何参数

9.系统的配置信息
OBP中提供了几个命令来查看系统的信息,通过这些命令就可以大体的了解系统的配置信息
Command             Description
banner              Display power-on banner.
show-sbus           Display list of installed and probed SBus devices.
.enet-addr          Display current Ethernet address.
.idprom             Display ID PROM contents, formatted.
.traps              Display a list of processor-dependent trap types.
.version            Display version and date of the boot PROM.
.speed              Display processor and bus speeds

10.在OK提示符下关机命令是power-off,(中间有连字符-)有别于其它模式下的poweroff
因为此时只载入ok状态命令行程序,还没有载入shell

11.只要是OK提示符,都是无网络环境
The ok prompt indicates the Solaris Operating Environment is
currently not running.
无论你是在一开机的时候按下stop+a,还是已经正常进入init 3后再转入OK 提示符下,都是单机环境。



本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/26090/showart_330473.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP