Booting a computer is the very first step to use the system. No matter which operating system you chose to run your system, you need to know how to boot the system. In Linux, the necessary steps for booting a computer is a very straightforward process. If you use a personal computer (PC), you might find the CPU power switch. On the other hand, if you are using a notebook or a laptop, you would find the power button right above the keyboard. Nowadays, some notebook manufacturing companies are often placing the power button along with the keyboard to make the system compact.
However, a Linux system’s booting procedure is an effortless and uncomplicated task, but knowing tiny detailed information about the Linux boot process might help you if you fall into any troubles while booting the system.
Linux Boot Process
In Linux, the login page is handled by the GNOME Display Manager (GDM) or the LightDM. When you press the power button, an electrical signal passes through your system’s motherboard and awakens the entire hardware system. As we all know, the Linux kernel works in a very different method than the traditional booting system. In Linux, the boot process includes a few steps.
Linux’s boot process activates the kernel user mode that activates the BIOS, MBR, boot menu, GRUB, and the login page. To cover the entire method of the Linux booting process, we will also discuss the power supply, hardware setup, hardware virtualization, storage system, RAM, complementary MOS (CMOS) battery, and all the other booting related topics.
1. Power Supply: The Ignition Switch of A PC
Of course, the power supply is the vital hardware part that powers your entire Linux system. If you are a notebook user, apparently, you don’t need to worry about the power supply unit (PSU). Laptop and notebooks come with a certain arrangement of the power supply unit. You need to plug in the battery to power your system.
On the other hand, if you are a desktop user, you have to select the right power supply unit for your Linux system. Sometimes a power supply with a low strength can be the reason for an unsuccessful booting. It has been seen that the hefty GPU and other extended USB accessories consume more power than a regular system. If you want to avoid the risk of an unsuccessful booting, you must use a good PSU.
When you press the power button, the electric signal activates the entire system of your computer. As previously, I have recommended getting a robust power supply; I must mention that a high-power GPU and CPU require more power at the booting stage, and Linux consumes a little bit extra more power than the Windows system.
2. BIOS: The Firmware of the Computer
The BIOS stands for the basic input-output system. It is the most crucial segment of a computer that allows the user to communicate with the hardware. BIOS is also known as the computer’s firmware that can initialize the booting process of your Linux system. When you press the power button, it powers up the BIOS, and then the BIOS starts looking for a boot device to run the operating system.
If all the process of powering the BIOS and finding the booting device goes right, the computer generates a single beep sound that reffed as the system is ready to load the OS. This whole process is called the Power On Self Test (POST).
You can use the function keys (F1-F12) at the BIOS mode to set the boot priority, configuration the hardware, and enter the system recovery. Inside the BIOS menu, you will find the BIOS version, BIOS vendor, UUID number, type of your processor, and other detailed pieces of information about your system.
The BIOS menu or the configuration settings may vary from vendor to vendor. But the basic BIOS settings will be the same. If by any accident you cant load the BIOS option, there is a chance that your BIOS has crashed. In that case, you need to download the BIOS file and flash it on your computer. Otherwise, you won’t be able to enter the boot process of your Linux system.
3. MBR: Master Boot Record on Linux
If you’re thinking about switching from Windows to Linux, there is a chance that you have already heard the term MBR vs. GPT. Master boot record or in the shot MBR is well known among Linux enthusiasts because it is maintainable from the BIOS system. Basically, the MBR partition holds the boot records and the booting related files.
In the Linux system’s boot process, the MBR partition also stores the data about all the other storage drives and how they will be acting on your Linux system. If you mess up with the MBR partition, your Linux system is in trouble.
It only requires 4096 Bits of storage to store the GRUB and Linux booting files inside the MBR partition. Though the MBR partition is found in Linux distributions, the GPT partitioning scheme replaces the MBR table in the modern era. Actually, using the GPT scheme is safer than using the MBR scheme for multiple booting.
4. Boot Menu: Select the Device to Load the OS
In Linux, the boot menu is a drop-down menu where you can select your operating system. If you have had multiple Linux distributions or other operating systems installed inside your machine, you can add them to the boot menu. As Linux is a kernel-based operating system, the latest installed OS will be shown at the top of the boot menu.
In the picture below, you can see that I have installed Ubuntu, Fedora, Manjaro, and Windows operating system on my machine. As all of the operating systems are installed in the EFI (Extensible Firmware Interface) mode, I can choose whichever Linux operating system I want to boot. You can change the order of the boot menu from the boot menu under the BIOS settings.
In the process of Linux booting, there are two types of boot available for Linux distributions. They are known as the cold boot and the warm boot. Suppose you add multiple users in a Linux system and switch user accounts by properly powering off the Pc; that booting system is known as the cold boot. On the contrary, if you switch the user accounts by rebooting your Linux system, that booting method is the warm boot.
5. GRUB and initrd: Load the OS on the Boot Process
The Initial RAM Disk (intrd) is designed to be used as a temporary filesystem for a Linux system to find the mounted EFI boot files. You might have remembered that you have to assign a disk partition to store the bootloader files when you make a clean installing of a Linux distribution. Otherwise, you would not be able to load the operating system.
In most Linux distributions, the bootloader files are stored inside the /boot/efi directory. I must mention that the bootloader is not only used to load the operating system; you can also use the GRUB bootloader to recover the password of your Linux system.
In Linux, there two primary types of bootloader are available to load the operating system. They are known as the LILO and GRUB. The LILO stands for Linux Loader, and the GRUB stands for GNU GRUB. The LILO bootloader was seen in the earlier versions of Linux distributions. On the other hand, the GRUB bootloader is modern and can load multiple bootloaders.
When the bootloader part is done, you have to face a login stage to enter the Linux system. In Linux, two types of display managers are mostly used. They are the GNOME Display Manager (GDM) and the LightDM. On Ubuntu and other Debian distributions, the GDM is pre-installed inside the system. However, you can change and customize the display manager anytime you want.
6. Linux Kernel: Interact with the Core of your Computer
Most of the new Linux users make a common mistake while learning Linux. They use to learn that Linux is an operating system. But actually, Linux is not an operating system; It’s a kernel. The kernel is often referred to as the heart of an operating system.
However, in the boot process of Linux, the kernel plays a significant role. It makes the interaction between the core components and the OS. When the bootloader loads the OS, the kernel loads the system on the initial RAM. The kernel is located inside the /boot directory. Once the booting is done, the kernel handles all the operational works of an operating system.
If you are using an older version of PC and an outdated version of Linux distributions, you may face some hardware issues that can be the reason to fail the Linux boot process. However, you can upgrade the kernel of your Linux system to overcome those issues.
7. Runlevel State: Know the Boot Process Status of Your Compute
The runlevel state of a Linux system is defined as when your Linux system has finished the booting process and is ready to be used. Or more simply, that immediate state of a computer where the power options, user-mode option, and the entire environment can be operated is known as the runlevel state.
In the Linux boot process, the runlevel state plays an important role in warming up the system. In this state, the kernel warm-ups, the CPU start functioning, and the desktop environment loads the applications.
In the Linux boot process, the runlevel state is represented with an alphabetic and a numeric token. If you at the picture given below, you can see that my Linux computer’s current runlevel status is N 5; that means my computer has already finished the booting process, and my system has more than one user. For better understanding, you can visit this page to know the definitions of other runlevel symbols.
8. CMOS: Records the Data of the Linux Boot Process
Complementary Metal Oxide Semiconductor or, in short, the CMOS chip is an important chip that is attached to the motherboard of your computer. The CMOS chip stores the boot sequence and loads the boot directories. It also retains the time settings and the security settings of the BIOS.
In modern motherboards, the CMOS chip is integrated with the printed circuit board. The CMOS can stay alive even after you power off your computer. The CMOS is powered by a small battery named the CMOS battery.
If you remove the CMOS battery after shutting down your system, all the BIOS settings, boot process settings will be lost, and the BIOS will be restored in the default factory setting mode.
9. Virtualization: Enable Virtualization Technology on a Virtual Machine
The hardware virtualization is a setting that you can find inside the BIOS framework. Typically, you do not need to enable the virtualization technology to boot a regular Linux OS on your machine. But, if you are using a VMware or a virtual machine to boot the Linux system, you probably need to enable the hardware virtualization feature to accelerate your virtual machine’s efficiency.
Extra Tip: Try a Customized Bootloader on Linux
If you are a Linux enthusiast who needs to switch between OS to OS, you can use the Clover bootloader or the OpenCore bootloader instead of your system’s default bootloader. In my opinion, the OpenCore bootloader is better for those who don’t want to mess up with the BIOS system. The OpenCore bootloader doesn’t even need to configure with the ACPI (Advanced Configuration and Power Interface) of your BIOS system.
Linux-based operating systems are very interesting to understand the filesystem hierarchy, server-level tasks, and booting processes. I have described all the possible elements that you need to know to get started with the Linux boot process in the entire post. If you are a newcomer to Linux, I hope this post will help you understand the Linux system’s boot process.
If you like this post, please share it with your friends and the Linux community. You can also write your opinions regarding this post in the comment section.