Tech In-Depth: System Booting


  1. More tests. This stage could easily be grouped with the previous stage because, essentially, it is still checking the system but in the name of clarity, I have separated it in another stage. This stage can be called “system inventory” because the BIOS checks for disks, drives, and all kinds of peripherals. If the BIOS supports the Plug and Play standard, plug and play devices are also discovered and resources are assigned to them. The hard disk(s), the optical drives and the floppy-disk drive are located as well. When the hardware testing is over, the BIOS displays a summary screen about your system’s configuration. Well, you might not be able to read it because it flashes on screen for a split second but if you don’t see any error messages, which tend to stay forever, this means that the test has passed successfully. Any error messages here will direct you to the cause of failure. For instance, if you see that a hard disk is not found, this could mean that the disk is not physically present, it is not connected properly, or it has died completely. You might not be able to learn the exact cause of failure but when you know that there is something wrong with the hard disk, additional tests (or at least a look inside the computer case) will help you troubleshoot the problem.


  2. The BIOS reads the CMOS. After the POST has been passed either successfully, or with non-critical errors, the next step the BIOS performs is to read the configuration in the CMOS (Complimentary Metal-Oxide Semiconductor). The CMOS is a 64 byte area in memory, which is persistent (i.e. the information there is not deleted when you turn off the computer, as is the case with RAM) because it is fed by the current of a small battery, which resides on the motherboard. Due to its small size, the CMOS can’t contain much information.  However, it has a vital role in the boot sequence because it tells the ROM BIOS where to look for the operating system. The BIOS will try all possible drives (hard disk, floppy, external disks) to boot from and if no boot device is found at all, you will get an error message saying that there is no boot device available. This error message is BIOS-specific and sometimes can sound like “NO ROM BASIC — SYSTEM HALTED “, which, in plain English, means that the BIOS could not find a drive to boot the operating system from.


  3. Reading the MBR. After the CMOS has directed the BIOS to the drive from which to boot the operating system, the BIOS starts reading the very first sector of the specified device. For hard disks, this is the Master Boot Record, and it is 512 bytes in size. 512 bytes is a lot of space, compared to the 64 bytes of the CMOS, for example, and there is enough room for a partition table, partition loader and signature. The signature is the last two bytes, and if is missing, or its value is invalid, the boot sequence stops with a fatal error message because the MBR can’t be loaded into memory and it is not possible to read the partition information.


  4. Reading the partition table. The partition table, as the name implies, contains information about the partitions on the hard disk like numbers of bytes per sectors, numbers of sectors per cluster, start and end of the partition, etc. When the active partition is found, the BIOS reads its very first sector for information about the boot record and depending on what is written in the boot record, proceeds further to load the operating system. In case you dual-boot (i.e. you have Windows and Linux installed on your computer), most likely (if everything is in order with the MBR), you will be presented with a screen where you can choose which operating system to load. If you don’t make a choice within the set timeout, the default operating system will be loaded.


  5. Loading the operating system. After you have chosen which operating system to load, the procedure differs depending if it is Windows or Linux, as described next.

 


To summarize: The boot process starts with pressing the power button to turn the computer on. Then, after a short self-test of the power supply, a signal is sent to the processor and it starts executing the ROM BIOS code. Then the ROM BIOS performs a short test of the available hardware and if everything is OK, the BIOS starts reading the configuration information in the CMOS — i.e. where to start the operating system from (from a floppy, CD or the hard disk). In case the operating system is to be loaded from a hard disk, the BIOS locates its Master Boot Record (MBR) and loads it into memory. Then the partition loader (also called Boot Loader) takes charge and reads the partition table to find the active partition and a boot record there. After that, the operating system starts booting.

Opt In Image
Free Weekly PCMech Newsletter
Almost 500 Issues So Far, Received By Thousands Every Week.

The PCMech.com weekly newsletter has been running strong for over 8 years. Sign up to get tech news, updates and exclusive content - right in your inbox. Also get (several) free gifts.

Pages: 1 2 3

Leave a Reply

PCMech Insider Cover Images - Subscribe To Get Your Copies!
Learn More
Tech Information you can use, sent to your inbox each and every week. Check out PCMech's digital e-zine...