The BIOS (Basic Input/Output System) is a firmware program that is stored in a ROM chip on the motherboard, and it performs some basic tasks when the system is powered on, such as:
initializing the hardware components and peripherals
performing the power-on self-test (POST) to check the system integrity
selecting a boot device from the boot order list
loading and executing the bootloader program from the boot device
The boot device is the data carrier that contains the bootloader, which is a small program that is responsible for loading and executing the kernel. The boot device can be a hard disk, a USB drive, a CD-ROM, or a network device. The BIOS has a boot order list, which is a sequence of possible boot devices that the BIOS will search for a valid bootloader. The boot order list can be configured by the user through the BIOS setup utility, which is usually accessed by pressing a key such as F2, F10, or Del during the POST.
The BIOS will search for a bootloader by means of a special signature, which is a sequence of bytes that indicates the presence of a bootloader. The signature is usually located in the first sector of the boot device, which is called the boot sector or the master boot record (MBR). The BIOS will read the boot sector of each boot device in the boot order list, and check if the last two bytes are 0x55 and 0xAA, which are the standard boot signature. If the boot signature is found, the BIOS will load the boot sector into memory and execute it. If the boot signature is not found, the BIOS will move on to the next boot device in the boot order list. If none of the boot devices have a valid boot signature, the BIOS will display an error message such as:
No bootable device – insert boot disk and press any key
References:
How does the BIOS know where the bootloader is located? - Super User
Bootloader: What is it and how does it work? - IONOS
Boot Process with Systemd in Linux - GeeksforGeeks
Linux Boot Process Step-by-Step Explained - javatpoint