Disk partitioning

Short description: Creation of accessible areas on secondary storage device

GParted is a popular utility used for disk partitioning

Disk partitioning or disk slicing[1] is the creation of one or more regions on secondary storage, so that each region can be managed separately.[2] These regions are called partitions. It is typically the first step of preparing a newly installed disk after a partitioning scheme is chosen for the new disk before any file system is created. The disk stores the information about the partitions' locations and sizes in an area known as the partition table that the operating system reads before any other part of the disk. Each partition then appears to the operating system as a distinct "logical" disk that uses part of the actual disk. System administrators use a program called a partition editor to create, resize, delete, and manipulate the partitions.[3] Partitioning allows the use of different filesystems to be installed for different kinds of files. Separating user data from system data can prevent the system partition from becoming full and rendering the system unusable. Partitioning can also make backing up easier. A disadvantage is that it can be difficult to properly size partitions, resulting in having one partition with too much free space and another nearly totally allocated.

## Contents

* 1 History
* 2 Partitioning schemes
* 2.1 DOS, Windows, and OS/2
* 2.2 Unix-like systems
* 2.3 Multi-boot systems
* 2.4 GUID Partition Table
* 3 Partition recovery
* 4 Compressed disks
* 5 Partition table
* 6 PC partition types
* 6.1 MBR
* 6.2 Primary partition
* 6.3 Extended partition
* 6.4 Boot partitions
* 6.4.1 BIOS boot partition
* 6.4.2 EFI system partition
* 7 See also
* 8 References
* 9 Further reading

## History

One of the earliest such forms of segmentation of a disk drive was IBM's 1966[4] usage in its CP-67 operating system of minidisk as a separate segment of a hard disk drive.[5]

Data General's RDOS operating system for their Nova computers used the term partition for subregions of a disk. Each partition had its own directory.[6][7]

IBM in its 1983 release of PC DOS version 2.0 also used the term partition to describe dividing a block storage device such as an HDD into physical segments. The term's usage is now ubiquitous.[citation needed] Other terms used include logical disk,[8] minidisk,[5] portions,[9] pseudo-disk,[9] section,[9] slice[10] and virtual drive.[11]

## Partitioning schemes

### DOS, Windows, and OS/2

With DOS, Microsoft Windows, and OS/2, a common practice is to use one primary partition for the active file system that will contain the operating system, the page/swap file, all utilities, applications, and user data. On most Windows consumer computers, the drive letter C: is routinely assigned to this primary partition. Other partitions may exist on the HDD that may or may not be visible as drives, such as recovery partitions or partitions with diagnostic tools or data. (Windows drive letters do not correspond to partitions in a one-to-one fashion, so there may be more or fewer drive letters than partitions.)

Microsoft Windows 2000 and later versions include a 'Disk Management' program which allows for the creation, deletion and resizing of FAT and NTFS partitions. The Windows Disk Manager in Windows Vista and Windows 7 utilizes a 1 MB partition alignment scheme which is fundamentally incompatible with Windows 2000, XP, OS/2, DOS as well as many other operating systems.

### Unix-like systems

On Unix-based and Unix-like operating systems such as Linux, macOS, BSD, and Solaris, it is possible to use multiple partitions on a disk device. Each partition can be formatted with a file system or as a swap partition.

Multiple partitions allow directories such as /boot, /tmp, /usr, /var, or /home to be allocated their own filesystems. Such a scheme has a number of advantages:

* If one file system gets corrupted, the data outside that filesystem/partition may stay intact, minimizing data loss.
* Specific file systems can be mounted with different parameters, e.g., read-only, or with the execution of setuid files disabled.
* A runaway program that uses up all available space on a non-system filesystem does not fill up critical filesystems.
* Keeping user data such as documents separate from system files allows the system to be updated with lessened risk of disturbing the data.

A common minimal configuration for Linux systems is to use three partitions: one holding the system files mounted on "/" (the root directory), one holding user configuration files and data mounted on /home (home directory), and a swap partition.

By default, macOS systems also use a single partition for the entire filesystem and use a swap file inside the file system (like Windows) rather than a swap partition.

In Solaris, partitions are sometimes known as slices. This is a conceptual reference to the slicing of a cake into several pieces.

The term "slice" is used in the FreeBSD operating system to refer to Master Boot Record partitions, to avoid confusion with FreeBSD's own disklabel-based partitioning scheme. However, GUID Partition Table partitions are referred to as "partition" worldwide.

### Multi-boot systems

A GRUB startup menu showing Ubuntu Linux (with three different boot modes) and Windows Vista options

Multi-boot systems are computers where the user can boot into more than one distinct operating system (OS) stored in separate storage devices or in separate partitions of the same storage device. In such systems a menu at startup gives a choice of which OS to boot/start (and only one OS at a time is loaded).

This is distinct from virtual operating systems, in which one operating system is run as a self-contained virtual "program" within another already-running operating system. (An example is a Windows OS "virtual machine" running from within a Linux OS.)

### GUID Partition Table

The GUID Partition Table (GPT) (GUID is from Globally Unique IDentifier) is a part of the Unified Extensible Firmware Interface (UEFI) standard for the layout of the partition table on a physical hard disk. Many operating systems now support this standard. However, Windows does not support this on BIOS based computers.[12]

## Partition recovery

When a partition is deleted, its entry is removed from a table and the data is no longer accessible. The data remains on the disk until it is overwritten. Specialized recovery utilities may be able to locate lost file systems and recreate a partition table which includes entries for these recovered file systems. Some disk utilities may overwrite a number of beginning sectors of a partition they delete. For example, if Windows Disk Management (Windows 2000/XP, etc.) is used to delete a partition, it will overwrite the first sector (relative sector 0) of the partition before removing it. It still may be possible to restore a FAT or NTFS partition if a backup boot sector is available.

## Compressed disks

HDDs can be compressed to create additional space. In DOS and early Microsoft Windows, programs such as Stacker (DR-DOS except 6.0), SuperStor (DR DOS 6.0), DoubleSpace (MS-DOS 6.0–6.2), or DriveSpace (MS-DOS 6.22, Windows 9x) were used. This compression was done by creating a very large file on the partition, then storing the disk's data in this file. At startup, device drivers opened this file and assigned it a separate letter. Frequently, to avoid confusion, the original partition and the compressed drive had their letters swapped, so that the compressed disk is C:, and the uncompressed area (often containing system files) is given a higher name.

Versions of Windows using the NT kernel, including the most recent version, Windows 11, contain intrinsic disk compression capability. Despite advancements in processing power and more efficient and transparent compression methods, the use of separate disk compression utilities has declined sharply. Modern compressing utilities include CompactGUI and CompressorX.[13]

## Partition table

A partition table is a table maintained on a disk by the operating system that outlines and describes the partitions on that disk.[14] The terms partition table and partition map are similar terms and can be used interchangeably. The term is most commonly associated with the MBR partition table of a Master Boot Record (MBR) in PCs, but it may be used generically to refer to other formats that divide a disk drive into partitions, such as: GUID Partition Table (GPT), Apple partition map (APM),[15] or BSD disklabel.[16]

Here is an example of GUID Partition Table for a 512 GB NVM Express solid state drive as used with multi-boot configuration, containing an EFI system partition, a Microsoft Reserved Partition, three Microsoft Basic Data Partitions (one is Windows standard partition and two are hidden Windows Recovery Environment partitions), and three Linux partitions (including a swap partition):

label: gpt
label-id: 96BB56B7-AE3C-4E94-986E-10E7F3CCA80B
device: /dev/nvme0n1
unit: sectors
first-lba: 34
last-lba: 1000215182
sector-size: 512

/dev/nvme0n1p1 : start=        2048, size=      532480, type=C12A7328-F81F-11D2-BA4B-00A0C93EC93B, uuid=7885D52E-0F50-4E28-B058-8DCE7B7FF921, name="EFI system partition"
/dev/nvme0n1p2 : start=      534528, size=       32768, type=E3C9E316-0B5C-4DB8-817D-F92DF00215AE, uuid=5C34D099-E77A-4B46-9662-430D33E55AFF, name="Microsoft reserved partition"
/dev/nvme0n1p3 : start=      567296, size=   419196928, type=EBD0A0A2-B9E5-4433-87C0-68B6B72699C7, uuid=109218B1-3097-4635-BE5F-044E28C2BCB0, name="Basic data partition"
/dev/nvme0n1p4 : start=   419764224, size=     1669120, type=DE94BBA4-06D1-4D40-A16A-BFD50179D6AC, uuid=527B26E5-2768-444E-AB1F-ECB28201F3C8, attrs="RequiredPartition GUID:63"
/dev/nvme0n1p5 : start=   421435392, size=   329410560, type=0FC63DAF-8483-4772-8E79-3D69D8477DE4, uuid=5C52E480-AEE7-437B-A136-53F8C946D5ED, name="Linux Stuff"
/dev/nvme0n1p6 : start=   750845952, size=   243933184, type=0FC63DAF-8483-4772-8E79-3D69D8477DE4, uuid=023F3B88-D3D9-4E39-9F50-77F242410789, name="Linux Root"
/dev/nvme0n1p7 : start=   994779136, size=     4194304, type=0657FD6D-A4AB-43C4-84E5-0933C84B4F4F, uuid=18F44D65-B28D-4871-AF02-DDBD96771460, name="Swap"
/dev/nvme0n1p8 : start=   998973440, size=     1228800, type=DE94BBA4-06D1-4D40-A16A-BFD50179D6AC, uuid=D4A41B1A-2F28-4AE5-AC67-A2D98FB91E22, name="Basic data partition", attrs="RequiredPartition GUID:63"

## PC partition types

### MBR

See also: Partition type

This section describes the master boot record (MBR) partitioning scheme, as used historically in DOS, Microsoft Windows and Linux (among others) on PC-compatible computer systems. As of the mid-2010s, most new computers use the GUID Partition Table (GPT) partitioning scheme instead.[citation needed] For examples of other partitioning schemes, see the general article on partition tables.

The total data storage space of a PC HDD on which MBR partitioning is implemented can contain at most four primary partitions, or alternatively three primary partitions and an extended partition. The Partition Table, located in the master boot record, contains 16-byte entries, each of which describes a partition.

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 mounted / accessed for reading or writing data.

### Primary partition

A primary partition contains one file system. In DOS and all early versions of Microsoft Windows systems, Microsoft required what it called the system partition to be the first partition. All Windows operating systems from Windows 95 onwards can be located on (almost) any partition, but the boot files (`io.sys`, `bootmgr`, `ntldr`, etc.) must reside on a primary partition. However, other factors, such as a PC's BIOS (see Boot sequence on standard PC) may also impose 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).

### Extended partition

An HDD may contain only one extended partition, but that extended partition can be subdivided into multiple logical partitions. DOS/Windows systems may then assign a unique drive letter to each logical partition. GUID partition table (GPT) only has the primary partition, doesn't have the extended partition and the logical partition.

### Boot partitions

See also: System partition and boot partition

#### BIOS boot partition

BIOS boot partition (BIOS BP) is a share of the storage device used to keep software that boots the operating system, a bootloader. It may be an operating system kernel image or bootloader or a completely separate piece of software.[17][18]: 136

#### EFI system partition

EFI system partition is the same as BIOS BP, but is loaded by EFI firmware instead of BIOS.[17][18]: 136

## See also

| The Wikibook Guide to Unix has a page on the topic of: Partitioning Disks

|

* Amiga rigid disk block
* Disk formatting
* Filesystem Hierarchy Standard
* List of disk partitioning software
* LVM
* Master boot record covers the partition table layout
* Partition alignment
* RAID
* JBOD

## References

1. ↑ Calkins, Bill (2013). Oracle Solaris 11 System Administration. http://www.informit.com/articles/article.aspx?p=2103810&seqNum=10. Retrieved 2016-03-04.
2. ↑ Levi, Bozidar (2002). UNIX Administration.
3. ↑ Ward, Brian (2004). How Linux Works: What Every SuperUser Should Know. No Starch Press. p. 39. ISBN 9781593270353. https://books.google.com/books?id=wOGUuoHUyAEC&pg=PA39.
4. ↑ R. J. Creasy (September 1981). "The Origin of the VM/370 Time-Sharing System". IBM Journal of Research and Development 25 (5): 483–490. doi:10.1147/rd.255.0483. ISSN 0018-8646. https://pages.cs.wisc.edu/~stjones/proj/vm_reading/ibmrd2505M.pdf. Retrieved February 10, 2022.
5. ↑ 5.0 5.1 As used in IBM CP-67 beginning 1966 see: Rogers, Bob (February 6, 2017). "Virtualization's Past Helps Explain Its Current Importance". TechChannel. https://techchannel.com/Enterprise/02/2017/virtualization-past-current. "A minidisk is only part of a physical disk but appears to be a separate disk to the guest."
6. ↑ Introduction to the Real Time Disk Operating System. Data General. 1972. p. 11. http://www.bitsavers.org/pdf/dg/software/rdos/093-000083-02_RDOS_Intro_1972.pdf.
7. ↑ Real Time Disk Operating System (RDOS) Manual. Data General. March 1979. pp. 2-9-2-11. http://www.bitsavers.org/pdf/dg/software/rdos/093-000075-08_RDOS_Reference_Manual_Mar79.pdf.
8. ↑ As used by DEC RT-11 circa 1984, see: "RT-11 System Release Notes". Digital Equipment Corporation. December 1983. http://www.bitsavers.org/pdf/dec/pdp11/rt11/v5.1_Jul84/AA-5286F-TC-T1_RT-11_System_Release_Notes_Jul84.pdf.
9. ↑ 9.0 9.1 9.2 The Version 6 Unix man page for the RP-11/RP03 device and driver `[[[:Template:Man/v6]] rp(Template:Man/v6)]` – Template:Man/v6 \- speaks of the disk being divided into portions, pseudo-disks and sections.
10. ↑ The 1993 Solaris 2.2 installation guide - "Solaris 2.2 Basic Installation Guide". http://bitsavers.org/pdf/sun/solaris/2.2/801-4048-10A_Solaris_2.2_Basic_Installation_Guide_199305.pdf. \- says in a glossary entry that slice is "A discrete portion of a disk, configured during installation." Under SunOS 4.l.x and System V Release 3, slices were referred to as partitions.
11. ↑ The 1980 Corvus Guide - "Constellation II Generation Guide, Apple II". http://bitsavers.org/pdf/corvus/constellation_II/7100-06111-02_Constellation_II_Generation_Guide_Apple_II_Apr1984.pdf. \- for Apple II installations allows division of a hard disk drive into virtual drives.
12. ↑ windows-driver-content. "BIOS/MBR-based hard drive partitions" (in en-us). https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/configure-biosmbr-based-hard-drive-partitions.
13. ↑ Conway, Adam (2025-05-01). "I use this free, open-source tool to significantly compress my games on Windows without any performance loss" (in en). https://www.xda-developers.com/free-open-source-tool-compress-games-windows-compactgui/.
14. ↑ Essential System Administration: Tools and Techniques for Linux and Unix Administration. O'Reilly Media, Inc.. 2002. p. 86. ISBN 9780596004491. https://archive.org/details/essentialsystema00fris_0.
15. ↑ The pdisk utility for Apple Partition Maps is described as an Apple partition table editor in its pdisk(8) man page: `pdisk(8)` – Darwin and macOS System Manager's Manual.
16. ↑ "About Disk Labels". System Administration Guide, Volume 1. http://docs.sun.com/app/docs/doc/805-7228/6j6q7uet6?a=view. (NB. The Solaris documentation on disklabels uses the term "partition table".)
17. ↑ 17.0 17.1 "What are system partition and boot partition?". https://www.easyuefi.com/wintousb/faq/en-US/What-are-system-partitions-and-boot-partitions.html.
18. ↑ 18.0 18.1 Cross, Michael (2008). Scene of the cybercrime.. Debra Littlejohn Shinder (2nd ed.). Burlington, MA: Syngress Pub. ISBN 978-0-08-048699-4. OCLC 272383168.

## Further reading

* "The Alt-OS-Development Partition Specification (AODPS)". 2002-11-02. http://www.adaos.net/aodps/aodps.html.
* Andries Brouwer (1995–2004). "List of partition identifiers for PCs". http://www.win.tue.nl/~aeb/partitions/partition_types-1.html.
* Andries Brouwer (1999-09-16). "Minimal Partition Table Specification". http://www.win.tue.nl/~aeb/partitions/partition_tables.html.
* "partitioning primer". Ranish. 1998-08-05. http://www.ranish.com/part/primer.htm.
* Allen Smith. "ATA (EIDE) Drive Capacity and Addressing". http://www.allensmith.net/Storage/HDDlimit/Address.htm.
* Microsoft (2005-06-03). "Using GPT Drives". http://www.microsoft.com/whdc/device/storage/GPT-on-x64.mspx.
* "What are system partition and boot partition?". https://www.easyuefi.com/wintousb/faq/en-US/What-are-system-partitions-and-boot-partitions.html.

0.00

(0 votes)

Original source: https://en.wikipedia.org/wiki/Disk partitioning. Read more

|

Retrieved from "https://handwiki.org/wiki/index.php?title=Disk_partitioning&oldid=4293477"