A 20 GB Hard Drive with
Three OSs

Figure 5.

This is a Hex view of just the last 80 bytes of a hard disk's MBR sector
as they might appear in a disk editor. The Partition Table is enclosed
within the thin YELLOW line in the diagram above.
Two other items also appear in this diagram: 1) The thin violet/purple
line surrounding the Hex bytes "A8
E1 A8 E1" shows an example of an NT Disk Signature (also
used by Win 2000/XP) and: 2)
The sector's Word-sizedSignature ID of AA55h; often
called its Magic number in older tech documentation.[ Note: on Intel x86 CPU systems, Hex Words are stored with the Low-byte
first and the High-byte last so AA55h appears as: 55 AA in a disk editor ].

In
the upper-right corner of the table, you'll see a byte with the value
of 80 .
This is the first byte in the first Partition entry, and it's followed
by the bytes 01
01 00 . Most HDDs have these bytes, since the first partition
is usually the boot partition on most hard disks [ the 80h
byte tells the Bootstrap Loader code (the MBR code) which partition it is supposed
to try loading a Boot sector from into Memory; only one partition entry (at
boot-up) can have the 80h byte here]and because the next three
bytes are the CHS values for the Starting Sector of the first partition
(CHS 0,1,1 in this case; which corresponds to Absolute Sector 63 of this
disk, where most Boot Records begin).

Until HDDs became larger
than 8.4 GB, the Starting and Ending CHS values and the Total Sector value could
be checked against each other; which might help to correct an error for a manual
entry in the Table. Example: The Last Sector CHS values (877,254,63)
can be used to check the Total number of Sectors by first computing: 878
cylinders x 255 heads x 63 sectors
= 14,105,070 sectors (don't forget that both the CylinderandHead counts begin with a zero), and then subtracting
the 63 sectors which preceded it to arrive at: 14,105,007 sectors
for its Total size or length. Thus, you can see that they must agree
with each other!

Before launching into all
the calculations for the rest of this drive's partition table, we need to point
out that this isn't the typical layout for a drive created by a Microsoft OS.
Instead of a singlePrimary partition followed by an Extended
partition, this drive has three Primary partitions and then
an Extended partition!

In the table above,
you'll find that computing CHS values isn't always very easy to do! Though the
whole first byte for each Starting and Ending CHS entry
is always for the Head*, the
Cylinder and Sector bytes must be regrouped before you can compute
them! To compute the Sector value, you must remove the leading two
bits of the second (or middle) byte; thus the largest value you can
have for a Sector is: 3Fh (__11 1111) = 63. To compute the Cylinder
value, the two bitsfrom the middle byte become the first
two bits of a ten-bit hex number that ends with
the last byte in each CHS entry. So, the largest value you can have for
a Cylinder is: 3FFh (11 1111 1111) = 1023
(in the table, which gives you a count of 1024
cylinders). Since these are the largest values that can be used in any Standard
Partition Table, all CHS values are limited to: 1024
x 255* x 63
= 16,450,560 sectors (or 8,422,686,720 bytes); thus the 8.4 GB
limit for any BIOS without the newer INT 13Extensions
(such as Functions 42, 43 and 48 for reading, writing and getting drive parameters)!________________*For
those who missed the note about why we do not use 256 heads, see this:
Note about a 'bug' in MS-DOS.

Therefore, when any
part of a partition reaches further than 8.4 GB into a drive,
you lose some redundancy as can be seen in the Last Sector CHS portion
of this entry:

If the Cylinder
value wasn't limited to 1023, then the Last Sector CHS triple's cylinder
value could be computed as follows: 26,394,795(14,105,070 + 12,289,725;
the same as the Relative Sector Offset in the next entry!)divided
by 16,065 (255 x 63) =1643
cylinders. So, the CHS would be: 1642,254,63.

And for any full partition
that's beyond 8.4 GB, such as the last two entries in our example Partition
Table above, only the values inside of the thin GREEN lines can be used
to compute both a partition's actual size and location!
Note both the Starting Sector and Last Sector items in our example Table's third
entry:

Finally, the fourth
entry in our example Table is that of an LBA Extended Partition (type
= 0Fh). In the case of any Extended Partition, its Total Sectors (or
Length) includes all of the Logical partitions that may exist inside of it,
whether there's only one or many. Extended Partitions often run all the way
to the end of a drive's useable sectors, but they don't have to. You should
also note that even if all four entries of a Partition Table are being
used, that does not necessarily mean there's no empty space left
on a drive.