From the course: Cert Prep: LPIC-1 Exam 101 (Version 5.0)

Understand the Linux boot process - Linux Tutorial

From the course: Cert Prep: LPIC-1 Exam 101 (Version 5.0)

Start my 1-month free trial

Understand the Linux boot process

- A Linux system goes through several stages when booting. First, the Firmware stage. Next, the Boot loader stage, then the Kernel stage, and lastly, the Initialization stage. During the Firmware stage, the computer runs code in either the BIOS or UEFI during power on self test, otherwise known as POST. Older computers have a BIOS and newer computers use UEFI. After the Firmware stage, the BIOS or UEFI executes the Boot loader stage. In the case of Enterprise Linux or other modern distributions such as Ubuntu, the boot loader is GRUB2 or Grand Unified Bootloader version 2. GRUBs job is to read in this configuration file and boot to Linux kernel. In the case of a BIOS machine, GRUB usually reads in flashboot/grub2/grub.cfg For UEFI systems, the location can vary. The Boot loader then executes to Kernel. During the Kernel stage, the kernel loads a RAM Disk into memory. This RAM Disk serves as a temporary root file system. This file system includes kernel modules, drivers, and possibly even installation automation files. So, just kickstart files. Later, the kernel unmounts on RAM Disk and mounts the root file system on the hard drive and then starts the initialization stage by executing the first process. In the Initialization stage, the grandfather process runs. In older versions of Linux, this was the sys file init process. Init was replaced by Upstart in many distributions such as Red Hat and Ubuntu. And now Upstart has been replaced by systemd. Systemd then starts all other system services. One of these services would be a login shell or a graphical interface. When it's finished, the OS is ready to be used. Systemd has the concept of targets that are similar to the old sys file init run levels. You can think of a target as a system configuration, for instance by default Enterprise Linux boots into the graphical target. A system can be booted into different targets. There are targets for different purposes such as rescuing a system after a crash.

Contents