We discuss BIOS - firmware stored in non-volatile memory e.g EPROM, responsible for performing startup procedures such as POST before passing control to the bootloader which loads the OS.
Table of contents.
- The booting sequence.
- Accessing BIOS.
- Updating BIOS.
Power On Self Test(POST), is the self-diagnostic test that a computer will perform during startup to make sure that the hardware does not have any issues.
This test is the first phase of a boot sequence even before the OS is executed, the program that carries this out is referred to as the BIOS.
BIOS (Basic Input Output System) is firmware stored in the EPROM.
Other than POST, BIOS is also responsible for other tasks, for example, after it is done with the POST test, it passes control to the bootloader such as GRUB which loads the OS into memory - this is a very crucial step during boot up.
With the BIOS we can, we can manage many low-level system settings such as;
- Change system date and time
- Change boot order, i.e network, USB, HDD.
- Change BIOS password.
- View hardware information such as processors, RAM
- Change processor and memory configurations.
- View system temperatures and fan speeds.
- change voltages.
And much more;
BIOS also comes with its low-level drivers which handle all the basic control operations over the hardware.
The booting sequence.
- When the system is powered on, it waits until it receives a power good signal from the power supply as an indication that the power is OK.
- The processor starts executing however in this case it reads its instructions from ROM memory which cannot be erased or changed.ROM only contains the jump instruction that determines where a processor will find the BIOS firmware.
- The BIOS performs the functions discussed in the previous section and if it encounters any errors, the boot sequence stops here until they are resolved.
- The BIOS then looks for the built-in video card's BIOS so that it can run it.
- BIOS searches for other devices such ad IDE/ATA hard disk, other BIOS firmware can also be found and executed at this stage.
- The startup screen is displayed.
- Additional tests are performed and any errors are displayed on the screen.
- It takes inventory of the whole system to determine the available hardware.
- In the case of plug-and-play devices, it detects and configures them at this stage.
- BIOS then displays a summary of the current configuration of the system.
- Then it looks for a drive to boot from, this can be a hard disk, CD_ROM, USB, or any bootable medium.
- In the boot medium it looks for information that will aid in the boot processes such as the location of the master boot record - MBR which is the first sector of the disk.
- Control is passed over to code in the MBR which stores another firmware referred to as a bootloader. This program is responsible for taking the OS and loading it in memory for execution.
- If no boot device is found and an error is displayed.
To access a computer's BIOS settings is different for different computer vendors. Common keys are F1, F2, F12.
In Linux, to view the BIOS version we use the dmidecode command, it works with i386, x86-64, arm64 and ia64 processor architectures:
$ sudo dmidecode -s bios-version
To print all information related to BIOS we write:
$ sudo dmidecode --type bios
As we have seen in the prerequisite article, firmware can be updated, that is, we can update the BIOS to fix bugs, add features to support a specific processor, improve performance and stability.
It is important to be cautious during this process since if something goes wrong for example power is lost in the process could mean that the computer cannot boot because the only thing that boots it is corrupted.
First, we have to download a very specific firmware that corresponds to your motherboard from the manufacturers' website.
Next, we load it onto a USB stick and boot the computer.
We then enter the BIOS configuration and update it.
It is also wise to have the original BIOS before we perform this process so that if anything goes wrong we can revert to the original. This is usually handled by the vendor-specific firmware updating software.
In Linux, to update BIOS on a Lenovo think pad we write:
$ sudo fwupdmgr install updated-bios.cab
BIOS is stored in non-volatile memory such as EPROM(erasable programmable read-only memory) or flash memory.
With BIOS we can manage a lot of the basic system settings such as boot drives, dates and times, password configurations, virtualization and more.
Popular BIOS vendors include IBM, American Megatrends, BYOSOFT, DELL.