免费注册 查看新帖 |

Chinaunix

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

OBP devalias的问题 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2012-04-03 09:57 |只看该作者 |倒序浏览
有一台E250,在OBP下用devalias能看到disk, disk0, disk1, disk2, disk3 .... cdrom

即使只插入一个硬盘,这些disk1,2...都还存在

不是说devalias建的别名是临时的,reset-all后都会消失,为什么我执行reset-all后还存在呢?

谢谢大家。

论坛徽章:
1
操作系统版块每日发帖之星
日期:2015-10-08 06:20:00
2 [报告]
发表于 2012-04-03 10:25 |只看该作者
回复 1# ragecf

nvalias不是建临时的的别名喔~~
   

论坛徽章:
0
3 [报告]
发表于 2012-04-03 12:59 |只看该作者
回复 2# roger1402001

不好意思,我说的是devlias看到的这些别名,您的意思是这些别名是用nvalias建出来的?那为什么不存在于nvramrc中呢?


   

论坛徽章:
1
操作系统版块每日发帖之星
日期:2015-10-08 06:20:00
4 [报告]
发表于 2012-04-03 13:05 |只看该作者
回复 3# ragecf

Reference http://www.unix.com/unix-dummies ... s-sun-hardware.html

1) Creating a boot alias using nvalias from the OpenBoot PROM command line.

Get the device path for the boot disk:

# ls -la /dev/dsk/cxtxdxsx

Write down the entire (physical) path to be used for the alias.

Shutdown the system to the ok prompt.

Create the alias:

ok nvalias <alias> <device-path>

Example:

ok nvalias newdisk /iommu@f,e0000000/sbus@f,e0001000/esp@f,800000/sd@3,0:a

or for PCI based systems:

ok nvalias newdisk /pci@1f,0/pci@1/scsi@3,1/disk@3,0

NOTE: Although format will show the pci device with a "sd" designation, a translation is made as the OBP's device tree is 'disk'. This is the only name that the firmware will understand.

Modify the NVRAM so that it boots from the new alias automatically:

ok setenv boot-device newdisk

ok reset

The above will be valid till you run set-defaults or nvunalias from the ok prompt..

******************************************************************************
2) Alternate method for creating a boot alias using nvedit.

Use the NVRAM editor to create a script that will create the boot alias at reset:

ok nvedit

0: devalias newdisk /iommu@f,e0000000/sbus@f,e0001000/esp@f,800000/sd@3,0:a

^c (control c)

ok nvstore

ok setenv use-nvramrc? true

ok reset

******************************************************************************
3) Alternate method for creating a boot alias using existing device aliases provided in the OpenBoot PROM.

Use the devalias command to identify the existing device aliases:

ok devalias

The device alias names are listed on the left side of the output. Any of the device alias names that point to disk drives can be used as boot aliases.

Use one of the device alias names to set a new boot device:

ok setenv boot-device <new device alias name>

Display the new boot device alias:

ok printenv boot-device

Test the new boot alias by resetting the machine;

ok reset


Note: The device path above is an example only; you will not necessarily have the same path.
Note: The "0:" in the nvedit example (method 2) is the line number; do not type it as part of your edit.   

论坛徽章:
0
5 [报告]
发表于 2012-04-03 13:31 |只看该作者
回复 4# roger1402001


    谢谢,看来像是第三点解释了我的疑问,也就是disk, disk0...cdrom这些别名是OBP缺省提供的

论坛徽章:
1
操作系统版块每日发帖之星
日期:2015-10-08 06:20:00
6 [报告]
发表于 2012-04-03 13:41 |只看该作者
回复 5# ragecf


Good ~~~~   
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP