Revision as of 21:43, 25 January 2006 editWzwz (talk | contribs)Extended confirmed users709 editsm →See also← Previous edit | Latest revision as of 08:57, 22 December 2024 edit undoPEPSI697 (talk | contribs)Extended confirmed users, Pending changes reviewers, Rollbackers14,577 edits Reverted 1 edit by 2405:201:8016:71D2:C5B5:3750:DECA:6CCB (talk): Non constructive editTags: Twinkle Undo Mobile edit Mobile web edit Advanced mobile edit | ||
Line 1: | Line 1: | ||
{{Short description|Creation of separate accessible storage areas on a secondary computer storage device}} | |||
In ], '''hard disk drive partitioning''' is the creation of logical divisions upon a ] that allows one to apply ]-specific ]. | |||
] is a popular utility used for disk partitioning]] | |||
'''Disk partitioning''' or '''disk slicing'''<ref>{{cite book|first=Bill|last=Calkins|title=Oracle Solaris 11 System Administration|year=2013|url=http://www.informit.com/articles/article.aspx?p=2103810&seqNum=10|access-date=2016-03-04|archive-date=2016-03-07|archive-url=https://web.archive.org/web/20160307094543/http://www.informit.com/articles/article.aspx?p=2103810&seqNum=10|url-status=live}}</ref> is the creation of one or more regions on ], so that each region can be managed separately.<ref>{{cite book|first=Bozidar|last=Levi|title=UNIX Administration|year=2002}}</ref> 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 ] 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. ]s use a program called a ] to create, resize, delete, and manipulate the partitions.<ref>{{cite book|last=Ward|first=Brian|title=How Linux Works: What Every SuperUser Should Know|publisher=No Starch Press|year=2004|isbn=9781593270353|page=39|url=https://books.google.com/books?id=wOGUuoHUyAEC&pg=PA39}}</ref> 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. | |||
Disk partitioning is a simple technique which can be viewed as a precursor of ]. | |||
== |
==History== | ||
IBM in its 1983 release of ] was an early if not first use of the term ''partition'' to describe dividing a block storage device such as an ] into physical segments. The term's usage is now ubiquitous.{{cn|date=August 2023}} Other terms used include ''logical disk'',<ref name="ref1" /> ''minidisk'',<ref name="ref2" /> ''portions'',<ref name="ref3" /> ''pseudo-disk'',<ref name="ref3" /> ''section'',<ref name="ref3" /> ''slice''<ref name="ref4" /> and ''virtual drive''.<ref name="ref5" /> | |||
Partitioning allows one to have multiple ]s on a single hard disk. There are many reasons to do this including: | |||
* Technical limitations (e.g. old versions of the Microsoft ] filesystem that can't address more than a certain amount of hard drive space; old ] that prevent ] operating systems located past a hard drive's 1024th cylinder) | |||
* If one partition becomes corrupt, only that partition suffers and not your whole hard drive. | |||
* On some ]es (e.g. ]) the ] is normally a partition of its own. When it is, systems with a ] configuration can make several OSes use the same swap partition and therefore save disk space. | |||
* To prevent overgrown log or other files from making the whole computer unusable, they are put on their own partition. Then only one partition will run out of space. | |||
* Often, two operating systems cannot coexist on the same partition, or use different "native" disk formats. The drive is partitioned into different logical disks for different OSes. | |||
* Most filesystems write files to disk in groups of fixed-size clusters whose size is directly proportional to the size of the partition the filesystem is on. If a file's size is not a multiple of the cluster size, the last cluster in the file's group of clusters will have unused space that can't be used by other files. So, filesystems that use clusters will cause files to take up more space on disk than they do in memory, and larger partitions means larger cluster sizes and therefore more wasted space. Therefore, using several small partitions instead of one large partition can save space. | |||
* Each partition may be customized to different requirements. For example, if you have a partition which is seldomly written to, you can mount it read-only. If you want to have very many small files, you should use a partition that has a filesystem with many inodes. | |||
* On multi-user systems running ], you may want to prevent users from doing hardlink attacks. To achieve this, the /home and /tmp directories should be separated from the system files in e.g. /var and /etc. | |||
One of the earliest such segmentation of a disk drive was IBM's 1966<ref name="IBMJRD" /> usage in its ] operating system of ''minidisk'' as a separate segment of a hard disk drive.<ref name="ref2" /> | |||
== Implementations == | |||
== Partitioning schemes == | |||
Numerous partitioning schemes have appeared over the years, for almost all computer architectures in existence. Many of them are relatively transparent and allow convenient manipulation of disk partitions; some however are obsolete in design and are accompanied by numerous quirks. | |||
=== DOS, Windows, and OS/2 === | |||
With ], ], and ], a common practice is to use one primary partition for the active ] that will contain the operating system, the page/swap file, all utilities, applications, and user data. On most Windows consumer computers, the ] 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 ], ], ], and ] include a ']' 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 ] scheme which is fundamentally ] with Windows 2000, XP, OS/2, DOS as well as many other operating systems. | |||
=== IBM PC (or clone) === | |||
=== Unix-like systems === | |||
On ]-based and ] operating systems such as ], ], ], and ], it is possible to use multiple partitions on a disk device. Each partition can be formatted with a ] or as a ]. | |||
Multiple partitions allow directories such as ], ], ], ], or ] to be allocated their own filesystems. Such a scheme has a number of advantages: | |||
The partition table, as used in the ] architecture, was first devised in 1982, when hard drives were coming into use. In 1987 with DOS 3.3, an expansion of this format emerged that provided for extended partitions which can contain logical partions. | |||
* If one file system gets corrupted, the data outside that filesystem/partition may stay intact, minimizing data loss. | |||
==== Specifics ==== | |||
* Specific ]s can be mounted with different parameters, e.g., ], or with the execution of ] files disabled. | |||
The partition table is located in the ] on the disk. The master boot record is the first sector on a disk. The partition table consists of 64 bytes. There are 4 partition table entries. Each is 16 bytes in length. | |||
* 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 ]), one holding user configuration files and data mounted on /home (]), and a swap partition. | |||
The partition table starts at offset (]) 0x1BE. Each partition table entry is 16 bytes in length so. | |||
By default, macOS systems also use a single partition for the entire filesystem and use a ] inside the file system (like Windows) rather than a swap partition. | |||
<pre> | |||
Master Boot Record | |||
(offset) | |||
0x0000 to 0x01BD - First 446 bytes | |||
0x01BE to 0x01CD - Partition entry 1 | |||
0x01CE to 0x01DD - Partition entry 2 | |||
0x01DE to 0x01ED - Partition entry 3 | |||
0x01EE to 0x01FD - Partition entry 4 | |||
0x01FE to 0x01FF - Boot signature | |||
</pre> | |||
In Solaris, partitions are sometimes known as '''slices'''. This is a conceptual reference to the slicing of a cake into several pieces. | |||
The two byte master boot record signature at the end tells your computer that this is the boot sector. On some computers the operating system will not boot if the boot signature is not present in the master boot record. | |||
The term "slice" is used in the ] operating system to refer to ] partitions, to avoid confusion with FreeBSD's own ]-based partitioning scheme. However, ] partitions are referred to as "partition" worldwide. | |||
Each partition table entry has the following arrangement... | |||
=== Multi-boot systems === | |||
<pre> | |||
{{Main article|Multi-boot}} | |||
|==========================================================| | |||
] startup menu showing ] Linux (with three different boot modes) and ] options]] | |||
| Byte Count | Description of contents | | |||
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 ] gives a choice of which OS to boot/start (and only one OS at a time is loaded). | |||
|==========================================================| | |||
| 1 | Boot indicator (0x00 for off, 0x80 for on) | | |||
|==========================================================| | |||
| 3 | Starting head, cylinder and sector | | |||
|==========================================================| | |||
| 1 | Filesystem descriptor | | |||
|==========================================================| | |||
| 3 | Ending head, cylinder and sector | | |||
|==========================================================| | |||
| 4 | Starting sector (relative to disk beginning)| | |||
|==========================================================| | |||
| 4 | Number of sectors in partition | | |||
|==========================================================| | |||
</pre> | |||
This is distinct from ], 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.) | |||
Sample partition table entry... (please also keep in mind that all bytes are in ]) | |||
=== GUID Partition Table === | |||
<pre> | |||
{{Main article|GUID Partition Table}} | |||
offset: value explanation | |||
The '''GUID Partition Table''' (]) is a part of the ] (UEFI) standard for the layout of the ] on a physical ]. Many operating systems now support this standard. However, Windows does not support this on BIOS based computers.<ref>{{Cite web|last=windows-driver-content|title=BIOS/MBR-based hard drive partitions|url=https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/configure-biosmbr-based-hard-drive-partitions|access-date=2021-12-06|website=docs.microsoft.com|language=en-us|archive-date=2021-07-25|archive-url=https://web.archive.org/web/20210725015718/https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/configure-biosmbr-based-hard-drive-partitions|url-status=live}}</ref> | |||
======: ===== =========== | |||
0x01BE: 0x80 bootable flag (0x00 for flag off, 0x80 for on) | |||
0x01BF: 0x00 0x02 0x00 starting head, cylinder and sector | |||
0x01C2: 0x83 filesystem descriptor | |||
0x01C3: 0x1A 0x5B 0x8C ending head, cylinder and sector | |||
0x01C6: 0x02 0x00 0x00 0x00 starting sector (relative to beginning of disk) | |||
0x01CA: 0x00 0x35 0x0C 0x00 number of sectors in partition | |||
</pre> | |||
== 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. ] 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 ] or ] partition if a backup boot sector is available. | |||
== Compressed disks == | |||
The CHS ] area of a partition table entry can be confusing. The easiest way to address these values is in binary... | |||
HDDs can be compressed to create additional space. In DOS and early Microsoft Windows, programs such as ] (DR-DOS except 6.0), ] (DR DOS 6.0), ] (MS-DOS 6.0–6.2), or ] (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 ] using the NT kernel, including the most recent version, ], contain intrinsic disk compression capability. The use of separate disk compression utilities has declined sharply. | |||
<pre> | |||
CHS format: | |||
=========== | |||
first 8 bits -> head | |||
next 2 bits -> first 2 bits of cylinder | |||
next 6 bits -> sector (remember sectors start at 1) | |||
last 8 bits -> last 8 bits of cylinder | |||
== Partition table == | |||
Example... | |||
A '''partition table''' is a table maintained on a disk by the operating system that outlines and describes the partitions on that disk.<ref name="Frisch_2002">{{cite book |author-last=Frisch |author-first=AEleen |title=Essential System Administration: Tools and Techniques for Linux and Unix Administration |date=2002 |publisher=] |url=https://archive.org/details/essentialsystema00fris_0|url-access=registration |page= |isbn=9780596004491 }}</ref> The terms ''partition table'' and ''partition map'' are similar terms and can be used interchangeably. The term is most commonly associated with the ] of a ] (MBR) in ], but it may be used generically to refer to other formats that divide a disk drive into partitions, such as: ] (GPT), ] (APM),<ref name="Apple_pdisk">The ''pdisk'' utility for Apple Partition Maps is described as an ''Apple partition table editor'' in its pdisk(8) ]: {{man|8|pdisk|Darwin}}.</ref> or ].<ref name="Solaris">{{cite web |title=About Disk Labels |url=http://docs.sun.com/app/docs/doc/805-7228/6j6q7uet6?a=view |work=System Administration Guide, Volume 1 |access-date=2010-04-03 |url-status=dead |archive-url=https://web.archive.org/web/20070228200258/http://docs.sun.com/app/docs/doc/805-7228/6j6q7uet6?a=view |archive-date=2007-02-28}} (NB. The Solaris documentation on disklabels uses the term "partition table".)</ref> | |||
== PC partition types == | |||
00000000 00 000010 00000000 -> starting | |||
=== MBR === | |||
starting head = 0 (00000000) | |||
{{See also|Partition type}} | |||
starting cylinder = 0 (0000000000) | |||
This section describes the ] (MBR) partitioning scheme, as used historically in ], ] and ] (among others) on ] computer systems. As of the mid-2010s, most new computers use the ] (GPT) partitioning scheme instead. For examples of other partitioning schemes, see the general article on ]. | |||
starting sector = 2 (000010) | |||
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 '']''. The ''Partition Table'', located in the master boot record, contains 16-byte entries, each of which describes a partition. | |||
00011010 01 011011 10001100 -> ending | |||
The ''partition type'' is identified by a 1-byte code found in its partition table entry. Some of these codes (such as {{mono|]}} and {{mono|]}}) may be used to indicate the presence of an ]. 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. | |||
ending head = 26 (00011010) | |||
ending cylinder = 396 (0110001100) | |||
ending sector = 27 (011011) | |||
</pre> | |||
=== Primary partition === | |||
{{Further|Partition type}} | |||
A primary partition contains one file system. In ] and all early versions of ] systems, ] required what it called the ] to be the first partition. All Windows operating systems from Windows 95 onwards can be located on (almost) any partition, but the boot files (<code>io.sys</code>, <code>bootmgr</code>, <code>ntldr</code>, etc.) must reside on a primary partition. However, other factors, such as a PC's ] (see ]) 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., {{mono|]}} means either an ] or an OS/2 ] file system) or indicate that the partition has a special use (e.g., code {{mono|]}} usually indicates a Linux ''swap'' partition). The ] and ] 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 (], ], ], ], etc.), they have all consistently used the same partition type code: {{mono|]}} (]). | |||
The '''Bootable Flag''' determines the ''active'' partition. Only one partition can normally be active at a time. The active marker is used during boot: after the BIOS loads the MBR into memory and executes it, the MBR checks the partition table at its end, and locates the active partition. Then it proceeds to load the boot sector of that partition into memory and runs it. Usually a ] such as ] or ] is contained in there. Some ] require being installed on active partitions. For example, ] 2000 Professional marks its own partition active when it starts up. Thus ] will run next time the system boots, even if the user intended to use another boot loader on a different partition. | |||
=== Extended partition === | |||
{{further|Extended boot record}} | |||
Logical partitions are a way to extend the Master Boot Record's limitation of four partitions. One partition can be designated as an ''extended partition''. This can contain up to 24 ''logical partitions'', whose details are listed in the extended partition's own partition table, the Extended MBR or EMBR. Modern operating systems treat these the same as primary partitions. | |||
An HDD may contain only one extended partition, but that extended partition can be subdivided into multiple logical partitions. DOS/Windows systems may then ] to each logical partition. ] (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 ==== | |||
As the IBM PC architecture is extremely common, the partition tables are likely to stay for a while. A recent project of ] and ] developed for the ] architecture (based around the ] or ] ]) called the ] (EFI) has a component called ] (GPT). Microsoft has included GPT support in Windows Server 2003 SP1 and all variants of Windows x64 (which are all based of Windows Server 2003 SP1) for data disks. However GPT disks are not yet supported by the x64 and x86 architectures so GPT disks still cannot be boot disks on these platforms. Its however unlikely this project will ever replace IBM PC partitions as the Itanium processor was not received well by the market. | |||
BIOS boot partition (BIOS BP) is a share of the storage device used to keep software that boots the operating system, a ]. It may be an operating system kernel image or bootloader or a completely separate piece of software.<ref name=":1">{{Cite web|title=What are system partition and boot partition?|url=https://www.easyuefi.com/wintousb/faq/en-US/What-are-system-partitions-and-boot-partitions.html|url-status=live|access-date=2021-12-07|website=www.easyuefi.com|archive-url=https://web.archive.org/web/20180716142214/https://www.easyuefi.com/wintousb/faq/en-US/What-are-system-partitions-and-boot-partitions.html |archive-date=2018-07-16 }}</ref><ref name=":0">{{Cite book|last=Cross|first=Michael|url=https://www.worldcat.org/oclc/272383168|title=Scene of the cybercrime.|date=2008|publisher=Syngress Pub|others=Debra Littlejohn Shinder|isbn=978-0-08-048699-4|edition=2nd|location=Burlington, MA|oclc=272383168}}</ref>{{Rp|page=136}} | |||
==== EFI system partition ==== | |||
On January 10, 2006, Apple Computer released the new and computers which utilize the ] (EFI) and ] (GPT) as the for all new Intel-based Macintosh computers. | |||
] is the same as BIOS BP, but is loaded by EFI firmware instead of BIOS.<ref name=":1" /><ref name=":0" />{{Rp|page=136}} | |||
== |
== See also == | ||
{{wikibooks|Guide to Unix|Explanations/Partitioning Disks|Partitioning Disks}} | |||
=== Microsoft Windows === | |||
* ] | |||
With ] the standard partitioning scheme is to create a single partition, the C: drive, where the operating system, data, and programs all reside. It is recommended, however, to create multiple partitions or use multiple hard drives with the operating system stored on one partition and with the rest of the partitions and/or drives allocated to applications and data. If possible, a separate partition for the paging file should be made, contained on a disk not including the operating system although this does mean neither disk is likely to power down. With a little bit of pre-partitioning work, it is easy to achieve a condition where the operating system is not stored on C and the C drive does not even exist. This may have the advantage that certain poorly designed viruses and trojans will not be able to overwrite key system files or take over the system. The "My Documents" folder, a "special folder" ], can be mounted to take up the entire free space on a separate partition. | |||
* ] | |||
* ] | |||
* ] | |||
* ] | |||
* ] covers the partition table layout | |||
* ] | |||
* ] | |||
* ] | |||
== References == | |||
{{Reflist|refs= | |||
<ref name="ref1">As used by DEC ] circa 1984, see: {{cite web |url=http://www.bitsavers.org/pdf/dec/pdp11/rt11/v5.1_Jul84/AA-5286F-TC-T1_RT-11_System_Release_Notes_Jul84.pdf |title=RT-11 System Release Notes |id=AA-5826F-TC |publisher=] |date=December 1983}}</ref> | |||
<ref name="ref2">As used in IBM ] beginning 1966 see: {{cite web |url=https://techchannel.com/Enterprise/02/2017/virtualization-past-current |title=Virtualization's Past Helps Explain Its Current Importance |last=Rogers |first=Bob |date=February 6, 2017 |publisher=TechChannel |access-date=February 9, 2022 |quote=A minidisk is only part of a physical disk but appears to be a separate disk to the guest. |archive-date=December 4, 2021 |archive-url=https://web.archive.org/web/20211204110249/https://techchannel.com/Enterprise/02/2017/virtualization-past-current |url-status=live }}</ref> | |||
<ref name="IBMJRD">{{cite journal | journal = ] | issn = 0018-8646 | volume = 25 | number = 5 | pages = 483–490 | date = September 1981 | title = The Origin of the VM/370 Time-Sharing System | author = R. J. Creasy | doi = 10.1147/rd.255.0483 | url = https://pages.cs.wisc.edu/~stjones/proj/vm_reading/ibmrd2505M.pdf | access-date = February 10, 2022 | archive-date = March 7, 2022 | archive-url = https://web.archive.org/web/20220307214234/https://pages.cs.wisc.edu/~stjones/proj/vm_reading/ibmrd2505M.pdf | url-status = live }}</ref> | |||
<ref name="ref3" >The ] man page for the RP-11/RP03 device and driver {{man|4|rp|v6}} - speaks of the disk being divided into ''portions'', ''pseudo-disks'' and ''sections''.</ref> | |||
<ref name="ref4" >The 1993 ] 2.2 installation guide - {{cite web |url=http://bitsavers.org/pdf/sun/solaris/2.2/801-4048-10A_Solaris_2.2_Basic_Installation_Guide_199305.pdf |title=Solaris 2.2 Basic Installation Guide |archive-url=https://web.archive.org/web/20220404192915/http://bitsavers.org/pdf/sun/solaris/2.2/801-4048-10A_Solaris_2.2_Basic_Installation_Guide_199305.pdf |archive-date=2022-04-04 |url-status=live}} - 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.</ref> | |||
<ref name="ref5" >The 1980 Corvus Guide - {{cite web |url=http://bitsavers.org/pdf/corvus/constellation_II/7100-06111-02_Constellation_II_Generation_Guide_Apple_II_Apr1984.pdf |title=Constellation II Generation Guide, Apple II |archive-url=https://web.archive.org/web/20220212213724/http://bitsavers.trailing-edge.com/pdf/corvus/constellation_II/7100-06111-02_Constellation_II_Generation_Guide_Apple_II_Apr1984.pdf |archive-date=2022-02-12 |url-status=live}} - for Apple II installations allows division of a hard disk drive into ''virtual drives''.</ref> | |||
}} | |||
== Further reading == | |||
For ]-based and UNIX-like operating systems such as ], fancy partitioning creates separate partitions for /, /boot, /home, /tmp, /usr, /var, /opt and ]. This ensures that if one ] gets corrupted, the rest of the data (the other file systems) stay intact, minimizing data loss. This has the disadvantage of subdividing the drive into small, fixed-size partitions, so, for instance, a user can fill up their /home partition and run out of useable hard drive space, even though other partitions still have plenty of free space. A good implementation requires the user to predict how much space each partition will need; sometimes a difficult task. Typical desktop systems use the other convention; a "/" (]) partition containing the entire filesystem and a separate ]. A /home partition is useful for desktop uses as it allows a clean reinstall (or a fresh install of another ]) while leaving data intact. | |||
* {{cite web|url=http://www.adaos.net/aodps/aodps.html|title=The Alt-OS-Development Partition Specification (AODPS)|date=2002-11-02|author1=Stéphane Martineau|author2=Jens Olsson|author3=Nick Roberts|version=0.4|archive-url=https://web.archive.org/web/20040213032108/http://www.adaos.net/aodps/aodps.html|archive-date=2004-02-13|url-status=unfit}} | |||
* {{cite web|url=http://www.win.tue.nl/~aeb/partitions/partition_types-1.html|author=Andries Brouwer|author-link=Andries Brouwer|title=List of partition identifiers for PCs|date=1995–2004}} | |||
* {{cite web|url=http://www.win.tue.nl/~aeb/partitions/partition_tables.html|title=Minimal Partition Table Specification|date=1999-09-16|author=Andries Brouwer}} | |||
* {{cite web|url=http://www.ranish.com/part/primer.htm|title=partitioning primer|date=1998-08-05|publisher=Ranish|access-date=2004-08-15|archive-url=https://web.archive.org/web/20040804224215/http://www.ranish.com/part/primer.htm|archive-date=2004-08-04|url-status=dead}} | |||
* {{cite web|url=http://www.allensmith.net/Storage/HDDlimit/Address.htm|title=ATA (EIDE) Drive Capacity and Addressing|author=Allen Smith|access-date=2005-10-15|archive-date=2006-02-08|archive-url=https://web.archive.org/web/20060208183118/http://www.allensmith.net/Storage/HDDlimit/Address.htm|url-status=dead}} | |||
* {{cite web|url=http://www.microsoft.com/whdc/device/storage/GPT-on-x64.mspx|author=Microsoft|date=2005-06-03|title=Using GPT Drives|website=] |archive-url=https://web.archive.org/web/20050706074131/http://www.microsoft.com/whdc/device/storage/GPT-on-x64.mspx|archive-date=2005-07-06}} | |||
* {{Cite web|title=What are system partition and boot partition?|url=https://www.easyuefi.com/wintousb/faq/en-US/What-are-system-partitions-and-boot-partitions.html|access-date=2021-12-07|website=www.easyuefi.com}} | |||
{{Authority control}} | |||
== List of partition utilities == | |||
* ], ], and ] | |||
* Symantec's ] | |||
* Mandriva's ] | |||
* Acronis' ] | |||
* TeraByte Unlimited's ] | |||
* Microsoft's ] and ] | |||
* DIY DataRecovery's ] | |||
* ] | |||
* ] | |||
* VCOM's ] | |||
* Paragon Software's ] | |||
* Maxtor's ] for Maxtor Disks | |||
* Western Digital's ] for Western Digital disks | |||
* Seagate's ] for Seagate Disks | |||
{{DEFAULTSORT:Disk Partitioning}} | |||
== See also == | |||
] | |||
* ] | |||
] | |||
* ] | |||
* ] | |||
* ] | |||
==External links== | |||
* | |||
* . | |||
* | |||
* | |||
* | |||
* http://tldp.org/HOWTO/Partition/index.html | |||
* | |||
* | |||
* | |||
* | |||
* | |||
* | |||
] | |||
] | ] | ||
] | |||
] | |||
] | |||
] | |||
] | |||
] | |||
] | |||
] | |||
] | |||
---- |
Latest revision as of 08:57, 22 December 2024
Creation of separate accessible storage areas on a secondary computer storage deviceDisk partitioning or disk slicing is the creation of one or more regions on secondary storage, so that each region can be managed separately. 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. 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.
History
IBM in its 1983 release of PC DOS version 2.0 was an early if not first use of the term partition to describe dividing a block storage device such as an HDD into physical segments. The term's usage is now ubiquitous. Other terms used include logical disk, minidisk, portions, pseudo-disk, section, slice and virtual drive.
One of the earliest such segmentation of a disk drive was IBM's 1966 usage in its CP-67 operating system of minidisk as a separate segment of a hard disk drive.
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, XP, Vista, and Windows 7 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
Main article: Multi-bootMulti-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
Main article: GUID Partition TableThe GUID Partition Table (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.
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 10, contain intrinsic disk compression capability. The use of separate disk compression utilities has declined sharply.
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. 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), or BSD disklabel.
PC partition types
MBR
See also: Partition typeThis 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. 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
Further information: Partition typeA 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
Further information: Extended boot recordAn 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 partitionBIOS 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.
EFI system partition
EFI system partition is the same as BIOS BP, but is loaded by EFI firmware instead of BIOS.
See also
- 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
- Calkins, Bill (2013). Oracle Solaris 11 System Administration. Archived from the original on 2016-03-07. Retrieved 2016-03-04.
- Levi, Bozidar (2002). UNIX Administration.
- Ward, Brian (2004). How Linux Works: What Every SuperUser Should Know. No Starch Press. p. 39. ISBN 9781593270353.
- As used by DEC RT-11 circa 1984, see: "RT-11 System Release Notes" (PDF). Digital Equipment Corporation. December 1983. AA-5826F-TC.
- ^ As used in IBM CP-67 beginning 1966 see: Rogers, Bob (February 6, 2017). "Virtualization's Past Helps Explain Its Current Importance". TechChannel. Archived from the original on December 4, 2021. Retrieved February 9, 2022.
A minidisk is only part of a physical disk but appears to be a separate disk to the guest.
- ^ The Version 6 Unix man page for the RP-11/RP03 device and driver
rp(4)
– Version 6 Unix Programmer's Manual - speaks of the disk being divided into portions, pseudo-disks and sections. - The 1993 Solaris 2.2 installation guide - "Solaris 2.2 Basic Installation Guide" (PDF). Archived (PDF) from the original on 2022-04-04. - 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.
- The 1980 Corvus Guide - "Constellation II Generation Guide, Apple II" (PDF). Archived (PDF) from the original on 2022-02-12. - for Apple II installations allows division of a hard disk drive into virtual drives.
- R. J. Creasy (September 1981). "The Origin of the VM/370 Time-Sharing System" (PDF). IBM Journal of Research and Development. 25 (5): 483–490. doi:10.1147/rd.255.0483. ISSN 0018-8646. Archived (PDF) from the original on March 7, 2022. Retrieved February 10, 2022.
- windows-driver-content. "BIOS/MBR-based hard drive partitions". docs.microsoft.com. Archived from the original on 2021-07-25. Retrieved 2021-12-06.
- Frisch, AEleen (2002). Essential System Administration: Tools and Techniques for Linux and Unix Administration. O'Reilly Media, Inc. p. 86. ISBN 9780596004491.
- 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. - "About Disk Labels". System Administration Guide, Volume 1. Archived from the original on 2007-02-28. Retrieved 2010-04-03. (NB. The Solaris documentation on disklabels uses the term "partition table".)
- ^ "What are system partition and boot partition?". www.easyuefi.com. Archived from the original on 2018-07-16. Retrieved 2021-12-07.
- ^ 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
- Stéphane Martineau; Jens Olsson; Nick Roberts (2002-11-02). "The Alt-OS-Development Partition Specification (AODPS)". 0.4. Archived from the original on 2004-02-13.
- Andries Brouwer (1995–2004). "List of partition identifiers for PCs".
- Andries Brouwer (1999-09-16). "Minimal Partition Table Specification".
- "partitioning primer". Ranish. 1998-08-05. Archived from the original on 2004-08-04. Retrieved 2004-08-15.
- Allen Smith. "ATA (EIDE) Drive Capacity and Addressing". Archived from the original on 2006-02-08. Retrieved 2005-10-15.
- Microsoft (2005-06-03). "Using GPT Drives". Microsoft. Archived from the original on 2005-07-06.
- "What are system partition and boot partition?". www.easyuefi.com. Retrieved 2021-12-07.