- As soon as the machine is powered on, the system firmware(either UEFI or BIOS) runs a Power On Self Test (POST) and starts initialising some hardware.
- The system firmware then searches for a bootable device, which is either configured in UEFI boot firmware or by searching for Master Boot Record(MBR) on all disks in the order configured in BIOS.
- The system firmware reads a boot loader from disk and passes control to the boot loader(grub2)
- The boot loader loads it's configuration from disk and presents user with a menu of possible configurations to boot.
- The boot loader then loads the kernel and initramfs from disk and place them in memory. An initramfs is a gziped cpio archive containing kernel modules for all hardware necessary at boot, init scripts and more. The initramfs containes an entire usable system by itself.
- The bootloader hands control of the system to the kernel.
- The kernel initializes all hardware for which it can find driver in the initramfs, then executes /sbin/init from initramfs as PID 1. The initramfs contains a working copy of systemd as /sbin/init, as well as udev daemon in RHEL 7.
- The systemd instance from initramfs executes all units for initrd.target. This includes mounting the actual root file system on /sysroot
- The kernel root file system is switched from the initramfs root file system to system root file system that was previously mounted on sysroot. systemd then re-executes itself using copy of systemd installed on the system.
- systemd then looks for a default target, then starts(and stops) units to comply with the configuration for that target, solving dependancies between units automatically.
Monday, May 15, 2017
Linux 7 Boot Process
Subscribe to:
Post Comments (Atom)
Really Good blog post.provided a helpful information about Linux 7 boot process. keep updating...
ReplyDeleteDigital marketing company in Chennai