×

Search anything:

BIOS (Basic Input Output System)

Internship at OpenGenus

Get this book -> Problems on Array: For Interviews and Competitive Programming

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.

  1. Introduction.
  2. The booting sequence.
  3. Accessing BIOS.
  4. Updating BIOS.
  5. Summary.
  6. References.

Prerequisites.

  1. firmware.

Introduction.

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.
  • Virtualization.
  • View system temperatures and fan speeds.
  • change voltages.
    And much more;

bio1

BIOS also comes with its low-level drivers which handle all the basic control operations over the hardware.

The booting sequence.

  1. 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.
  2. 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.
  3. 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.
  4. The BIOS then looks for the built-in video card's BIOS so that it can run it.
  5. BIOS searches for other devices such ad IDE/ATA hard disk, other BIOS firmware can also be found and executed at this stage.
  6. The startup screen is displayed.
  7. Additional tests are performed and any errors are displayed on the screen.
  8. It takes inventory of the whole system to determine the available hardware.
  9. In the case of plug-and-play devices, it detects and configures them at this stage.
  10. BIOS then displays a summary of the current configuration of the system.
  11. Then it looks for a drive to boot from, this can be a hard disk, CD_ROM, USB, or any bootable medium.
  12. 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.
  13. 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.
  14. If no boot device is found and an error is displayed.

Accessing BIOS.

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

bios1

To print all information related to BIOS we write:

$ sudo dmidecode --type bios

bios2

Updating 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

Summary.

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.

References.

  1. GRUB bootloader
BIOS (Basic Input Output System)
Share this