Linux boot process  help us to troubleshoot if Linux server struck up in booting. This Linux Boot process made very faster compared to old versions. New version of Linux includes systemd which is replacement for init. Symbolic link from /sbin/init –> /usr/lib/systemd/systemd. Systemd has a full control to restart crashed services and its components.

Boot

 

Step 1:  Power ON –This is the first stage of booting process. When you power on your system the power is supplied to SMPS (switched-mode power supply). Then PGS (Power on boot signal) will execute to get power to all components.

Step 2: POST – (Power-on-Self-Test) is diagnostic testing sequence of  all the hardware  availability. For this it will send a signal to  each device, if an acknowledgement come from that device then the hardware is working otherwise it was removed from the system.

Step 3: BIOS – (Basic Input Output System) BIOS is program which verifies all the attached components and identifies device booting order. It will select the first boot device and gives back the control to Processor(CPU).

Step 4: MBR – (Master Boot Record)  is the first sector of the Hard Disk with a size of 512 bytes. It contains Initial Program Loader, Partition information and Magic Blocks.

mbr

 

  • Initial Program Loader(IPL) – Contains boot loader program which is 446 bytes in size.
  • Partition Table Information(PTI) – 64(4*16) Bytes of partition information will be located under MBR.
  • Magic Number – 2 bytes used for validation.

Step 5: GRUB – (Grand Unified Boot Loader) configuration file located in /boot/grub2/grub.cfg which actually points to initramfs is initial RAM disk, initial root file system will be mounted before real root file system.

Stage 1: boot.img is stored in the master boot record (MBR) or optionally in any of the volume boot records (VBRs), and addresses the next stage by an LBA48 address (thus, the 1024-cylinder limitation of GRUB legacy is avoided); at installation time it is configured to load the first sector of core.img.

Stage 1.5: core.img is by default written to the sectors between the MBR and the first partition, when these sectors are free and available. Once executed, core.img will load its configuration file and any other modules needed, particularly file system drivers; at installation time, it is generated from diskboot.img and configured to load the stage 2 by its file path.

Stage 2: files belonging to the stage 2 are all being held in the /boot/grub directory, which is a subdirectory of the /boot directory specified by the Filesystem Hierarchy Standard (FHS).

Step 6: KERNEL – GRUB2 config file will invoke boot menu when boot is processed, kernel will load. Kernel once loaded into  RAM it always resides on RAM until the machine is shutdown. Once the Kernel starts its operations the first thing it do is executing Systemd process.

Step 7 : SYSTEMD -Systemd is the parent process of all the process takes over to initialize the system and start all the system services, systemd always hold PID 1.

As there is not a strict order in which services are started when a RHEL 7 (systemd) system is booted, there is a structure to the boot process. The direction that the systemd process takes at boot time depends on the default.target file. If lot many services enabled in default.target boot process will become slow.

Step 8: TARGET – Once that’s done, systemd to start the display-manager service (/etc/systemd/system/display-manager.service), which runs the GNOME display manager(/usr/sbin/gdm).

You got the Login Screen and prompt for credential to login.

Please follow and like us: