歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Unix知識 >> Unix基礎知識 >> AIX服務器的啟動過程

AIX服務器的啟動過程

日期:2017/3/3 15:20:40   编辑:Unix基礎知識

(1)啟動

當通過打開電源開關啟動系統或使用reboot和shutdown命令來啟動系統的時候,在系統可用之前,會發生以下幾個階段的事件:

<!--[if !supportLists]-->1, <!--[endif]-->ROS內核初始化階段

ROS 內核駐留在固件中

其初始化階段包括以下步驟:

a.)固件執行檢查以查看系統板是否存在任何問題。控制權傳遞到 ROS,它執行開機自檢(POST)。

b.)ROS 初始程序裝入(IPL)檢查用戶引導列表(可用引導設備的列表)。可使用 bootlist 命令來改變此引導列表以適應您的需要。如果非易失性隨機存取存儲器(NVRAM)中的用戶引導列表無效或找不到有效的引導設備,則檢查缺省引導列表。在任何一種情況下,在引導列表中找到的第一個有效引導設備將用於系統啟動。如果在 NVRAM 中存在有效的用戶引導列表,則依次檢查該列表中的設備。如果不存在用戶引導列表,則檢查總線上的所有適配器和設備。在其中任何一種情況下,將以一種連續循環的方式檢查設備,直到為系統啟動找到有效的引導設備。

注: 對於正常引導,系統保留位於 ROS 中的缺省引導列表和存儲於 NVRAM 中的用戶引導列表。還保留單獨的缺省和用戶引導列表以從服務關鍵位置進行引導。

c.)發現有效的引導設備時,檢查第一個記錄或程序扇區編號(PSN)。如果它是有效的引導記錄,則它被讀入內存並添加到內存中的 IPL 控制塊。包括在關鍵引導記錄數據中的是引導設備上的引導映像的起始位置、引導映像的長度以及在內存中的何處裝入引導映像的指示信息。

d.)從 NVRAM 中指定的位置開始,將引導映像從引導設備順序讀取到內存中。磁盤引導映像包括內核、RAM 文件系統和基本定制設備信息。

e.)控制權傳遞到內核,開始進行系統初始化。

f.)內核運行 init,此命令將運行 rc.boot 腳本的階段 1。

內核初始化階段完成時,基本設備配置開始。

(2)啟動階段一

init 進程會啟動 rc.boot 腳本。 rc.boot 腳本的階段 1 執行基本設備配置。

rc.boot 腳本的階段 1 包含以下步驟:

a.)引導腳本調用 restbase 程序以在 RAM 文件系統中從壓縮定制數據構建定制對象數據管理器(ODM)數據庫。

b.)引導腳本啟動配置管理器,它訪問階段 1 ODM 配置規則以配置基本設備。

c.)配置管理器啟動 sys、bus、disk、SCSI 和邏輯卷管理器(LVM)以及 rootvg 卷組配置方法。

d.)該配置方法裝入設備驅動程序、創建特殊文件並更新 ODM 數據庫中的定制數據。

(3)啟動階段二

引導系統(rc.boot階段2和3)

使用以下步驟完成系統引導階段。

init 進程啟動運行 rc.boot 腳本的階段 2。 rc.boot 的階段 2 包括以下步驟:

a.)調用 ipl_varyon 程序以使 rootvg 卷組聯機。

b.)將硬盤文件系統安裝在它們的正常安裝點上。

c.)運行 swapon 程序以啟動頁面調度。

d.)將定制數據從 RAM 文件系統中的 ODM 數據庫復制到硬盤文件系統中的 ODM 數據庫。

e.)退出 rc.boot 腳本。

在 rc.boot 的階段 2 後,引導過程從 RAM 文件系統(RAMFS)切換到硬盤根文件系統。

掛載rootvg的文件系統,使其變成availble狀態。現在分別掛載rootvg裡的/var和/usr文件系統。

然後 init 進程運行由 /etc/inittab 文件中的記錄定義的進程。/etc/inittab 文件中的一條指令運行rc.boot 腳本的階段 3,該階段包括以下步驟:

a.)安裝 /tmp 硬盤文件系統。

b.)Rootvg開始在後台同步呼叫syncvg命令,此時LED code會顯示553

c.)啟動普通模式cfgmgr階段 2 來配置所有剩余設備。啟動service mode模式cfgmgr則會選擇階段3去配置,cfgmgr會從ODM庫中讀取config_rules文件,並且會從rc.boot的階段2和3中調用相應的方法去配置其他設備。

d.)使用 savebase 命令將定制數據保存到引導邏輯卷。

d.)退出 rc.boot 腳本。

在此過程的最後,系統已啟動並可以使用。

boot LED code:

LED 201 - Damaged boot image

LED 223-229 - Invalid boot list

LED 551, 555, and 557 - Corrupted file system, corrupted JFS log, and so on

LED 552, 554, and 556 - Super block corrupted and corrupted customized ODM

database

LED 553 - Corrupted /etc/inittab file

LED c31: Console not yet configured. Provides instructions to select console.

LED c32: Console is an LFT terminal.

bootlist 常見選項

bootlist -m normal -o 顯示當前設定的bootlist

bootlist -m normal hdisk0 hdisk1 修改bootlist

系統運行級別

Table 4-4 Run levels available on AIX 5L

Run level Description

0-1 Reserved for the future use of the operating system.

2 Contains all of the terminal process and daemons that are run in the

multiuser environment. This is the default run level.

3-9 Can be defined according to the user’s preferences

a,b,c,h These are not true run levels; they differ from run levels in that the init

查看本欄目更多精彩內容:http://www.bianceng.cn/OS/unix/

command cannot request the entire system to enter these run levels.

See 4.3, “The /etc/inittab file” on page 98 for more information.

S,s,M,m Maintenance mode. When the system enters maintenance mode from

another run level, only the system console is used as the terminal.

Run level Description

顯示當前系統的運行級別

cat /etc/.init.state

列出系統運行級別的變化歷史

/usr/lib/acct/fwtmp </var/adm/wtmp |grep run-level

改變系統運行級別:

telinit N

/sbin/rc.boot 由init調用,在啟動的不同階段調用不同的參數。:

Booting from disk (boot phase 1)

Varying on a root volume group (boot phase 2)

Enabling file systems (boot phase 2)

Calling the BOS installation programs or diagnostics

/etc/rc 用於rc.boot之後啟動系統

Vary on all volume groups marked as auto-varyon.

Activate all paging spaces listed on /etc/swapspaces (using the swapon -a

command)。

Configure all dump devices (using the sysdumpdev -q command)。

Perform file system checks (using the fsck -fp command)。

Perform mounting of file systems marked as mount=true on the

/etc/filesystems file (using the mount all command)。

/etc/rc.net 啟動網絡

/etc/rc.tcpip啟動tcpip服務

inetd (started by default)

gated

routed

named

timed

rwhod

There are also daemons specific to the base operating system or to other

applications that can be started through the rc.tcpip file. These daemons are:

lpd

portmap

sendmail

syslogd

作者信息:51cto博客 Oracle小混子

Copyright © Linux教程網 All Rights Reserved