Home > loader > how to load kernel

how to load kernel

Release time:2023-06-29 05:09:40 Page View: author:Yuxuan

Overview

Kernel is a fundamental part of a computer’s operating system. It manages all hardware and software resources of the system and is responsible for executing various system tasks. But how do we load a kernel? In this article, we will discuss the process of loading the kernel.

BIOS Initialization

When we press the power button of a computer, the first program that starts running is the Basic Input/Output System (BIOS). The BIOS initializes all the hardware components connected to the system and searches for the boot device. The boot device is the storage device from which the computer can load the operating system. Once the boot device is found, the BIOS loads the first sector, also known as the Master Boot Record (MBR), from the boot device, into the memory.

MBR Execution

The MBR is a small program that contains a boot loader. When the MBR is loaded into memory, it transfers the control to the boot loader. The boot loader is a program that loads the kernel into memory and executes it. The boot loader is typically located in the root directory of the boot device and has a file name such as “grub” or “ntldr”.

Kernel Loading

The boot loader first reads the kernel image from the storage device into the memory and then performs some basic initialization tasks. It then transfers the control to the kernel’s entry point. The entry point is a predetermined address within the kernel image where the execution of kernel code starts. When the kernel is loaded and starts running, it takes control of the system and initializes all hardware and software resources.

Conclusion

In conclusion, the process of loading a kernel involves several steps. First, the BIOS initializes the hardware components and looks for the boot device. Once the boot device is found, the MBR is loaded into memory and executes a boot loader program. The boot loader program loads the kernel image into memory and transfers control to the kernel’s entry point. The kernel then takes over the system and initializes all hardware and software resources. Understanding the process of kernel loading is essential for system administrators and developers.
THE END

Not satisfied with the results?