Linux boot process

Source: Internet
Author: User

Start process Diagram

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/5D/23/wKiom1UiBnGijFTzAACWX8oH45Q798.jpg "title=" Start diagram. png "alt=" wkiom1uibngijftzaacwx8oh45q798.jpg "/>

1. BIOS

A. post power-on self-test, test computer hardware

B. Initialize, assign interrupt number, external device initialization and detection

C. Read the CMOS information and load the boot drive's bootloader program according to the boot order . Handover work to bootloader

2. MBR

Interpretation: a narrow understanding as a guide program; generalized understanding as the first sector of the boot drive

First sector structure:

446

64

2

Code area (store bootstrapper)

HDD Partition Table DPT

Flag bit

3. Bootloader(grub)

Select a kernel from the pre-arranged list and load the kernel with the parameters specified by the system administrator. System boot to kernel control,grub can boot a system with two (more) cores.

4. kernel/initrd.img

A. system initialization, loading various modules

B.initrd.img is a virtual file system (a virtual hard disk image file) designed to allow the kernel to execute certain files in the virtual file system to load various modules. At the same time, identify the actual hard disk file system to load.

C. Executing the init process on a real file system

5. Init

a. run   rc.sysinit  REDHAT  &NBSP of the company; RHEL5  UPSTART  RC.SYSINIT&NBSP, The main tasks are to do the following.

L activating udev and selinux

L Setting the kernel parameters defined in /etc/sysctl.conf

L Setting the system clock

L load keymaps

L Enable swap partition

L Set host name (hostname)

L root partition Check and remount

L activating RAID and LVM devices

L turn on disk quotas

L Check and mount all file systems

L purge outdated locks and PID files

B.Run/ETC/RC.D/RCscript. According to the differentRunLevel,RCthe script will open to the shouldRunLevelof theRCX.DCatalogue(Xis thatrunlevel), locate and run all startup scripts that are stored in the directory. EachRunLevel Xhas one such directory, the directory name is/ETC/RC.D/RCX.D.

C. run the /etc/rc.d/rc.local script.


Linux boot 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.