Almost every operating system supports a system for dividing a disk into logical devices, called partitions. Other terms for the same basic concept are slices and logical volumes, although logical volumes generally also imply the ability to span physical disks. Linux supports several different partitioning formats, but by default it uses the MS-DOS format. The MS-DOS partition table allows for up to four primary partitions. One of these four primary partitions can be replaced with an extended partition, which can contain up to 12 logical partitions, for a total of 15 possible usable partitions (16 if you count the extended partition “container,” but it is not usable for data).
The type of partition (as well as the type of device) affects the name of the device Linux uses to access the partition.
- Primary partitions
This type of partition contains a filesystem. If all four primary partitions exist on an IDE drive, they are numbered as follows:
One of these primary partitions may be marked active, in which case the PC BIOS will be able to select it for boot.
- Extended partitions
An extended partition is a variant of the primary partition but cannot contain a filesystem. Instead, it contains logical partitions. Only one extended partition may exist on a single physical disk. For example, the partitions on a disk with one primary partition and the sole extended partition might be numbered as follows:
/dev/hda2 (extended) ...