Linux boot process [original]

The entire boot process of Linux is:

  1. Load the hardware information of the BIOS and obtain the code name of the first boot device

  2. Read the boot information of the boot Loader (grub) of the MBR of the first boot device

  3. Load the OS Kernel information, decompress the Kernel, and try to drive the hardware (initrd.img file)

  4. Kernel executes the init program and obtains run-level information (0~6), From /etc/inittab

  5. The init process executes /etc/rc.d/rc.sysinit

  6. Start the kernel plug-in module (/etc/modprobe.conf)

  7. init executes various Scripts of the run-level and starts the service

  8. init executes /etc/rc.d/rc.local

  9. Execute /bin/login and wait for the user to log in

  10. Enter Shell after Login

run-level:

  0 -- shutdown

  1 -- single user

  2 -- Multiuser without network

  3 -- Multi-User with Networking

  4 -- reserved

  5 -- GUI interface

  6 -- reboot

Hardware information in BIOS:

  MBR (Master Boot Record), grub, BootLeader

init process:

  PID is 1

Embedded Authentication Module PAM:

  Verify user password, you can set the user's login method, etc. (local login, or restricted to log in from a certain IP)

 

  

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324930521&siteId=291194637