About UEFI-Based Booting
On a UEFI-based system running the Oracle Linux release, the system boot process uses the following sequence:
-
When the system is powered on, the system performs a power-on self-test (POST) to detect and check the system's core hardware components such as CPU and memory. The UEFI firmware is then initialized.
-
The UEFI firmware detects any other hardware, such as peripheral components including network devices and storage. The UEFI firmware contains its own boot manager, which can directly interact with boot loaders on various storage devices. The boot manager stores a set of variables including the priority of different boot devices and any detected boot loaders.
UEFI searches for a FAT32 formatted GPT partition with a specific globally unique identifier (GUID) that identifies it as the EFI System Partition (ESP). This partition contains EFI applications such as boot loaders and other configuration files.
When more than one boot device is present, the UEFI boot manager uses the appropriate ESP based on the order that's defined in the boot manager. With the
efibootmgrtool, you can define a different order, if you don't want to use the default definition. -
The UEFI boot manager loads the default boot loader. Oracle Linux uses a 2-stage boot process to handle the Secure Boot validation process. The 2-stage process includes a first stage boot loader called the
shimboot loader on the ESP, and the second stage boot loader called GRUB 2. If Secure Boot is disabled, theshimboot loader directly loads the GRUB 2 boot loader on the ESP, to continue the boot process. Boot loader files are named according to the system architecture, for example theshimbootloader is namedshimx64.efion x86_64 systems, andshimaa64.efion aarch64 systems.Otherwise, if Secure Boot is enabled, the
shimboot loader is validated against keys stored in the UEFI Secure Boot key database, and in turn, verifies the GRUB 2 boot loader signature against certificates stored in the UEFI Secure Boot key database or the Machine Owner Key (MOK) database. If the GRUB 2 signature is valid, the GRUB 2 boot loader runs and, in turn, validates the kernel that it's configured to load.See Oracle Linux: Working With UEFI Secure Boot for more information on Secure Boot.
-
The boot loader loads the
vmlinuzkernel image file and theinitramfsimage file into memory. The kernel extracts the contents of theinitramfsimage into a temporary, memory-based file system (tmpfs). Theinitramfscontains essential drivers and utilities needed for booting. -
The boot loader passes control to the kernel and provides pointers to the
initramfsand any other boot parameters. The kernel continues system initialization, detecting hardware, loading necessary drivers, and mounting the root file system. -
The kernel searches for the
initprocess withininitramfsand starts the defined process with a process ID of 1 (PID 1). On Oracle Linux, the defaultinitprocess is configured assystemd. See Oracle Linux 8: Managing the System With systemd for more information. -
systemdruns any other processes defined for it.Note:
Specify any other actions to be processed during the boot process by defining
systemdunits. This method is preferred to using the/etc/rc.localfile.