- 論壇徽章:
- 0
|
Topic 202: 系統(tǒng)啟動(System Startup)Topic 202: 系統(tǒng)啟動(System Startup)Henry Hu2010/2/22
Table of Contents
202.1 定制系統(tǒng)啟動和自舉過程
大綱
inittab
系統(tǒng)初始化腳本
定制運行層級(runlevels)
定制initrd鏡像(initrd images)
202.1 定制系統(tǒng)啟動和自舉過程大綱
權(quán)重:4(原為)
要求:
Description: Candidates should be able to query and modify the behaviour of system services at various run levels. A thorough understanding of the init structure and boot process is required. This objective includes interacting with runlevels.
主要知識范圍:
Linux Standard Base Specification (LSB)
文件、術語、和應用程序:
/etc/inittab/etc/init.d//etc/rc.d/chkconfigupdate-rc.d
在101中也有專門一章,這里更進一步,因此,在這里的涉及內(nèi)容將不止于201考試涉及的內(nèi)容,也包括101所涉及的內(nèi)容。
inittab
runlevels:(所有版本都一樣的)
016
在RedHat,SUEU中,以及大多數(shù)發(fā)行版中,都可以找到/etc/inittab文件,這是傳統(tǒng)做法。但是,在Ubuntu中,這被upstart所替代,在以下地址你可以找到詳細信息:http://upstart.ubuntu.com/index.html。在其首頁上是這樣描述upstart:
Upstart is an event-based replacement for the /sbin/init daemon which handles starting of tasks and services during boot, stopping them during shutdown and supervising them while the system is running.
It was originally developed for Ubuntu distribution, but is intended to be suitable for deployment in all Linux distributions as a replacement for the venerable System-V init.
問題:在Ubuntu中沒有找到/etc/inittab,但是也沒有upstart命令。這意味著Ubuntu仍然在使用/sbin/init命令。需要進一步了解upstart的具體作用。
使用命令“man 8 init“,顯示在Ubuntu下啟動腳本的執(zhí)行方式:On startup *init* reads the /etc/event.d directory, each file describes a job that should be managed. This includes the particulars about what binary or shell script code should be executed while the job is running, and which events can cause the job to be started or stopped. 問題1:關于二進制文件及腳本是指什么不是很清楚。問題2:進程號為1的進程與init命令是同一事物?問題3:/etc/event.d/目錄下全是文本文件,如何區(qū)分在哪種情況下執(zhí)行那些文件?
系統(tǒng)初始化腳本定制運行層級(runlevels)定制initrd鏡像(initrd images)
本文來自ChinaUnix博客,如果查看原文請點:http://blog.chinaunix.net/u/15515/showart_2186320.html |
|