Disk Partitions

Disk partitioning
Disk partitioning is the act of dividing a hard disk drive into multiple logical storage units referred to as partitions, to treat one physical disk drive as if it were multiple disks. Partitions are also termed "slices" for operating systems based on BSD, Solaris or GNU Hurd. A partition editor software program can be used to create, resize, delete, and manipulate these partitions on the hard disk.

Multiple Partitions

 * separation of operating systems and program files,this alows backups (clones) of the OS's to be made.
 * Having a separate area for operating system virtual memory
 * Use of multi-boot setups, which allow users to have more than one operating system on a single computer. For example, one could install Linux, BSD, Mac OS X, Microsoft Windows or other operating systems on different partitions of the same hard disk and have a choice of booting into any compatible operating system at power-up.
 * Protecting or isolating files, to make it easier to recover a corrupted file system or operating system installation. If one partition is corrupted, other file systems may not be affected.

Disadvantages of multiple partitions.

 * Reduces Disk Space
 * Increases disk fragmentation because it lowers the average size of continuous free blocks on each partition - as compared to a single partition of the same overall size - after the same amount of data has been written to them.
 * Hurts portability and might impose constraints on how entities might be linked together inside the file system. For example: the NTFS file system allows hard links to be created only as long as both the link and the referenced file reside inside the same volume/partition.Also under Windows if you're referencing a file on another partition, you can do that only by specifying the partition's assigned drive letter - which, however, might change with time and depending on the drives installed. This renders references invalid and dependent on actual drive letter assignment, which is not an issue if you have to reference files/directories only on the same partition, as in this case you can use directory-relative or root-relative references, without including the drive/partition letter.

partition types
The partition type is identified by a 1-byte code found in its partition table entry. Some of these codes (such as 0x05 and 0x0F) may be used to indicate the presence of an extended partition. Most are used by an operating system's bootloader (that examines partition tables) to decide if a partition contains a file system that can be used to mount / access for reading or writing data.

Primary partition
A primary partition contains one file system. In DOS and earlier versions of Microsoft Windows systems, the system partition was required to be the first partition. More recent Windows operating systems (Win7, XP, etc.) can be located on any partition, but the boot files (bootmgr, ntldr, etc.) must be on a primary partition. However, other factors, such as a PC's BIOS (see Boot sequence on standard PC) may also impart specific requirements as to which partition must contain the primary OS.

The partition type code for a primary partition can either correspond to a file system contained within (e.g. 0x07 means either an NTFS or an OS/2 HPFS file system) or indicate that the partition has a special use (e.g. code 0x82 usually indicates a Linux swap partition). The FAT16 and FAT32 file systems have made use of a number of partition type codes due to the limits of various DOS and Windows OS versions. Though a Linux operating system may recognize a number of different file systems (ext4, ext3, ext2, ReiserFS, etc.), they have all consistently used the same partition type code: 0x83 (Linux native file system).
 * Further information: Partition type

Extended partition
A hard disk may contain only one extended partition; the extended partition can be subdivided into multiple logical partitions. In DOS/Windows systems, each logical partition may then be assigned an additional drive letter.
 * Further information: Extended Boot Record