|
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. |
|