Booting with UEFI (Unified Extensible Firmware Interface)

Raza
3 min readNov 15, 2023

--

Bootstrapping in the context of UEFI (Unified Extensible Firmware Interface) requires a different approach from traditional BIOS-based systems. UEFI is a modern firmware interface for computers, designed to replace the older BIOS. Here’s a more technical and deeper explanation of the UEFI boot process:

Initial Power-On and UEFI Firmware

System Power-On:

  • When the computer is powered on, the UEFI firmware, which is stored in a special type of memory called Non-Volatile RAM (NVRAM), takes control.
  • Unlike BIOS, UEFI does not rely on the 16-bit real mode for backward compatibility and can operate directly in 32-bit or 64-bit mode, allowing access to more system resources from the start.

UEFI Initialization:

  • UEFI initializes the hardware components of the system, a process more comprehensive than the BIOS POST. This includes CPU, memory, and device initialization.
  • UEFI firmware has its own boot manager, which is responsible for loading UEFI applications stored in the EFI System Partition (ESP), a dedicated partition on a data storage device.

EFI System Partition and Boot Management

EFI System Partition (ESP):

  • ESP is formatted with a FAT file system and contains EFI applications, including boot loaders for the operating system and utility software.
  • UEFI firmware reads boot information from the ESP. This is a key difference from BIOS, which reads from the Master Boot Record (MBR).

Boot Manager and Boot Options:

  • UEFI’s boot manager reads the boot entries from NVRAM, which are configured by the user or the system manufacturer.
  • These entries contain the paths to EFI applications or boot loaders and can include options for the boot process, such as the operating system kernel parameters.

Operating System Loader and Kernel Initialization

Loading the Operating System:

  • The UEFI firmware loads the selected EFI application (usually an OS bootloader) into memory and transfers control to it.
  • This step is more flexible compared to the traditional BIOS, as UEFI can directly understand file systems and load EFI applications from them.

OS Kernel Loading:

  • The operating system’s bootloader, now in control, loads the OS kernel into memory.
  • The bootloader can pass control parameters and hardware information to the OS kernel, facilitating a more informed and efficient initialization of the operating system.

Final Stages of System Initialization

Operating System Initialization:

  • Once the kernel is loaded, it initializes the system’s hardware and software environment.
  • This includes configuring the remaining hardware components, loading drivers, and starting system services

Transition to User Space:

  • After initializing the kernel and system services, the OS transitions control to the user space.
  • This is where user interfaces, applications, and other high-level software components are loaded, marking the completion of the boot process.

Key Differences and Advantages of UEFI

  • GPT Support: Unlike BIOS, UEFI works with the GUID Partition Table (GPT) format, allowing for more partitions and larger disk sizes.
  • Secure Boot: UEFI supports Secure Boot, a feature that can prevent the loading of unsigned or unauthorized software during the boot process, enhancing security.
  • Driver Support: UEFI can load its own drivers, independent of the operating system, which can assist in the boot process and hardware initialization.
  • Graphical Interface and Networking: UEFI can support a graphical user interface and network capabilities even before the OS loads, offering advanced features for system configuration and remote diagnostics.

In summary, the UEFI boot process is more advanced and flexible compared to the traditional BIOS-based process. It offers enhanced security, supports modern hardware better, and provides a more robust framework for initializing and starting modern operating systems.

--

--

Raza

Expert in Linux Systems, Kubernetes, Cloud Technologies, Virtualization Technologies, Python Programming and Storage Systems.