[ 永遠的UNIX::UNIX技術資料的寶庫 ]   GB | BIG5

首頁 > 系統管理 > HP-UX > 正文
hpux啟動過程
本文出自:http://www.hp.com.cn 作者: xli14 (2002-01-29 20:02:42)
本人這幾天正好也在研究hpux的啟動過程,以及isl/hpux等之間的關系,正好zhuzhou_2001也相 
同的問題,所以雖然需要花很多的時間,同時在B2000上作了一些試驗。下面是我的總結,由我 
實在B2000中作的試驗,如與其他系列機型不同,請大家做出補充。 

hpux的啟動過程概況如下: 
pdc(Processor-dependent-code,在rom中,完成硬件自檢 
| 讀取stable storge中的信息,如autosearch, 
| primarypath等等,然調用isl 
isl (Initial system loader,在boot盤的lif區域。lif 
| 區域主要有四個文件,分別是sl,hpux,AUTO,LABEL 
| 在#下,可以使用lifls命令察看,同時可以使用 
| lifcp 察看AUTO的內容。 
| isl的主要任務是執行lif區域的hpux,同時也可 
| 以改變stable storge中的部分信息,如 
| primarypath,autoboot等等 
hpux 引導os,主要是讀取/stand/vmunix文件,同時把 
| 控制權交給內核, 

init 從這裡開始,就是軟件之間的啟動了 

說明: 
1。hpux在系統的啟動時是按照stable storge 中設置的 
primarypath/alterpath/其他等來搜尋可引導盤的, 
直到發現可引導盤為止,否則就會停在main command 
狀態。如果發現可引導盤,就到了isl狀態 
2。如果你忘了root密碼,而且security=on的話, 
如果你想獲取密碼,這只能拔掉硬盤。才能進入 
單用戶狀態。 
3。如果你設置了security=on,你想將它恢復成 
security=off的話,可以這樣,不用拔掉硬盤, 
但需要使用光盤用recovery恢復系統。 
在#下山掉isl  
#lifrm /dev/rdsk/c2t6d0:ISL 
#lifcp /dev/rdsk/c2t6d0:LABEL /dev/rdsk/c2t6d0:ISL 
其中/dev/rdsk/c2t6d0為你的boot盤路徑。關為什要使用lifcp請看注釋 
這樣reboot以,就會停在main command下,就可以 
恢復security=on了,不過現在你的硬盤不能啟動 
了,你現在需要從光盤啟動,到recovery shell中, 
然,從新生成boot盤的bootlif的東西) 

4。如果你想改成光盤啟動(重裝系統之類的),這就更簡單了,到 
#下,使用setboot命令,將光盤的路徑設為primarypath就可以了 
使用命令 setboot -p 10/0/15/0.0.0 
同時,最好將原boot盤設為alternativepath 
使用命令:setboot -a 10/0/14/0.0.0 假設 
10/0/15/0.0.0為光盤,10/0//14/0.0.0為硬盤 

############################################### 

注釋: 
Problem Description 

When I do lifrm /dev/dsk/c0t6d0:ISL to remove the ISL area from 
the LIF area (boot area) on my boot disk, and I reboot the system, 
I am still able to go to ISL and boot -is and boot -lm. 

Why is this possible? 

Configuration Info 

Operating System - HPUX 
Version - 11.0 
Hardware System - HP 9000 
Series - D350 

Solution 

LIF is a filesystem structure that contains continuous files. 
lifrm is nothing but purging file, and in that fs structure, all that 
means is that the file type is set to PURGED, while nothing else is 
touched. When booting, the system is looking for the file by name 
and does not care about it's type; therefore, it finds the file and 
boots. But, since the file type now is PURGED, then any lifcp 
of a smaller file than ISL will use the first area in LIF that fits. 
It will sit on top of ISL and will render the system unbootable. 
   
  
(http://www.fanqiang.com)
    進入【UNIX論壇

相關文章
 

★  樊強制作 歡迎分享  ★