The Booting Process

The Booting Process

[ From Power On to OS load ]

This is a relatively brief and half-wittedly simple tutorial on how the computer starts up.

a. The Magic Button

When writing a tutorial on how a system starts up, why not start with the beginning, what I like to call the “Magic Button.” The magic button is the power button on the front of the bezel. But what happens when one pushes the magic button? Let’s just find out.

The first thing that happens, upon pressing the magic button, starts at the most obvious place: the power supply. When you press the button on the front of the case, the wires connected to the button send a signal to the motherboard. The motherboard then routs this signal to the power supply. All this signal consists of a bit of data (a ‘1’) which tells the power supply, in lay-men’s terms, to please turn on the system.

Once the power supply receives this signal, it begins supplying power to the whole of the system. When it has certified that it is supplying the correct amount of power to all devices, and that it can continue to do so without any major problems (see below, *) it sends a signal to the BIOS, on the motherboard, called “power_good”. The motherboard then takes control.

b. Motherboard Control, POST

Once the power supply receives this signal, it begins supplying power to the whole of the system. When it has certified that it is supplying the correct amount of power to all devices, and that it can continue to do so without any major problems (see below, *) it sends a signal to the BIOS, on the motherboard, called “power_good”. The motherboard then takes control.

b. Motherboard Control, POST

Once the BIOS (see below, **) on the motherboard receives the “power_good” signal, it begins to boot by first initializing a process called POST (Power On Self Test). POST accomplishes a few things. It makes sure everything has ample power, then tests the memory for corruption. It then checks the enablement of proprietary chips on the motherboard, keyboard, mouse, disk controllers, and ports – serial, USB, parallel, etc. Then, POST gives control to the BIOS to start booting the system.

c. The BIOS in Control

Once the BIOS receives full control (meaning POST has finished successfully), it then sets upon one final task: booting the operating system. To do this, the BIOS must find a 512 byte image (the size of one sector) on the drive it wishes to boot from. Usually the boot order is set by the user of the manufacturer of the BIOS. Generally speaking, the system searches the floppy disk first, then the hard disk.

Assuming the system is going to first attempt to boot from the floppy disk. It then looks in the first 512 bytes, one sector, and begins to read and execute it. The image here is called a bootsector. As a side note – generally, the system is loaded by the bootsector, then the bootloader, which has no size constraints, loads the system all the way, generally after being jumped to by the boot sector.

If the BIOS does not find the 512 byte image it is looking for, it simply goes to the next drive, until it finds the image. If no image is found on any drive, the BIOS stops and generally displays a message declaring that there is no valid boot disk.


*Without any major problems – the power supply has a simple operating system that does a POST similar, but much less complex, than that of the BIOS, generally checking that all the chips inside the supply are running well, etc.

** BIOS: Basic Input Output System


This tutorial made with sole rights belonging to the author. If you would like to replicate or use this tutorial, please request to use it. This tutorials title is listed at the top of the document.

Related

Report issues via Bona Fide feedback.

2001 - 2017 © Bona Fide OS Development | The Goal | Contributors | How To Help |