Linux boot process step by step
2 min read
Linux Boot Sequence
- BIOS POST
- GRUB Boot Loader
- Kernel Initialization
- INIT Process
- Runlevels Program
1. BIOS POST:
BIOS Stands for Basic Input/Output System and POST Stands for Power On Self Test.
In this process, it sees all the hardware components attached, and then it checks whether all the hardware is working correctly or not.
If everything is fine then it moves to the next step, else it will be failed at the BIOS POST Test.
MBR Stands for Master Boot Record.
It is responsible for loading and executing the GRUB Boot Loader.
3. GRUB Boot Loader:
GRUB Stands for GNU gRand Unified Bootloader.
The splash screen is often the first thing we see when we are booting in our computer, this process is done by GRUB.
Here we can see multiple options if we have multiple kernels installed in our computer(Dual Boot System). If we have only one kernel installed then there might be no selector available.
/boot <- here all the bootloader static files are available.
4. Kernel Initialization:
After selecting the operating system then the kernel will be loaded onto our memory(Here memory refers to RAM).
When it is loaded then it is basically decompressed and loaded to memory (Here memory refers to RAM). The kernel will be decompressed and consumes space.
Now the kernel is loaded onto the memory(Here memory refers to RAM)
The Tasks of the kernel are assigned to the kernel like:
- Memory Management
- Device Management and Etc., So that the users can use the operating system.
5. INIT Process:
In this step, the kernel spreads up the user space (In kernel we have 2 spaces. kernel space, and user space) like setting up the display manager for example GNOME, MATE, etc.,
Now it executes runlevel programs. It looks into this init file (/etc/inittab) to get the runlevel of the program.
6. Runlevels Program
Runlevels determine which program can execute after the OS Boots up.
|Runlevel 0||Shuts down the system|
|Runlevel 1||single-user mode|
|Runlevel 2||multi-user mode without networking|
|Runlevel 3||multi-user mode with networking|
|Runlevel 5||multi-user mode with networking|
|Runlevel 6||reboots the system to restart it|
Now after all these steps passed, then we can see our operating system booted. We can log in to our account and use the operating system.
Did you find this article valuable?
Support Prahlad Inala by becoming a sponsor. Any amount is appreciated!