The system boot process is the sequence of steps that the system follows when it is powered on or restarted. The system boot process can be divided into four main components: BIOS, bootloader, kernel, and init system. The order in which these components are started is:
BIOS: BIOS stands for Basic Input/Output System, and it is the first component that runs when the system is powered on. BIOS is a firmware program that is stored in a ROM chip on the motherboard, and it performs some basic tasks, such as:
initializing the hardware components and peripherals
performing the power-on self-test (POST) to check the system integrity
selecting a boot device from the boot order list
loading and executing the bootloader program from the boot device
Bootloader: Bootloader is a small program that is responsible for loading and executing the kernel. Bootloader is usually stored in the first sector of the boot device, which can be a hard disk, a USB drive, or a CD-ROM. Bootloader can also display a menu that allows the user to choose from different kernel images or operating systems. Some common bootloaders for Linux systems are GRUB, LILO, and SYSLINUX.
Kernel: Kernel is the core of the operating system, and it manages the system resources, controls the hardware devices, and provides basic services to other programs. Kernel is a large binary file that is compressed and stored in the boot device, usually in the /boot directory. Kernel is loaded into memory and executed by the bootloader, and it performs some tasks, such as:
decompressing itself and relocating to a higher memory address
detecting and initializing the hardware devices and drivers
mounting the root filesystem and creating a temporary filesystem in RAM
starting the init system, which is the first user-space program
Init system: Init system is the program that initializes the user-space environment and spawns all other processes. Init system is always the first process that runs on the system, and it has the process ID (PID) of 1. Init system can also perform some tasks, such as:
reading the configuration files and scripts that define the system services and runlevels
starting and stopping the system services and daemons
managing the system logins and terminals
running a graphical user interface or a command-line interface
Some common init systems for Linux systems are SysVinit, systemd, and Upstart.