After pressing the power button until the Welcome page comes out, the total amount of Linux you can do is divided into five steps to complete.
The Linux boot process can be divided into several stages:
Post power-on self-Test-->bios (boot Sequence)--loads the MBR on the corresponding boot (bootloader)--and the master boot setting loads its Bootloader-->kernel initialization-- The Initrd->/etc/init process loads the/etc/inittab,
1, the BIOS power-on self-test:
Power-on self-test, testing hardware equipment. Then follow the CMOS sequence to search for a bootable device in the active state. It can be CD-ROM, floppy disk, USB, etc. Computer host Power on the time, you will hear a drop, the system starts the start of the post (Post-power on self,test) self-Test start), the process is mainly to detect computer hardware equipment such as: CPU, Memory, motherboard, video card, CMOS and other equipment failure exists, If there is a hardware failure, it will be in two cases: for a serious failure (fatal failure) downtime, at this time due to a variety of initialization operation is not completed, can not give any hint or signal, for non-serious failure to give a hint or sound alarm signal, waiting for user processing), if there is no fault, post complete its own relay task , handing over the tail work to the BIOS processing. When the computer power-on self-test is completed, the first reading is the BIOS (basic input output system, the basic input and outputs), the BIOS records the motherboard chipset and related settings, such as CPU and interface device communication frequency, boot device search order, The size and type of the hard disk, the system time, the external bus, the I/O address of the various interface devices, and the IRQ interrupt information that has been communicated with the CPU, so, start by reading the BIOS settings if you want to start smoothly.
2. Load the master boot loader (MBR):
The Master bootstrapper is a 512-byte image. Contains a bit of machine code and a small partition.
The task of the master bootstrapper is to find and load the secondary boot program on the hard disk partition. Finds the active partition through a partitioned table and reads the secondary boot loader that is in the active partition into memory to run .
3. Loading sub-boot Record program (GRUB)
The secondary boot loader loads the Linux kernel as long as it is loaded.
The boot loader runs in memory after the end of the previous phase. The Grub graphical interface will appear, allowing the user to choose what kernel to load.
4. Linux kernel Image:
After the user chooses which kernel to load, the secondary boot loader (GRUB) reads the Linux kernel image from the partition on which the/boot/resides, and then loads the kernel image into memory based on the information set in the/boot/grub.conf configuration file and give control over to the Linux kernel.
The Linux kernel gets control and starts doing its job.
1. Testing hardware
2. Unzip yourself and install the necessary drivers
3. Initialize the virtual device associated with the file system, LVM or raid
4, mount the root file system, hang under the root directory
5, after completion, Linux in the process space to load the INIT program, the following turn to init work
5. Init process
Init is the initiator and controller of all processes, and all processes are derived from this.
After the init process gains control, it executes the/etc/rc.d/rc.sysinit script, setting the environment variables, the network, starting swap, checking and mounting the file system, and performing other initialization tasks based on the code inside.
Linux boot process