- 论坛徽章:
- 0
|
Topic 202: 系统启动(System Startup)Topic 202: 系统启动(System Startup)Henry Hu2010/2/22
Table of Contents
202.1 定制系统启动和自举过程
大纲
inittab
系统初始化脚本
定制运行层级(runlevels)
定制initrd镜像(initrd images)
202.1 定制系统启动和自举过程大纲
权重: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中也有专门一章,这里更进一步,因此,在这里的涉及内容将不止于201考试涉及的内容,也包括101所涉及的内容。
inittab
runlevels:(所有版本都一样的)
016
在RedHat,SUEU中,以及大多数发行版中,都可以找到/etc/inittab文件,这是传统做法。但是,在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下启动脚本的执行方式: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/目录下全是文本文件,如何区分在哪种情况下执行那些文件?
系统初始化脚本定制运行层级(runlevels)定制initrd镜像(initrd images)
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/15515/showart_2186320.html |
|