Linux Init Process / PC Boot Procedure
上一篇 / 下一篇 2007-12-08 01:27:55 / 个人分类:软件开发
51Testing软件测试网:Vp)hf[*K
- BIOS: The Basic Input/Output System is the lowest level interface between the computer and peripherals.51Testing软件测试网 \D~MWg#PE0g
The BIOS performs integrity checks on memory and seeks instructions on the Master Boor Record (MBR) on the floppy drive or hard drive. - The MBR points to the boot loader (GRUB or LILO: Linux boot loader).
- Boot loader (GRUB or LILO) will then ask for the OS label which will identify which kernel to run and where it is located (hard drive and partition specified). The installation process requires to creation/identification of partitions and where to install the OS. GRUB/LILO are also configured during this process. The boot loader then loads the Linux operating system.
- See the YoLinux tutorial oncreating a boot diskfor more information on GRUB and LILO and also to learn how to put the MBR and boot loader on a floppy for system recovery.
- The first thing the kernel does is to executeinitprogram. Init is the root/parent of all processes executing on Linux.
- The first processes that init starts is a scrīpt/etc/rc.d/rc.sysinit
- Based on the appropriate run-level, scrīpts are executed to start various processes to run the system and make it functional.
51Testing软件测试网Q*M-E8g*?\
The Linux Init Processes: |
The init process is the last step in the boot procedure and identified by process id "1". Init is responsible for starting system processes as defined in the/etc/inittabfile. Init typically will start multiple instances of "getty" which waits for console logins which spawn one's user shell process. Upon shutdown, init controls the sequence and processes for shutdown. The init process is never shut down. It is a user process and not a kernel system process although it does run as root.51Testing软件测试网:rx.[Z8jVH&Tx
| X5AVk:yTz1W3J9t&Q0System Processes:
jIx;by;J;_0Process ID Descrīption 0 The Scheduler 1 The init process 2 kflushd 3 kupdate 4 kpiod 5 kswapd 6 mdrecoveryd
Init config file (Red Hat 7.3-9.0, Fedora Core 1-3):/etc/inittab51Testing软件测试网,S N9qM_v
5k-F9S1`,Z};Fa I6d0
Z{%l6W*? u0?MP:o%e o0# Author: Miquel van Smoorenburg,
"iz4t ?8e E)u0# Modified for RHS Linux by Marc Ewing and Donnie Barnes51Testing软件测试网"\7Z9Q-K-k[(R6O
*ct8R1J.}P5T$H0id:3:initdefault:
qj7|d`OD051Testing软件测试网o7@#a)W\
# System initialization.51Testing软件测试网 v9^r#c"xNP9Ki
si::sysinit:/etc/rc.d/rc.sysinit51Testing软件测试网FeSG&dIp:g
51Testing软件测试网8J|e ~z
l0:0:wait:/etc/rc.d/rc 051Testing软件测试网z;|etbP
l1:1:wait:/etc/rc.d/rc 151Testing软件测试网7O[_8f4[
l2:2:wait:/etc/rc.d/rc 2
4_l5hHnqg6h0l3:3:wait:/etc/rc.d/rc 351Testing软件测试网6yrUTQqn
l4:4:wait:/etc/rc.d/rc 451Testing软件测试网(B[H7WR d8v.c
l5:5:wait:/etc/rc.d/rc 5
j+o0T3u1r;X|.t0l6:6:wait:/etc/rc.d/rc 6
VQ|!G-st%U0