Thursday, October 23, 2008

Hard Disk : Understanding How a Computer Boots

The Basic Boot Process
When you turn on the power to your computer, the CPU (central processing unit)1 takes
control. The CPU immediately executes the instructions built into the computer’s ROM
BIOS, a program that contains the startup procedures. The last part of the BIOS
instructions contains the boot routine. This routine is programmed to read the master boot
record from the first sector of the first physical hard disk.
The MBR (master boot record) contains a master boot program and a partition table that
describes all of the hard disk’s partitions. The BIOS boot routine executes the master boot
program, which then continues the boot process. The master boot program looks at the
partition table to see which primary partition is active. If there is only one primary
partition, that partition’s OS is loaded and booted into operation.
If the hard disk has more than one primary partition, each bootable partition (that is,
containing an OS) has its own boot record stored in its first sector. This boot record holds
a boot program designed specifically to start that partition’s installed OS. This
OS-specific boot record is usually written to the partition when the partition is logically
formatted, but can also be added later with an OS-specific utility (for example, the DOS
SYS utility).
After identifying the active partition, the master boot program starts that partition’s boot
program. In turn, the boot program loads the necessary OS files and starts the OS.

No comments: