JohnPhan 发表于 2006-9-13 08:56:47

[转帖]Solaris OK状态下boot命令及参数

<div align="center"><table class="MsoNormalTable" cellspacing="0" cellpadding="0" width="654" border="0" style="WIDTH: 490.5pt; mso-cellspacing: 0cm; mso-padding-alt: 0cm 0cm 0cm 0cm;"><tbody><tr style="HEIGHT: 30pt; mso-yfti-irow: 0; mso-yfti-firstrow: yes;"><td width="654" style="BORDER-RIGHT: #d4d0c8; PADDING-RIGHT: 0cm; BORDER-TOP: #d4d0c8; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: #d4d0c8; WIDTH: 490.5pt; PADDING-TOP: 0cm; BORDER-BOTTOM: #d4d0c8; HEIGHT: 30pt; BACKGROUND-COLOR: transparent;"><p class="MsoNormal" align="center" style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: center; mso-pagination: widow-orphan;"><b><span lang="EN-US" style="FONT-SIZE: 18pt; COLOR: black; FONT-FAMILY: 宋体; mso-font-kerning: 0pt; mso-bidi-font-family: 宋体;">OK</span></b><b><span style="FONT-SIZE: 18pt; COLOR: black; FONT-FAMILY: 宋体; mso-font-kerning: 0pt; mso-bidi-font-family: 宋体;">状态下<span lang="EN-US">boot</span>命令及参数</span></b><span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: 宋体; mso-font-kerning: 0pt; mso-bidi-font-family: 宋体;"><p></p></span></p></td></tr><tr style="HEIGHT: 15pt; mso-yfti-irow: 1;"><td width="654" style="BORDER-RIGHT: #d4d0c8; PADDING-RIGHT: 0cm; BORDER-TOP: #d4d0c8; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: #d4d0c8; WIDTH: 490.5pt; PADDING-TOP: 0cm; BORDER-BOTTOM: #d4d0c8; HEIGHT: 15pt; BACKGROUND-COLOR: transparent;"><p class="MsoNormal" align="center" style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: center; mso-pagination: widow-orphan;"><span lang="EN-US" style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 宋体; mso-font-kerning: 0pt; mso-bidi-font-family: 宋体;"></span><span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: 宋体; mso-font-kerning: 0pt; mso-bidi-font-family: 宋体;"><p><font size="2"></font></p></span></p></td></tr><tr style="mso-yfti-irow: 2; mso-yfti-lastrow: yes;"><td width="654" style="BORDER-RIGHT: #d4d0c8; PADDING-RIGHT: 0cm; BORDER-TOP: #d4d0c8; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: #d4d0c8; WIDTH: 490.5pt; PADDING-TOP: 0cm; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: transparent;"><div align="center"><table class="MsoNormalTable" cellspacing="0" cellpadding="0" width="639" border="0" style="WIDTH: 479.25pt; mso-cellspacing: 0cm; mso-padding-alt: 0cm 0cm 0cm 0cm;"><tbody><tr style="mso-yfti-irow: 0; mso-yfti-firstrow: yes; mso-yfti-lastrow: yes;"><td valign="top" width="639" style="BORDER-RIGHT: #d4d0c8; PADDING-RIGHT: 0cm; BORDER-TOP: #d4d0c8; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: #d4d0c8; WIDTH: 479.25pt; PADDING-TOP: 0cm; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: transparent;"><p class="MsoNormal" align="left" style="MARGIN: 0cm 11.45pt 0pt 0cm; TEXT-ALIGN: left; mso-pagination: widow-orphan; mso-para-margin-right: 1.09gd;"><span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: 宋体; mso-font-kerning: 0pt; mso-bidi-font-family: 宋体;">BootPROM</span><span style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: 宋体; mso-font-kerning: 0pt; mso-bidi-font-family: 宋体;">相当于<span lang="EN-US">PC</span>的<span lang="EN-US">CMOS</span>,但SUN可以在<span lang="EN-US">BootRPOM</span>下运行一些命令,检测硬件和设置启动选项。<span lang="EN-US">&nbsp; <br/>Sun</span>系统包含下列两样基本硬件:<span lang="EN-US">&nbsp; <br/></span><span lang="EN-US">&nbsp;BootPROM</span>芯片<span lang="EN-US">&nbsp; <br/></span><span lang="EN-US">&nbsp;</span>非易失性存储器(<span lang="EN-US">NVRAM</span>):保存主机的<span lang="EN-US">ID</span>号和启动选项设置<span lang="EN-US">&nbsp; <br/>BootPROM</span>基本命令<span lang="EN-US">&nbsp; <br/></span><span lang="EN-US">&nbsp;banner&nbsp; <br/><br/>ok&nbsp;banner&nbsp; <br/>Sun&nbsp;UltraSPARC&nbsp;60&nbsp;UPA/PCI&nbsp;(2&nbsp;X&nbsp;UltraSPARC-II&nbsp;296MHz),&nbsp;Keyboard&nbsp;Present&nbsp; <br/>OpenBoot&nbsp;3.11,&nbsp;256&nbsp;MB&nbsp;memory&nbsp;installed,&nbsp;Serial&nbsp;#3159808.&nbsp; <br/>Ethernet&nbsp;address&nbsp;8:0:22:1a:e7:3f,&nbsp;Host&nbsp;ID:&nbsp;72303700.&nbsp; <br/>ok&nbsp; <br/><br/>banner</span>命令显示系统的基本配置信息,包括机器型号、<span lang="EN-US">CPU</span>数量和主频、内存大小、以太网地址、主机序列号等。<span lang="EN-US">&nbsp; <br/><br/></span><span lang="EN-US">&nbsp;boot&nbsp;</span>命令及参数<span lang="EN-US">&nbsp; <br/>ok&nbsp;boot&nbsp;&nbsp;-&nbsp;&nbsp; <br/><br/></span>选项包括:<span lang="EN-US">&nbsp; <br/>a&nbsp;</span>交互式启动操作系统<span lang="EN-US">&nbsp; <br/>r&nbsp;</span>重新配置操作系统硬件信息<span lang="EN-US">&nbsp; <br/>s&nbsp;</span>操作系统进入调试状态(单用户模式)<span lang="EN-US">&nbsp; <br/>v&nbsp;</span>显示启动信息的详细情况<span lang="EN-US">&nbsp; <br/>ok&nbsp;boot&nbsp;&nbsp;disk2&nbsp;-r&nbsp; <br/><br/></span><span lang="EN-US">&nbsp;printenv</span>命令<span lang="EN-US">&nbsp; <br/>printenv</span>命令显示<span lang="EN-US">NVRAM</span>变量的设置和缺省值。<span lang="EN-US">&nbsp; <br/><br/>ok&nbsp;printenv&nbsp; <br/>Parameter&nbsp;Name&nbsp;Value&nbsp;Default&nbsp;Value&nbsp; <br/>tpe-link-test?&nbsp;true&nbsp;true&nbsp; <br/>output-device&nbsp;ttya&nbsp;screen&nbsp; <br/>input-device&nbsp;ttya&nbsp;keyboard&nbsp; <br/>sbus-probe-list&nbsp;f0123&nbsp;f0123&nbsp; <br/>keyboard-click?&nbsp;false&nbsp;false&nbsp; <br/>diag-file&nbsp; <br/>diag-device&nbsp;net&nbsp;net&nbsp; <br/>boot-file&nbsp; <br/>boot-device&nbsp;disk2&nbsp;disk&nbsp; <br/>auto-boot?&nbsp;true&nbsp;true&nbsp; <br/>More&nbsp;[,,q]&nbsp;?&nbsp;q&nbsp; <br/>ok&nbsp; <br/><br/><br/><br/></span><span lang="EN-US">&nbsp;setenv</span>命令<span lang="EN-US">&nbsp; <br/>setenv</span>设置<span lang="EN-US">PROM</span>的参数值,常用的参数有:<span lang="EN-US">&nbsp; <br/></span>参数<span lang="EN-US">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>值<span lang="EN-US">&nbsp;</span>意义<span lang="EN-US">&nbsp; <br/>auto-boot?&nbsp;true&nbsp;</span>下次自动启动操作系统<span lang="EN-US">&nbsp; <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;false&nbsp;</span>下次启动停在<span lang="EN-US">OK</span>状态<span lang="EN-US">&nbsp; <br/>boot-device&nbsp;cdrom&nbsp;</span>从光驱启动操作系统<span lang="EN-US">&nbsp; <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;disk2&nbsp;</span>从第二个硬盘启动操作系统<span lang="EN-US">&nbsp; <br/></span>注:由于<span lang="EN-US">Ultra&nbsp;5</span>没有内置<span lang="EN-US">SCSI</span>口,只能加块带<span lang="EN-US">SCSI</span>口的网卡。此时设置启动盘应该是:<span lang="EN-US">&nbsp; <br/>ok&nbsp;setenv&nbsp;boot-device&nbsp;/pci@1f,0/pci@1/pci@1/SUNW,isptwo@4/sd@2,0:a&nbsp; <br/><br/>Ultra&nbsp;60</span>外置硬盘的启动应为:<span lang="EN-US">&nbsp; <br/><br/>ok&nbsp;setenv&nbsp;boot-device&nbsp;/pci@1f,4000/SCSI@3,1/disk@2,0:a&nbsp; <br/><br/></span><span lang="EN-US">&nbsp;set-defaults&nbsp; <br/></span>将<span lang="EN-US">NVRAM</span>的所有参数复原为默认值<span lang="EN-US">&nbsp; <br/></span>机器启动时的键盘输入<span lang="EN-US">&nbsp; <br/></span><span lang="EN-US">&nbsp;stop&nbsp; <br/></span>如果在系统加电自检时按下<span lang="EN-US">Stop</span>键,就取消<span lang="EN-US">POST</span>(加电自检)诊断,然后停留在<span lang="EN-US">OK</span>状态。<span lang="EN-US">&nbsp; <br/></span><span lang="EN-US">&nbsp;Stop+d&nbsp; <br/></span>在系统自检时同时按下<span lang="EN-US">stop</span>和<span lang="EN-US">d</span>键,系统将自动转到诊断模式,诊断模式下系统将更完全地进行自检。<span lang="EN-US">&nbsp; <br/></span><span lang="EN-US">&nbsp;Stop+n&nbsp; <br/></span>如果由于<span lang="EN-US">NVRAM</span>的设置不正确而导致系统无法正确启动时,可以在系统加电自检时同时按下<span lang="EN-US">stop</span>和<span lang="EN-US">n</span>键。它的作用是将<span lang="EN-US">NVRAM</span>的参数值设为默认值。<span lang="EN-US">&nbsp; <br/></span><span lang="EN-US">&nbsp;Stop+a&nbsp; <br/></span>同时按下<span lang="EN-US">stop</span>和<span lang="EN-US">a</span>键将中断操作系统的运行,退到<span lang="EN-US">OK</span>状态。<span lang="EN-US">&nbsp; <br/></span>警告:尽量不要在操作系统运行时按<span lang="EN-US">stop+a</span>,这将导致操作系统停止并且导致数据的丢失。在万不得以的时候,在按下<span lang="EN-US">stop+a</span>后,键入<span lang="EN-US">sync</span>命令用以将内存的数据同步到硬盘中。<span lang="EN-US">&nbsp; <br/></span>查找系统设备<span lang="EN-US">&nbsp; <br/></span><span lang="EN-US">&nbsp;probe-scsi-all&nbsp; <br/><br/>ok&nbsp;probe-scsi-all&nbsp; <br/>Target&nbsp;3&nbsp; <br/>Unit&nbsp;0&nbsp;Disk&nbsp;SEAGATE&nbsp;ST1480&nbsp;SUN0424626600190016&nbsp; <br/>Copyright&nbsp;(c)&nbsp; <br/>All&nbsp;Rights&nbsp;Reserved&nbsp; <br/>Target&nbsp;6&nbsp; <br/>Unit&nbsp;0&nbsp;Removable&nbsp;Read&nbsp;Only&nbsp;device&nbsp;SONY&nbsp;CD-ROM&nbsp; <br/><br/></span>这个命令查找系统的所有<span lang="EN-US">SCSI</span>设备。<span lang="EN-US">&nbsp; <br/></span>注:如果从操作系统中退出后再运行此命令可能会造成系统的死机。请先设置<span lang="EN-US">auto-boot?</span>为<span lang="EN-US">false</span>后再运行<span lang="EN-US">reset-all</span>,系统将重新自检,停留在<span lang="EN-US">OK</span>状态下,然后可以运行这个命令。<span lang="EN-US">&nbsp; <br/></span><span lang="EN-US">&nbsp;probe-ide&nbsp; <br/></span>查找系统的所有<span lang="EN-US">IDE</span>设备。<span lang="EN-US">&nbsp; <br/><br/>ok&nbsp;probe-ide&nbsp; <br/>Device&nbsp;0&nbsp;(&nbsp;Primary&nbsp;Master&nbsp;)&nbsp; <br/>ATA&nbsp;Model&nbsp;:&nbsp;ST&nbsp;34342A&nbsp; <br/>Device&nbsp;1&nbsp;(&nbsp;Primary&nbsp;Slave&nbsp;)&nbsp; <br/>Not&nbsp;Present&nbsp; <br/>Device&nbsp;2&nbsp;(&nbsp;Secondary&nbsp;Master&nbsp;)&nbsp; <br/>removable&nbsp;ATAPI&nbsp;Model&nbsp;:&nbsp;CDR-8240B&nbsp; <br/>Device&nbsp;3&nbsp;(&nbsp;Secondary&nbsp;Slave&nbsp;)&nbsp; <br/>Removable&nbsp;ATAPI&nbsp;Model&nbsp;yyyyyyyyyyyyyyy&nbsp; <br/><br/><br/></span>注:如果从操作系统中退出后再运行此命令可能会造成系统的死机。请现设置<span lang="EN-US">auto-boot?</span>为<span lang="EN-US">false</span>后再运行<span lang="EN-US">reset-all</span>,系统将重新自检,停留在<span lang="EN-US">OK</span>状态下,然后可以运行这个命令。<span lang="EN-US">&nbsp; <br/></span>设备检测<span lang="EN-US">&nbsp; <br/></span><span lang="EN-US">&nbsp;eject&nbsp; <br/></span>将软盘放入软驱,然后在输入<span lang="EN-US">eject</span>,软盘将自动弹出。<span lang="EN-US">&nbsp; <br/></span><span lang="EN-US">&nbsp;watch-net-all&nbsp; <br/></span>测试所有网卡和网络状态。每个网卡测试分两部分:<span lang="EN-US">loop-back</span>测试和网络线路测试。如果<span lang="EN-US">loop-back</span>(网卡自环)通过,说明网卡状态良好。如果网络线路测试没通过,说明网线没接收到信号,可能是网线没接好或是网线不好。<span lang="EN-US"><p></p></span></span></p></td></tr></tbody></table></div><p class="MsoNormal" align="center" style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: center; mso-pagination: widow-orphan;"><span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: 宋体; mso-font-kerning: 0pt; mso-bidi-font-family: 宋体;"><p></p></span></p></td></tr></tbody></table></div><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt;"><span lang="EN-US" style="COLOR: black;"><p><font face="Times New Roman">&nbsp;</font></p></span></p>

michelle 发表于 2006-10-10 23:26:00

支持
页: [1]
查看完整版本: [转帖]Solaris OK状态下boot命令及参数

免责声明:
本站所发布的一切破解补丁、注册机和注册信息及软件的解密分析文章仅限用于学习和研究目的;不得将上述内容用于商业或者非法用途,否则,一切后果请用户自负。本站信息来自网络,版权争议与本站无关。您必须在下载后的24个小时之内,从您的电脑中彻底删除上述内容。如果您喜欢该程序,请支持正版软件,购买注册,得到更好的正版服务。如有侵权请邮件与我们联系处理。

Mail To:Admin@SybaseBbs.com