曲径通幽论坛

 找回密码
 立即注册
搜索
查看: 4501|回复: 1
打印 上一主题 下一主题

An abbreviated description of the Linux Boot up process

[复制链接]

4918

主题

5880

帖子

3万

积分

GROAD

曲径通幽,安觅芳踪。

Rank: 6Rank: 6

积分
34387
跳转到指定楼层
楼主
发表于 2008-12-7 01:43:43 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
1、The LILO boot loader starts the kernel

2、The Linux kernel configured by lilo or rdev decompresses and must findand mount the root filesystem. If LILO or the kernel were notconfigured properly there can be a problem here.

3、The kernel after loading the root filesystem, starts the "init" programwhich may be located in /sbin/init. Reads /etc/inittab forconfiguration information.

4、/etc/inittab - init reads this file for configuration information. Thisfile determines the starting run level and contains a line like:
si::sysinit:/etc/rc.d/rc.sysinit
<注:rc 的意思是 run command>

5、/etc/rc.d/rc.sysinit - In this case this entry in "/etc/inittab" causes the script file "/etc/rc.d/rc.sysinit" to be run.
      To add terminals or dial in modem lines on a system, add more lines inthe /etc/inittab file, one for each terminal or dial in line similar tothe following:
7:2345:respawn:/sbin/mingetty tty7

6、One of /etc/rc.d/rc or /etc/rc or /etc/init.d/rc is started frominittab which does initialization commands for boot at the setrunlevel. This is done by running startup and shutdown scripts forvarious services to be run at the given run level.

7、/etc/rc.local is started from one of the startup scripts in the rcscript file. This is where you should add custom features for yoursystem.(自定义启动项)

8、getty - Init starts a separate getty (or mingetty) for each terminalfor which logins are to be allowed. Getty is restarted by init aftereach user has logged out so new users can log in. Network logins arenot done by getty but by a different deamon per way of logging in(telnet or rlogin handled by the inetd internet super daemon).

9、Getty outputs the welcome message in /etc/issue, reads the username andruns the login program. If the user is telnetting, the message in/etc/issue.net is first output.

10、The login program reads the password and runs the shell if the usernameand password are correct. The shell is based on entries in the/etc/passwd file and will run at the user's privilege level rather thanwith root privileges.

11、The shell (such as bash) runs the /etc/profile script file. However inthe case of a system with shadow passwords, environment strings can beset first in a file called /etc/login.defs. Also a users resources canbe limited in a file called /etc/limits. The $HOME/.bash_profile scriptis then run, but if it is missing /etc/.profile is run.

4918

主题

5880

帖子

3万

积分

GROAD

曲径通幽,安觅芳踪。

Rank: 6Rank: 6

积分
34387
沙发
 楼主| 发表于 2008-12-7 01:45:34 | 只看该作者
1、Lilo boot-loader 启动 kernel(现在大多用grub来引导)。

2、linux 内核找到并挂载根文件系统。如果 LILO 或者 kernel 没有正确配置,那么这里就会产生有问题

3、在装在了根文件系统后,内核启动 init 这个程序---
init 程序位于 /sbin/init . 这个程序读取 /etc/inittab 以得到相应的配置信息。

4、/etc/inittab ---- init 读取这个文件以获得相关的配置信息。这文件决定了启动的“运行等级”( run level ) 并且包含像下面的一行:
# System initialization.
si::sysinit:/etc/rc.d/rc.sysinit

5、/etc/rc.d/rc.sysinit ---- 在 /etc/inittab 中,上面的语句使 /etc/rc.d/rc.sysinit 这个脚本文件得以运行。
      如果需要增加一个终端,那么可以在 /etc/inittab 中适当的地方增加下面如下示例的一行:
7:2345:respawn:/sbin/mingetty tty7

6、从 inittab 中启动 /etc/rc.d/rc, /etc/rc, /etc/init.d/rc 中的一个(脚本程序),进行

One of /etc/rc.d/rc or /etc/rc or /etc/init.d/rc is started frominittab which does initialization commands for boot at the setrunlevel. This is done by running startup and shutdown scripts forvarious services to be run at the given run level.
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Archiver|曲径通幽 ( 琼ICP备11001422号-1|公安备案:46900502000207 )

GMT+8, 2024-5-28 06:57 , Processed in 0.064109 second(s), 21 queries .

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表