您在这里:首页 > 学员专区 > 技术文章
Oracle视频
Oracle
CUUG课程

AIX服务器启动过程介绍

 

(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

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

 

(文章来自网络,如有侵权请来信告知,本站将在第一时间删除。)

相关文章 [上一篇] AIX服务器启动过程简单介绍
010-88589926(88587026)
CUUG热门培训课程
Oracle DBA就业培训
CUUG名师
网络课程
技术沙龙
最新动态

总机:(010)-88589926,88589826,88587026 QQ讨论群:243729577 182441349 邮箱:cuug_bj@cuug.com
通信地址:北京市海淀区紫竹院路98号北京化工大学科技园609室(CUUG)邮政编码:100089 
中国UNIX用户协会 Copyright 2010  ALL Rights Reserved 北京神脑资讯技术有限公司
京ICP备11008061号  京公网安备110108006275号