Partitioning is the process of writing the hard drive sectors that will make up the partition table. It contains information on the partition, including sector size, position with respect to the primary partition, types of partitions present, operating systems installed, etc. When a partition is created, it is given a volume name, which allows it to be easily identified. Read on for more information.
The partitioning of a hard drive occurs after the drive has been physically formatted but before it is logically formatted. It involves creating areas on the disk where data will not be mixed.
It can be used for example, to install different operating systems that do not use the same file system. Therefore, logically there will be at least as many partitions as there are operating systems using different file systems. If you are using just one operating system, a single partition of the full size of the disk is sufficient. That is unless you want to create several partitions so as to have several drives on which data is kept separately.
There are three types of partitions: primary partitions, extended partitions and logical drives. A disk may contain up to four primary partitions (only one of which can be active), or three primary partitions and one extended partition. In the extended partition, the user can create logical drives (i.e. "simulate" several smaller-sized hard drives).
Here is an example of where the disk contains one primary partition and one extended partition made up of three logical drives:
What is “master boot record”? The boot sector (called the Master Boot Record or MBR) is the first sector of a hard drive (cylinder 0, head 0, sector 1). It contains the main partition table and the code, called the bootloader, which when loaded into memory, will allow the system to boot up.
After it is loaded into memory, this program will determine from which system partition to boot, and will start the program (called the bootstrap), which will start up the operating system present on that partition.
This disk sector also contains all of the information concerning the hard drive (i.e., manufacturer, serial number, number of bytes per sector, number of sectors per cluster, number of sectors, etc.). This sector is therefore the most important one on the hard drive and is also used by the BIOS setup to recognise the hard drive. In other words, without it, your hard drive is useless, which makes it a favourite target for viruses.
In this section, it is important to differentiate between the FAT file system and the file allocation table (FAT).
FAT is the name of the file system used by DOS operating systems (DOS and Windows 95, as well as Windows NT and OS/2, which support it).
|Operating system||Associated file system|
|Windows 95||FAT16 - FAT32 (for version OSR2)|
|Linux||Linux Ext2, Linux Ext3|
FAT file systems are characterized by the use of a file allocation table and clusters (or blocks).
Clusters are the smallest unit of storage in a FAT file system. A cluster actually represents a fixed number of disk sectors.
The FAT (File Allocation Table) is the heart of the file system. It is located in sector 2 of cylinder 0, head 1 (and is duplicated in another sector as a precaution in the event of an accident). This table records the numbers of the clusters that are used and where the files are located in the clusters.
The FAT file system supports disks or partitions up to a maximum size of 2 GB but only allows at most 65,536 clusters. So, whatever the size of the partition or disk, there must be enough sectors per cluster so that the entire disk space can be contained in these 65,525 clusters. As a result, the larger the disk (or partition), the greater the number of sectors per cluster.
The FAT file system uses a root directory (represented on the operating systems that use this type of file system by the symbol C:\) , which must be located at a specific location on the hard drive. This root directory stores information on the sub-directories and files that it contains. For a file, it will store the file name, the file size, the date and time the file was last modified, the file attributes, and the cluster number at which the file starts.
As mentioned before, there are three types of partitions: primary partitions, extended partitions and logical drives. A disk may contain up to four primary partitions (only one of which can be active), or three primary partitions and one extended partition. In the extended partition, the user can create logical drives (i.e. create the impression that there are several smaller-sized hard drives).
What is “primary partition”? A primary partition must be logically formatted and have a file system appropriate to the operating system installed on it.
If you have several primary partitions on your disk, only one will be active and visible at a time, depending on the operating system with which you started the computer. By choosing which operating to load at start-up, you determine which partition will be visible. The active partition is the partition from which one of the operating systems was loaded when the computer was started up. The other inactive partitions will then be hidden, which will prevent their data from being accessible. The data on a primary partition is therefore only accessible from the operating system installed on that partition.
Now that we’ve discussed the primary partition, it is time to answer the question of what is “extended partition”? Extended partitions were developed to overcome the limit of four primary partitions, as you can create as many logical drives as you want in them. At least one logical drive is required in an extended partition, as you cannot store data in them directly.
Many machines are formatted with one large partition using up all available space on the drive. This is not, however, the most advantageous solution in terms of performance and capacity. The solution is to create several partitions, which will allow you to install several operating systems on your disk, save disk space, increase file security, and organise your data more easily.
Here is what a system containing several operating systems looks like:
There are many free programs that can help you to partition your hard drive. Some of the most well-known ones are EASEUS Partition Master and Partition Home Edition.
Images: © ladyann - 123RF.com/Unsplash