[转帖]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"> <br/>Sun</span>系统包含下列两样基本硬件:<span lang="EN-US"> <br/></span><span lang="EN-US"> BootPROM</span>芯片<span lang="EN-US"> <br/></span><span lang="EN-US"> </span>非易失性存储器(<span lang="EN-US">NVRAM</span>):保存主机的<span lang="EN-US">ID</span>号和启动选项设置<span lang="EN-US"> <br/>BootPROM</span>基本命令<span lang="EN-US"> <br/></span><span lang="EN-US"> banner <br/><br/>ok banner <br/>Sun UltraSPARC 60 UPA/PCI (2 X UltraSPARC-II 296MHz), Keyboard Present <br/>OpenBoot 3.11, 256 MB memory installed, Serial #3159808. <br/>Ethernet address 8:0:22:1a:e7:3f, Host ID: 72303700. <br/>ok <br/><br/>banner</span>命令显示系统的基本配置信息,包括机器型号、<span lang="EN-US">CPU</span>数量和主频、内存大小、以太网地址、主机序列号等。<span lang="EN-US"> <br/><br/></span><span lang="EN-US"> boot </span>命令及参数<span lang="EN-US"> <br/>ok boot - <br/><br/></span>选项包括:<span lang="EN-US"> <br/>a </span>交互式启动操作系统<span lang="EN-US"> <br/>r </span>重新配置操作系统硬件信息<span lang="EN-US"> <br/>s </span>操作系统进入调试状态(单用户模式)<span lang="EN-US"> <br/>v </span>显示启动信息的详细情况<span lang="EN-US"> <br/>ok boot disk2 -r <br/><br/></span><span lang="EN-US"> printenv</span>命令<span lang="EN-US"> <br/>printenv</span>命令显示<span lang="EN-US">NVRAM</span>变量的设置和缺省值。<span lang="EN-US"> <br/><br/>ok printenv <br/>Parameter Name Value Default Value <br/>tpe-link-test? true true <br/>output-device ttya screen <br/>input-device ttya keyboard <br/>sbus-probe-list f0123 f0123 <br/>keyboard-click? false false <br/>diag-file <br/>diag-device net net <br/>boot-file <br/>boot-device disk2 disk <br/>auto-boot? true true <br/>More [,,q] ? q <br/>ok <br/><br/><br/><br/></span><span lang="EN-US"> setenv</span>命令<span lang="EN-US"> <br/>setenv</span>设置<span lang="EN-US">PROM</span>的参数值,常用的参数有:<span lang="EN-US"> <br/></span>参数<span lang="EN-US"> </span>值<span lang="EN-US"> </span>意义<span lang="EN-US"> <br/>auto-boot? true </span>下次自动启动操作系统<span lang="EN-US"> <br/> false </span>下次启动停在<span lang="EN-US">OK</span>状态<span lang="EN-US"> <br/>boot-device cdrom </span>从光驱启动操作系统<span lang="EN-US"> <br/> disk2 </span>从第二个硬盘启动操作系统<span lang="EN-US"> <br/></span>注:由于<span lang="EN-US">Ultra 5</span>没有内置<span lang="EN-US">SCSI</span>口,只能加块带<span lang="EN-US">SCSI</span>口的网卡。此时设置启动盘应该是:<span lang="EN-US"> <br/>ok setenv boot-device /pci@1f,0/pci@1/pci@1/SUNW,isptwo@4/sd@2,0:a <br/><br/>Ultra 60</span>外置硬盘的启动应为:<span lang="EN-US"> <br/><br/>ok setenv boot-device /pci@1f,4000/SCSI@3,1/disk@2,0:a <br/><br/></span><span lang="EN-US"> set-defaults <br/></span>将<span lang="EN-US">NVRAM</span>的所有参数复原为默认值<span lang="EN-US"> <br/></span>机器启动时的键盘输入<span lang="EN-US"> <br/></span><span lang="EN-US"> stop <br/></span>如果在系统加电自检时按下<span lang="EN-US">Stop</span>键,就取消<span lang="EN-US">POST</span>(加电自检)诊断,然后停留在<span lang="EN-US">OK</span>状态。<span lang="EN-US"> <br/></span><span lang="EN-US"> Stop+d <br/></span>在系统自检时同时按下<span lang="EN-US">stop</span>和<span lang="EN-US">d</span>键,系统将自动转到诊断模式,诊断模式下系统将更完全地进行自检。<span lang="EN-US"> <br/></span><span lang="EN-US"> Stop+n <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"> <br/></span><span lang="EN-US"> Stop+a <br/></span>同时按下<span lang="EN-US">stop</span>和<span lang="EN-US">a</span>键将中断操作系统的运行,退到<span lang="EN-US">OK</span>状态。<span lang="EN-US"> <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"> <br/></span>查找系统设备<span lang="EN-US"> <br/></span><span lang="EN-US"> probe-scsi-all <br/><br/>ok probe-scsi-all <br/>Target 3 <br/>Unit 0 Disk SEAGATE ST1480 SUN0424626600190016 <br/>Copyright (c) <br/>All Rights Reserved <br/>Target 6 <br/>Unit 0 Removable Read Only device SONY CD-ROM <br/><br/></span>这个命令查找系统的所有<span lang="EN-US">SCSI</span>设备。<span lang="EN-US"> <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"> <br/></span><span lang="EN-US"> probe-ide <br/></span>查找系统的所有<span lang="EN-US">IDE</span>设备。<span lang="EN-US"> <br/><br/>ok probe-ide <br/>Device 0 ( Primary Master ) <br/>ATA Model : ST 34342A <br/>Device 1 ( Primary Slave ) <br/>Not Present <br/>Device 2 ( Secondary Master ) <br/>removable ATAPI Model : CDR-8240B <br/>Device 3 ( Secondary Slave ) <br/>Removable ATAPI Model yyyyyyyyyyyyyyy <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"> <br/></span>设备检测<span lang="EN-US"> <br/></span><span lang="EN-US"> eject <br/></span>将软盘放入软驱,然后在输入<span lang="EN-US">eject</span>,软盘将自动弹出。<span lang="EN-US"> <br/></span><span lang="EN-US"> watch-net-all <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"> </font></p></span></p> 支持
页:
[1]