1.power on
2. Hardware boot phase.
BIOS (Basic input/output System) power-on self-test. Initialize hardware, such as memory, video card, disk, etc. Then find the boot media, such as the optical drive, USB, hard disk, etc. Find the first sector in the boot media, 0 heads, 0 lanes, 1 sectors. Which is where the MBR is located. (MBR accounts for 512 bytes divided into 3 parts, first, bootloader occupies 446 bytes, second, partition table, occupies 64 itself, third, checksum, takes up 2 bytes). Other grub is installed in the bootloader.
3.GRUB Boot boot phase
This stage is divided into Stage1 and Stage2, and Stage1_5,stage1 is in bootloader. Stage2 larger, there are hard drives, but 1 and 2 can not communicate directly, so there are 1_5 to do the role of the bridge. Kernel and kernel mirroring is found through the/boot/grub/grub.conf file.
4. Kernel Boot phase
Executive/BOOT/INITRD
Frees the Root-filesystem in memory for kernel to execute the/sbin/init process in the real root file system. (The/sbin/init process is the ancestor process of all processes)
5. Initialization phase
The/sbin/init process obtains the start level through the/etc/inittab file. Then through the/etc/rc.sysinit Execution system initialization (network, time, firewall, etc.), which will also execute/etc/rc.d/rc.local this file, to perform some user-defined boot. Next, execute the script under the/etc/rc.d/rc*.d/directory by the boot level you found earlier. (* is 0-6) (the start of the script that starts with K does not start and starts with S.) )
Next, start the/sbin/mingetty to start the 6 TTY, and if there is an interface, it will start an interface.
6. Start complete.
You can enter the password and log in to the system.
Linux system startup process