Categories: How-To

Linux Load Process (boot)

Understand how Boot Managers work on Linux

Any PC computer when turned on initiates a series of complex hardware testing actions programmed by a special memory called BIOS.

This memory has the function of starting the machine, recognizing the installed devices and loading the operating system.

During boot, the BIOS performs a series of tests whose function is to determine exactly the hardware components installed in the system. This test is called POST (power-on self test).

It is through the POST that the computer searches for information on the numbers and types of cards, CD-Rom drives, hard drives, serial and parallel ports and USBs, monitors, mice, keyboards, etc.

Soon after the hardware tests, the BIOS searches the devices
of hard drives and CD-ROM one
special address called the boot sector.

On motherboards that adopt the EFI or UEFI system, the operating system loading process involves reading a special load file from a file system on a special partition called EFI System Partition (ESP).

This special partition uses the FAT (File Allocation Table) format. On Linux it is typically mounted on /boot/efi.

This scheme used by EFI is more complex than in the BIOS, allowing each operating system installed on the computer to have its own separate boot load system.

Thus, EFI has a “boot manager” that allows the user to choose which boot load system they want to start when they turn on the computer.

For this EFI “boot manager” system to work, it is
I need the boot load systems to be properly registered in
firmware through EFI’s own utility or through the efibootmgr program
on Linux.

Kernel Load Process

Depending on the type of disc
used, the boot sector, or load sector, is located at a location
specific with a certain signature defined by industry standards.

It is in the boot sector that the operating systems write the software
responsible for initiating the loading of the operating system.

In this way, the BIOS or
motherboard firmware searches the boot sector of the disk for the boot manager.

On Linux, the most common managers are GRUB and GRUB 2. They are responsible for the Kernel’s memory load.

During the kernel load, Linux loads a special file system called initramfs, which contains a minimalist version of the file system, so that the init process (parent of all processes on Linux) can be loaded.

This allows various tasks to be performed before the actual file system is loaded.

After loading the Kernel, it starts a special process called init (for SystemV-based systems) or systemd (for Systemd-based systems).

Both init and systemd are the parent of all processes and are responsible for the rest of the Linux boot load.

After the boot load, init calls another special program called Getty, which is responsible for authenticating users and starting the shell process.

Here’s how Grub works on Linux:

Learn much more about Linux in our online course. You can enroll here with a free 7-day trial. If you already have an account, you can log in here.

Did you like it? Share 🙂

Uirá Endy Ribeiro

Uirá Endy Ribeiro is a Software Developer and Cloud Computing Architect with a 23-year career. He has master's degrees in computer science and fifteen IT certifications and is the author of 11 books recognized in the IT world market. He is also Director at Universidade Salgado de Oliveira and Director of the Linux Professional Institute - LPI Director's Board.

Uirá Endy Ribeiro

Uirá Endy Ribeiro is a Software Developer and Cloud Computing Architect with a 23-year career. He has master's degrees in computer science and fifteen IT certifications and is the author of 11 books recognized in the IT world market. He is also Director at Universidade Salgado de Oliveira and Director of the Linux Professional Institute - LPI Director's Board.

Recent Posts

Sudo command on Linux (privilege scale) [Basic Guide]

The sudo command on Linux executes a given command as if it were another user.…

2 years ago

SS command on Linux (investigate the network) [Basic Guide]

The ss command on Linux is extremely useful for investigating sockets, providing various information about…

2 years ago

Free Linux command (memory usage) [Basic Guide]

Free Linux command shows the amount of total memory in use and available, as well…

2 years ago

Linux while command (loop – while) [Basic Guide]

The shell has structures for testing conditions and executing certain program sequences several times (loop),…

2 years ago

Linux fstab file (disk mount setup) [Basic Guide]

The /etc/fstab file stores the configuration of which devices should be mounted and what is…

2 years ago

Netcat command on Linux (Swiss network knife) [Basic Guide]

The Netcat Command in Linux or nc is a utility used to do “almost anything”…

2 years ago

This website uses cookies.