Linux Booting Process-1

Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

Linux booting process

Prof/Ayman El-Sayed

Abdulrhman Bahaa El-din

Cybersecurity Level 2
Overall View Of Boot Steps

The Linux boot process is the procedure for initializing the system. It consists of

everything from when the computer power is first switched on until the user interface is

fully operational.

1. BIOS

BIOS stands for Basic Input/Output System. In simple terms, the BIOS loads and executes

the Master Boot Record (MBR) boot loader.

When you first turn on your computer, the BIOS performs some integrity checks of the

HDD or SSD.

The system BIOS provides a basic power-on self-test (POST), during which the BIOS

checks the basic devices required for the server to operate.

Then, the BIOS searches for, loads, and executes the boot loader program, which can be

found in the Master Boot Record (MBR). The MBR is sometimes on a USB stick or CD-ROM

such as with a live installation of Linux.

Once the boot loader program is detected, it's then loaded into memory and the BIOS gives

control of the system to it.

2. MBR

MBR stands for Master Boot Record, and it is responsible for loading and executing the

GRUB boot loader.


The MBR is located in the 1st sector (512 bytes) of the bootable disk, which is typically

/dev/hda, or /dev/sda, depending on your hardware. The MBR also contains information

about GRUB, or LILO in very old systems

3. Kernel

The kernel is often referred to as the core of any operating system, Linux included. It has

complete control over everything in your system.

In this stage of the boot process, the kernel that was selected by GRUB first mounts the

root file system that's specified in the grub.conf file. Then it executes the /sbin/init

program, which is always the first program to be executed. You can confirm this with its

process id (PID), which should always be 1.

The kernel then establishes a temporary root file system using Initial RAM Disk (initrd) until

the real file system is mounted.

4. Systemd

To reiterate, the kernel initiates the init process, which starts the parent process. Here, the

parent of all Linux processes is Systemd, which replaces the old SysVinit process.

Following the booting steps, Systemd performs a range of tasks:

● probe all remaining hardware

● mount filesystems

● initiate and terminate services

● manage essential system processes like user login

● run a desktop environment

Indeed, these and other tasks allow users to interact with the system. Lastly, Systemd uses

the /etc/systemd/system/default.target file to decide the state or target the Linux system

boots into.
5. Run Levels

In Linux, the run level stands for the current state of the operating system. Run levels

define which system services are running. Previously, SysVinit identified run levels by

number. However, .target files now replace run levels in Systemd.

Now, let’s see the link between run level numbers and targets:

1. poweroff.target, run level 0: turn off (shut down) the computer

2. rescue.target, run level 1: initiate a rescue shell process

3. multi-user.target, run level 3: configure the system as a non-graphical (console)

multi-user environment

4. graphical.target, run level 5: establish a graphical multi-user interface with network

services

5. reboot.target, run level 6: restart the machine

6. emergency.target: emergency run level

For instance, the target value for a desktop workstation with a graphical user interface

(GUI) is 5. This value stands for run level 5 which is graphical.target. Also, the run level for a

server without a GUI is 3 because the default target is multi-user.target.

In addition, we can change the target (run level) while the system runs. This change entails

that only services and other units defined under that target will now run on the system.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy