0% found this document useful (0 votes)
46 views2 pages

Understanding BIOS and UEFI Boot Process

The booting process consists of six phases, starting with BIOS and ending with the run level. It compares Legacy BIOS, which is older and less secure, with UEFI BIOS, which is modern, faster, and supports larger storage drives. The document also explains how to check the BIOS mode, the role of the boot loader, and the function of GRUB in loading the kernel into memory.

Uploaded by

Rahul Gupta
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
46 views2 pages

Understanding BIOS and UEFI Boot Process

The booting process consists of six phases, starting with BIOS and ending with the run level. It compares Legacy BIOS, which is older and less secure, with UEFI BIOS, which is modern, faster, and supports larger storage drives. The document also explains how to check the BIOS mode, the role of the boot loader, and the function of GRUB in loading the kernel into memory.

Uploaded by

Rahul Gupta
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

Booting process completes in 6 phases..

BIOS ==> MBR ==> GRUB ==> Kernel ==> Init ==> Run level

When we power on the button, very first program that get start is BIOS (saved in
NVROM). Now it depends which BIOS is these. Legacy BIOS or UEFI BIOS.

======================================================================
Legacy BIOS vs UEFI BIOS

Legacy BIOS:
> Very old firmware
> It's a text based interface that need keyboard navigation only (not supporting
mouse)
> Slower boot time
> supports only upto 2TB of hard drives via MBR partitioning scheme
> less secure

UEFI:
> Modern replacement of old BIOS
> Improved graphical interface with mouse support
> Faster boot time
> supports for more then 2 TB of storage drives as well via GPT partitioning scheme
> more secure (that prevents from unauthorized firmware modifications.)
==========================================================================

How to check, which BIOS mode I am using...?

> via the management console


#dmesg | grep efi ==> if no output, that means UEFI not used
#ll /sys/firmware/efi/ ==> if this file do not present, means
UEFI not used
#efibootmgr -v ==> will show for Legacy BIOS or UEFI
But here we need to install efibootmgr package
===========================================================================

This BIOS program start a POST process, that checks connected hardware's health.
(by sending a signal) and checkes whether he is getting reply back or not.
If not, then it tells with the help of numbers of beeps or showing warning message.

After POST, BIOS looks for a bootable device from a list of devices set in the boot
order in the BIOS setting. Once the device is been identified, it search for the
MBR or the GPT on the storage device. that contain the crucial initial boot loader
code.
Here It checks for the boot sector on the bootable device (in case of Legacy BIOS)
or boot loader location in dedicated EFI partition (in case of UEFI BIOS). i.e.
/boot/efi/EFI/redhat/ (called as EFP)
and the file is [Link]

In this bootable device, MBR is present that is called a bootable sector.

================================================================
MBR: When we install an OS, MBR is been created on the first disk (location - head-
0, cylinder-0, sector-1). which is of 512 bytes. out of which first 446 bytes are
for boot loader. next 64 bytes are for partition table. and rest 2 bytes are for
MBR signature.
================================================================

This MBR having a small program called as boot loader (LILO/ GRUB/ GRUB2).
==============================================
Boot loader: It's a small program stored in MBR. The GRUB bootloader itself is not
in the /boot directory. It's either in the MBR on /dev/sda (BIOS) or within the ESP
partition on /dev/sda (UEFI). The /boot directory contains GRUB configuration files
and other boot-related data that GRUB uses when it's loading the OS, but not the
actual bootloader itself.

If you want to see boot loader program,


#dd if=/dev/sda bs=512 count=1 | grep -a GRUB
==============================================

Grub2 load itself and displays a splash screen that allows us to choose the kernel.
The appearance of the splash screen is determined by the [Link] file, which is
automatically generated based on the settings in /etc/default/grub and scripts
in /etc/grub.d

Note: /etc/grub.d , [Link], /etc/default/grub are not the grub boot loader. These
are the files/ dir that grub boot loader manages.
===============================================

So role of the primary boot loader is to locate the kernel on to the disk, insert
into memory, and execute with the supplied options present in the splash screen.
and gives control over to kernel.
(In simple term, role of the grub is to intiate the kernel) i.e. to load the kernel
into the memory.

Grub2 menu allows you to select desired the kernel, edit the kernel parameters, and
others.
#grub2-install is the command to control this GRUB.

You might also like