650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/5B/59/wKioL1UG-g7yJZrsAAHAdgJ_bZY664.jpg "title=" Linux Process-start.png "alt=" Wkiol1ug-g7yjzrsaahadgj_bzy664.jpg "/>
For the Linux startup process, it's a very complicated process.
Let me introduce you here:
1, when we press the power button, our BIOS① will check the hardware (CPU, video card, hard disk, optical drive, etc.) whether there is a problem, get the host hardware configuration, will go to find the boot device, here is the hard disk, find the hard disk MBR②, This is where control is handed over to the MBR.
2, MBR function is to find installed in the MBR of the grub③ menu, that is, boot loader, then grub will be the system's kernel (kernel) to boot out
3, when the boot loader read to the kernel file, the kernel will be loaded into memory, the kernel will replace the function of the BIOS, re-check the hardware, after the successful hardware driver, kernel will actively call the INIT process
4, then will initialize the system, init will get/etc/inittab④ information, get the system's operating level
5. Init executes/etc/rc.d/rc.sysinit⑤ file to prepare the operating environment (network, time zone, etc.) for software execution
6, init execution run-level of the various services, etc.
7. Init execution/etc/rc.d/rc.local⑥ file
8, init execution Terminal simulation program Mingetty to start the login process, the end is waiting for the user login
①bios:basic input Output system.
It is a firmware, written on the motherboard of a ROM chip program, CMOS is ROM chip, is a hardware, to be different from
②mbr:master boot record, master boot recording. The 0 cylinders, 0 heads, and 1 sectors of the hard disk are referred to as the primary boot sector .
There are 512 bytes: the Master boot program (boot loader) takes 446 bytes
Partition table information: accounted for 64 bytes
End Check bit: 2 bytes (fixed to 22AA)
③grub:grand Unified Bootloader, multiple operating system Boot manager. Grub can be used to select different cores on the operating system partition or to pass startup parameters to those cores .
④/etc/inittab: This configuration file will go to the default run which level of the system, Id:5:initdefault: means that the default to run a 5-level system
⑤/etc/rc.d/rc.sysinit: Will set the hostname, start the network service, load the external device (mouse, keyboard) anyway is to load various system services, set up the system environment.
This article is from "Xiao Xu" blog, please be sure to keep this source http://loopholes.blog.51cto.com/9445813/1621294
Linux startup process to answer the interviewer's own personal