1.POST Power On Self Test
加电自检,这是启动一个系统的第一步(老的MCA架构的机器还要加上一个Build In Self Test BIST)。这个过程主要是机器中硬件的状态,可以在显示器上看到设备的图标,例如内存、键盘、网卡、声音设备等。
在这个过程中可以按功能键 ,进行SMS管理。
2.System Read Only Storage
System ROS根据机器的类型不同而不同,但是系统启动的必要步骤,System ROS找到Bootstrap的位置并加载,它包含的是通用的Boot code,与操作系统无关。
BootRecord通常位于硬盘的第一个扇区,512 bytes。
3.Software Read Only Storage
SoftWare ROS是一种 IPL 控制块,也就是Bootstrap,与操作系统兼容。这时在内存再创建RAMFS,最后找到BLV (Boot Logical Volume)并加载。
BLV中包含了AIX kernel、启动命令(bootinfo、cfgmgr)、精简版的ODM库、rc.boot脚本等内容
4.AIX kernel Load and configuration needed devices
加载AIX内核,配置一些设备,然后开始三次执行rc.boot脚本。这个时候LED上显示的是AIX的代码,之前的三个步骤都是Hardware code。
Boot Phrase 1
A.在RAMFS中执行rc.boot 1脚本
B.从BLV中复制精简版的ODM库,并restbase
C.在精简版的ODM库中cfgmgr -f 配置Varyon rootvg所需的设备
D.bootinfo -b 查找调用上次boot的设备。
Boot Phrase 2
A.使用ipl_varyon命令varyon rootvg。
B.fsck -f root文件系统,并临时mount在/mnt。
C.fsck -f /usr 文件系统,并mount
D.fsck -f /var 文件系统,并mount,与此同时执行copycore命令,检查是否有dump产生,如果有则从默认的dump Devices copy到/var/adm/ras,之后将/var文件系统umount。
E.激活paging space,/dev/hd6
F.将RAMFS中的Devices复制到Disk中
G.将RAMFS中的ODM复制到Disk中,并进行同步。
H.从新mount 根文件系统、usr文件系统、var文件系统。(正常的mount点,不再是RAMFS。)
Boot Phrase 3
在boot phrase 2执行完成之后,开始执行 Boot Phrase 3
A.执行/etc/init进程,init进程将读取/etc/inittab中的数据,并调用boot phrase,参数为3。
B.mount /tmp文件系统
C.调用syncvg,将rootvg的LV进行同步。
D.根据启动模式的不同,调用cfgmgr命令配置除base devices外的剩余设备。
normal boot cfgmgr -p 2
service boot cfgmgr -p 3
E.调用cfgcon命令配置console,如果没有stdout重定向到某个文件的话,那么启动信息将在console上显示。
F.将BLV和根文件系统中的ODM进行同步,并保存,savebase。
G.启动sycnd和errdemon进程。
H.LED display turn off。
I. 如果/etc/nologin文件存在,那么将会删除它。If the file /etc/nologin exists, it will be removed
J. 如果有任何设备被标记为missing,那么将在console上显示一条消息。If there are devices marked as missing in CuDv, a message is displayed on the console.
K. 到此rc.boot执行完成,将会给console发送已完成的信息。系统将继续执行init进程。
The message System initialization completed is sent to the console. The execution of rc.boot is has completed. Process init will continue processing the next command from /etc/inittab.
System Initialization
init进程进行最后的系统配置过程,init进程将查找并读取/etc/inittab:
1.如果/etc/inittab文件存在
A. 并有initdefault记录,那么将根据定义的run level引导启动系统
B. 没有initdefault记录,那么将向console发送一个消息,请求输入run level。如果输入S、s、M、m的话系统将进入Maintenance level。
2.如果/etc/inittab文件不存在,那么系统将进入Maintenance Level。
3.init 进程每隔 60 秒就检查一次 /etc/inittab ,如果对 /etc/inittab 有添加或修改,将会被执行。/etc/inittab文件控制着系统初始化进程的内容。它对记录的长度没有限制,但是inittab文件不能超过1024个字符。如果某条记录一行写不下,可以通过“\”符来表示接着的字符是这条记录的延续。
inittab文件的记录格式为:
Identifier:RunLevel:Action:Command
Identifier 标识符 记录的唯一标识,长度从1~14个字符
Runlevel 运行级别 0~9、a、b、c、h等,运行级别可以混合,如果没有指定的运行级别的话,那么默认为所有运行级别。
Action 定义的动作,例如respawn、once等等
Command 命令 所有合法的sh命令
0~1 系统保留运行级别
2 系统默认运行级别
3~9 预留用户定义的运行级别
a,b,c,h 虚拟运行级别,供telinit命令使用
S,s,M,m 维护模式运行级别/etc/inittab记录顺序
1. initdefault
2. sysinit
3. Powerfailure Detection (powerfail)
4. Multiuser check (rc)
5. /etc/firstboot (fbcheck)
6. System Resource Controller (srcmstr)
7. Start TCP/IP daemons (rctcpip)
8. Start NFS daemons (rcnfs)
9. cron
10.pb cleanup (piobe)
11.getty for the console (cons)
inittab文件相关命令
mkitab 创建一个新的记录 Adds records to the /etc/inittab file.
lsitab 显示记录内容 Lists records in the /etc/inittab file.
chitab 修改记录内容 Changes records in the /etc/inittab file.
rmitab 删除记录 Removes records from the /etc/inittab file.
bootlist 命令
-m Mode,模式。三种模式:normal、service、preboot (previous boot device)
bootlist -m normal -o 查看normal模式的启动设备列表
bootlist -m normal /dev/hdiskX /dev/hdiskX /dev/cd0 设置启动设备
bootlist -m normal /dev/hdiskX /dev/cd0 –i 取消指定的启动设备
bootlist -m normal -f filename 根据filename中的设备设置启动设备。
bosboot 命令
bosboot -ad /dev/hdiskX
alog 命令
alog命令可以用来查看boot process 的log,同样可以查看系统中其它alog类的log。
alog -L 查看系统中logtype
# alog -L
boot
bosinst
nim
console
cfg
lvmcfg
lvmt
dumpsymp
alog -t logtype -o
# alog -t boot -o
# alog -t bosinst -o
# alog -t nim -o
# alog -t console -o
# alog -t lvmcfg -o
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/801509/viewspace-604434/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/801509/viewspace-604434/