In order to use the space in a hard disk, it must be partitioned. Partitioning
is the process of dividing the hard disk's space into pieces, so they can be prepared for
use, or even dedicated to different uses. Even if the entire disk is intended to be left
in one piece, it must be partitioned so that the operating system knows that it is
intended to be left in one piece. There are many different
considerations that go into deciding how to partition a hard disk.
Each hard disk can contain up to four different "true" partitions, which are
called primary partitions. The limitation of four is one that is imposed on the
system by the way that the master boot record is structured. Normally, if you are only
using DOS, Windows 3.x or Windows 95, you will have a single primary partition. Multiple
primary partitions can be used if you want to set your machine up for use by multiple
operating systems. Partitions are also sometimes called volumes, especially in
reference to DOS.
DOS itself can only have one primary partition per hard disk. You may find this
statement confusing, since you have no doubt seen PCs that have four or more DOS
partitions. A hard disk that has four DOS partitions still has only (at most) one primary
DOS partition. The others are logical partitions that are stored in the disk's extended
DOS partition.
OK, this sounds confusing so I will try to clarify somewhat. The original designers of
DOS obviously did not foresee multi-gigabyte hard disks containing large numbers of
partitions. Later versions of DOS were enhanced to allow DOS to use up to 24 total disk
partitions. In order to preserve compatibility with the original DOS structures that only
allow four partitions, the extra partitions are stored in an extended partition.
I mentioned above that there is room for four primary partitions on a hard disk. If you
use an extended partition, however, that takes up a "slot" reserved for one of
the four primaries, so you are then limited to three primaries plus the extended
partition. When you set up an extended partition, it is initially empty; you use up the
space in it by adding logical partitions (sometimes also called logical DOS
drives or logical volumes). You can store up to 24 logical drives in the
extended partition if you are not using a DOS primary partition on the disk, or 23 if you
are using a primary. The limiting factor here is drive letters: hard disks start with C:
and end with Z:. Of course virtually nobody uses that many partitions on their system.
Internally, the logical drives are stored in a linked structure. The extended
partition's information is contained in the master partition table (since the extended
partition is one of the four partitions stored in the master boot record). It contains a
link to an extended partition table that describes the first logical partition for
the disk. That table contains information about that first logical partition, and a link
to the next extended partition table which describes the second logical partition
on the disk, and so on. The extended partition tables are linked in a chain starting from
the master partition table.
In terms of how the disk is used, there are only two main differences between a primary
and a logical partition or volume. The first is that a primary partition can be set as bootable (active) while a logical cannot. The
second is that DOS assigns drive letters (C:, D: etc.)
differently to primary and logical volumes.
Here's an example to hopefully make all of this a bit more clear. Let's suppose you are
setting up a new system and starting with an empty 2 GB hard disk. For efficiency purposes
you have decided to partition the system into four equal 500 MB partitions. I'm assuming
no complicating factors here, just a simple example.
To do this, you will first set up a primary DOS partition 500 MB in size. This is the
first of your four partitions. You will then create an extended DOS partition that is 1500
MB in size. Within the extended DOS partition you will create three logical volumes, 500
MB in each, which are your second, third and fourth volumes. The first partition will be
your C: drive from which you boot the machine, and DOS will (normally) assign D:, E: and
F: to the other three partitions. Your hard disk will have one primary DOS partition, and
one extended DOS partition containing three logical DOS volumes.
Once the system is set up, there is no functional difference between these partitions,
other than the fact that C: is the only bootable one and is where all the DOS system files
reside. Regular files can reside wherever you want them to.
Next: Volume Boot Sectors