2.1 Introduction to Partitioning

Partitioning is the process of dividing a storage device into local sections, called partitions, which help organize multiple filesystems and their associated operating systems.

A storage device presents itself as a sequence of bytes, numbered starting from zero and increasing until the maximum capacity of the device is reached. Bytes are normally read and written a sector at a time, rather than individually. Each sector contains a fixed number of bytes, with the number determined by the device.

+------------------------------------------------------------+
|            storage device with no partitions               |
+------------------------------------------------------------+
0 start                                                    end

In order to store multiple filesystems, a storage device can be divided up in to multiple partitions. Each partition can be thought of as an area which contains a real filesystem inside of it. To show where these partitions are on the device a small table is written at the start, shown as PT in the diagram below. This table is called a partition table, or disklabel, and also stores the type of each partition and some flags.

+--+---------------+----------------+------------------------+
|PT|  Partition 1  |  Partition 2   |  Partition 3           |
+--+---------------+----------------+------------------------+
0 start                                                    end