How To Work Linux's Boot Process
Simply speaking, computers that have a Linux Distro installed on them are Linux computers.
When you press the power button on a Linux computer, I will outline what goes on behind the scenes.
When I press the power button on the computer, the computer turns on. We already know that the operating system is up. But after pressing the power button, the first thing that runs is not the Operating System.
When the computer is turned on, BIOS (or) UEFI runs first. Note that BIOS or UEFI is used here. Some think they are the same. BIOS is actually an abbreviation for Basic Input Output System. UEFI stands for Unified Extensible Firmware Interface. Both are firmware interfaces that run when the computer is turned on. BIOS works with Master Boot Record (MBR) partition and can only handle HDD/SSD up to 2TB. UEFI uses GUID Partition Table (GPT) and has no size limit. Moreover, the boot time is fast. UEFI has more features and is more flexible. BIOS goes with Text Based Interface and UEFI can be seen as GUI version.
The BIOS or UEFI will run as soon as the computer is powered on. It works to enable you to use hardware devices such as CPU, HDD/SSD, RAM, Keyboard, etc. In doing so, we first check whether the hardware can work. If an error is found, the first step is to display the error on the screen. If there is no error at all, then open the Boot Loader software. (The boot menu in the BIOS setting has a boot order. Boot order is important when loading computers with Windows (or) Linux OS. You can specify which USB or DVD Disc or HDD will start booting first in the boot order)
That is, in BIOS, it will be in the Master Boot Record, and in UEFI, it can be found in a separate partition and usually ends with .efi. The main task of the boot loader file is to remember the location of the Kernel of the relevant Operating System and load it from there to the memory (RAM). Then run the Kernel code. Linux systems usually use GRUB (or) LiLo as their boot loader. LiLo is a Linux Loader. In the Debian Linux we use, such as Kali, Ubuntu, .., GRUB can be found mainly.
GRUB boot loader is the most used boot loader, so I will talk about GRUB. LiLo does the same thing.
GRUB Boot loader allows the user to select the kernel of the OS to be opened. (Because the user may have installed more than one OS. In the sample image above, you can see Kali and Windows 10 Dual boot menu)
After cooperating with the Kernel, the Start Up process can be completed.
When the Kernel runs and reaches the standby state, the Kernel takes over the computer's resources, and the background processes, Start running the service. It checks the hardware and loads device drivers and other Kernel Modules. Then the initial execution environment of the system can be setup. After the kernel's core components are done, the root file system can be mounted and the user-space environment can be setup.
Then start SystemV init (or) Upstart. In later Linux systems, systemd has been changed and used. So let's say you run systemd. systemd is a system & service manager for Linux OS. managing system services, It mainly works to handle daemons. He still has to coordinate in the boot process. For user space processes. systemd includes systemctl, journalctl, notify, analyze, cgl, cgtop, loginctl, nspawn etc. Daemons of systemd are systemd, journalctl, networks, loginuser, session, etc. A GUI for users acoustic Network connection like using wifi, turn off the computer, He also works on restarting. After that, we can start using our Linux system.
If you want to learn how to use Linux systems professionally, you can read the book "Linux for Hackers" (in Burmese).
Thank you, all
0 Comments