Background - The Boot Process
Legend has it that the term "boot" comes from "bootstrap", as in the old
phrase "to pull oneself up by the bootstraps". The process of booting involves
starting with a very short and "dumb" computer routine, then successively
finding smarter routines and letting them take over.
The process of booting from the hard disk starts at a
predictable place: the first sector on the disk. Program code in the first
sector (the Master Boot Record
, or MBR) determines which partition to
boot. There isn't much room in the MBR for a lot of code, but then the MBR
doesn't need to know a lot--it simply determines the partition to boot
and passes control to the first sector of that partition. The MBR doesn't
need to know or understand the OS on the selected partition or the names
of the bootfiles that will be executed.
Code in the first sector of the selected partition (the
Partition Boot Record
, or PBR) then continues the boot process. The
PBR doesn't have much room either, so the boot record looks for boot files
within the partition itself to which the boot process will be passed.
Note this means the PBR must be specific to the OS since it has to know the
name of the system-specific boot files and how to find them.
This partition boot sector also contains a parameter table
the layout and file system of the partition, which enables the boot record
to find the boot files in the partition itself.
(See? The computer is "bootstrapping" it's way to get smarter!)
One of the values in this parameter table is the total number of sectors
between the beginning of the disk (LBA 0) and the start of the partition.
We'll come back to this crucial piece of information later.
The initial boot files
in the partition take over and
bring up the rest of the operating system. The actual Windows operating
may be on another partition, provided the boot files of that
particular OS version were designed to be smart enough to handle that.
Thus, we can make a distinction between a boot partition
and a system partition
, which may or may not be the same.
Note, however, that Microsoft perversely reverses the definitions--Microsoft's
"system partition" is the one with the startup files and the "boot partition"
is the one with the Windows directory and the rest of the operating system.
So in Microsoft-speak we can say the computer "starts booting
partition and continues loading the operating system
from the boot
partition." Isn't that clear?
(Note: Linux generally uses the terms "boot" and "root".)
However you choose to define them, in a single-OS computer the boot and system
partitions are often one and the same.
In a multi-OS system controlled by the 2000/XP boot
, the process uses a common boot partition loading alternate system
partitions--or in Microsoft-speak, a common "system" partition loading
alternate "boot" partitions. In contrast, the multi-OS configuration we are
aiming for in our project uses separate boot-plus-system partitions for each OS.
In order to determine which partition to boot in Step 1, the MBR looks for the
" flag in the partition table. This will be the partition to
which the MBR will pass control in Step 2.
When installing Microsoft OS's, the installation routines have a habit of
rewriting the MBR when the OS is installed. This Microsoft MBR will search only
the four entries in the primary partition table and will not look beyond that
into the extended partition--hence the common misperception that you can only
boot from primary partitions.
However, this simplistic MBR can be replaced with a more sophisticated boot
loader and then there is no reason a logical partition needs to be treated any
differently than a primary partition. It is possible to boot from a logical
partition, though not if you use Microsoft's MBR.
Note you don't have to use a Microsoft MBR just because you installed a Microsoft
OS--see Step 1, the MBR is just a dumb loader and does not need to be specific
to any particular OS.
For further background, read more about
standard boot process
in Nick Rozanski's excellent primer, or the outstanding
"Computer Boot Sequence
tutorial at the Mossywell website.
See also PC Guide's sections on
Master Boot Record (MBR)
Volume Boot Sectors
The DOS Boot Process
For additional details about Microsoft Vista's MBR, see Brian Stewart's informative page,
Dual Booting With Vista