Linux system startup process

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.