The Linux kernel boot process __linux

Source: Internet
Author: User

Generally speaking:

Bios->mbr->grub (LILO)-> kernel-> user space

1. When the system is on, the CPU assigns the PC pointer to a specific address 0xffff0 and executes the instructions at that address. In the PC, the address is in the BIOS.

2. The BIOS searches for active, bootable devices in accordance with the sequence of boot settings in the CMOS. If it is a hard disk, read the MBR (512) byte into RAM and give control to the program.

3. The main boot loader finds and loads the secondary boot loader. It looks for the active partition in the partitioned table and scans the other partitions when an active partition is found to ensure that they are not active. When the process is complete, read the boot record of the active partition into RAM and execute it.

4. The secondary boot loader loads the Linux kernel and optional initial ramdisk and gives control to the Linux kernel.

5. Run the loaded kernel and start the user space application.

The process for kernel boot to user space is as follows:

Start ():/arch/i386/boot/head. S Basic hardware settings

Startup_32 ():/arch/i386/boot/compress/head. S initializes the page table and starts the inner paging mechanism.

Decompress_kernel ():/ARCH/I386/BOOT/COMPRESS/MISC.C

Startup_32 ();

Start_kernel ():/INIT/MAIN.C initialization interrupt, further setting of memory

Cpu_idle ():                                                                  /init/main.c

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.