You are on page 1of 4

Disk partitioning

Disk partitioning is the creation of divisions of a hard disk. Once a disk
is divided into several partitions, directories and files can be
grouped by categories such as data type and type usage. More
separate data categories provide more control but too many
become cumbersome. Space management, access permissions
and directory searching are based on the file system installed on
a partition. Careful consideration of the size of the partition is
necessary as the ability to change the size depends on the file
system installed on the partition.

Benefits of Partitioning
Separation of the operating system files from user files or having a
partition for swapping, separate from system utilities, keeps frequently
used programs and data near each other. Having browser cache files in
a separate partition keeps them away from other files. The frequency
of update and access is an important consideration for categorizing
files. Separating email from audio or photos is a good idea. Files that
can be retrieved from other sources can be grouped together.
Futher benefits include:
 The use of multi-booting setups, which allow users to have more
than one operating system on a single computer. For example,
one could install Linux, Mac OS X, Microsoft Windows or others on
different partitions of the same hard disk and have a choice of
booting into any operating system (supported by the hardware)
at power-up.
 Sharing swap partitions between multiple Linux distributions, so
such partitions use less hard drive space.
 Protecting or isolating files, to make it easier to recover a
corrupted file system or operating system installation.
 Raising overall computer performance because smaller
filesystems are more efficient. For instance, large hard drives
with only one NTFS filesystem typically have a very large Master
File Table (MFT) and it generally takes more time to read this MFT
than the smaller MFTs of smaller partitions.
 Higher levels of data organization, raising the user efficiency of
the system, for example separate partitions dedicated to digital
movie processing, photos, email mailboxes or browser cache.
Partitions may be customized to different requirements, for example,
allowing for read-only partitions to protect data: if one partition is

then its file system may no longer remain hidden. none of the other file systems are affected. The "partition type" code for a primary or logical partition can either correspond to a file system contained within (e. The FAT16 and FAT32 file systems have made use of quite a number of partition type codes over time due to the limits of various DOS and Windows OS versions. PC BIOS partition types This section describes partitions as used in MS-DOS.damaged. In MS-DOS and earlier versions of Microsoft Windows systems. or 1-3 primaries and a single extended partition. this can depend on other factors. Though a Linux operating system may recognize a number of . code 0xBC may mean an Acronis Secure Zone and code 0x82 usually indicates a Linux swap partition). Other operating systems may not share this limitation. for examples of partitioning schemes used in other operating systems. Each of these partitions are described by a 16-byte entry in the Partition Table which is located in the Master Boot Record. The "type" of a partition is identified by a 1-byte code found in its partition table entry. A PC hard disk can contain either as many as four primary partitions. 0x07 means either an NTFS or an OS/2 HPFS file system) or indicate the partition has a special use (e. (Note: There are no officially assigned partition types. Once a specific partition's type has been identified. more than one kind of file system may lay claim to the same code value.) Primary (or Logical) A primary (or logical) partition contains one file system. the first partition (C:) must be a "primary partition". additional information about its purpose and probable contents may be found (see: List of partition identifiers for PCs as one such resource). thus. but most are used by operating systems that examine partition tables to decide if a partition contains a file system they can mount/access for reading or writing data. Microsoft Windows and Linux on PC compatible computer systems. however.g. such as a PC's BIOS. Some of these codes (such as 0x05 and 0x0F) may be used to indicate the presence of an extended partition.g. some type codes are used to hide a partition's contents from various operating systems. if an OS or some partitioning tool has been programmed to also examine the boot sectors of any partition. For example. see Slice (disk) and BSD disklabel. However. and the drive's data may still be salvageable.

the C: drive. a hard disk with one primary partition and one extended partition. however. Proponents of multiple partitions generally point to the benefit of being able to erase a single partition (typically the operating system itself) while retaining the other data. under either DOS or Windows. swap and all remaining files under the "/" (root directory) is possible. etc. where the operating system. Unix For Unix-based and Unix-like operating systems such as Linux and Mac OS X. deletion and movement of partitions. D: and E: (in that order). applications. For example. When used in conjunction with third-party partition management programs such as Acronis True Image. Windows Vista includes an inbuilt 'Disk Management' program which allows for the creation. and trojan horses or an otherwise damaged. they have all consistently used the same partition type code: 0x83 (Linux native). (The same is true for Sun operating systems. /home. /usr. each of which is (under DOS and Windows) assigned additional drive letters. corrupt or compromised operating system. except their partitions are called slices. the creation of separate partitions for /boot. the rest of the data (the . Norton Partition Magic. the latter containing two logical drives. ext3. prefer to create multiple partitions so that the operating system can be stored separately from other kinds of data. Partitioning schemes Microsoft Windows With Microsoft Windows. which can then be subdivided into logical drives.) Such a scheme has a number of potential advantages: if one file system gets corrupted. user data.). the use of multiple partitions allows computer users to quickly recover from viruses. Some users. Norton Ghost. or specialized recovery programs that come with computers manufactured by most major manufacturers. and page file all reside.different file systems (ext2. /tmp. reiserfs. A hard disk may contain only one extended partition. /var. Extended An extended partition is secondary to the primary partition(s). would typically be assigned the three drive letters: C:. /opt. See Extended Boot Record for information on the structure of an extended partition. rootkits. the standard partitioning scheme is to create a single active primary partition.

increases flexibility by allowing data in volumes to expand into separate physical disks (which can be added when needed). partitions can be accessed read-only and the execution of setuid files disabled thus enhancing security. Specialized recovery utilities. can locate lost file systems and recreate a partition table which includes entries for these recovered file systems. Mac OS X systems use a single "/" (root directory) containing the entire filesystem (including the swap file) as a point of simplicity (but other setup options do exist). For example. often used in servers. another option is to resize existing partitions when necessary.) is used to delete a partition. in general. minimizing data loss. A good implementation requires the user to predict how much space each partition will need. so a user could run out of hard drive space in his or her /home partition. performance may be enhanced due to less disk head travel. which may be a difficult task. it still remains on the disk until being overwritten. Logical Volume Management.other file systems) stay intact. This method has the disadvantage of subdividing the drive into fixed-size partitions. However. . By default. only its partition table entry is removed from a table. Partition recovery When a partition is deleted. Typical desktop systems are often comprised of a single "/" (root directory) containing the entire filesystem plus a much smaller swap partition. if Windows Disk Management (Windows 2000/XP. it will overwrite the first sector (relative sector 0) of the partition before removing it. some disk utilities may also overwrite a number of beginning sectors of a partition they delete. It may be possible to restore a FAT32 or NTFS partition if a backup boot sector is available. even though other partitions still have plenty of usable space. especially for new users. and although the data is no longer accessible. (such as TestDisk and gpart). etc.