=====================================================================
1. The role of the BIOS
=====================================================================
The first thing that has to occur when you turn a computer on is the well-known "Power On Self Test" (POST), this function is provided by the BIOS (Basic Input/Output System).
The BIOS does not rely on a CPU, RAM or a hard disk - it remembers its settings through non-volatile EEPROM (Electronically Erasable Programmable Read Only Memory).
The BIOS is responsible for providing the details of the system hardware at the lowest level - it can interrogate all its known interfaces, find devices attached to them and "enumerate" them.
Some of these settings are remembered between restarts, others are "plug and play" and are detected automatically every time you turn the computer on.
In older machines, the BIOS was a very basic beast - everything had to be specified manually including providing information on the cylinder, head and sector count of your hard disk, and if you got this information wrong you could write garbage over your data.
The hard disks and BIOSes we deal with today are a lot more flexible and self-governing to save us a lot of this kind of hassle.
As well as configuring the BIOS manually, we had to concern ourselves with which slot we installed hardware and setting the "jumpers" correctly on the devices so they did not conflict with each other.
We also had to remember the settings we assigned to the hardware so that we could tell the drivers for the operating system (such as interrupt, address and DMA channel).
The introduction of "plug and play" made life a lot easier - plug a device in and turn the computer back on and the BIOS (or suitable operating system) would be able to "soft" set the values as required.
Nowawdays the BIOS can have options for overclocking, RAID, alerts based on fan speed or temperatures, even built-in audio CD playing functionality.
A huge number of motherboards are also coming with onboard sound and graphics chipsets, also controlled through the BIOS.
So the BIOS enumerates the hardware, maybe tests the memory, but how does it know where the operating system (or systems) are in order to provide you with your interface?
And how does it know whether it should try to boot from the floppy disk or CD you happen to have inserted?
The BIOS is given a list of boot preferences - in what order it should check the different channels/devices to see who has "bootable" media installed.
The "boot" process can occcur from floppy disks, CDs, DVDs, hard disks, USB devices and even the network.
Starting at the top of the list, each device is checked for bootability (the actual process differs depending on the type of device) and once one is found the BIOS loads the necessary code and begins to execute it, ending its direct involvement in the startup process.