13
Disk partitioning From Wikipedia, the free encyclopedia This article needs additional citations for verification. Please help improve this article by adding reliable references . Unsourced material may be challenged and removed.(September 2010) GParted is a popular utility used for 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 and Solaris. A partition editor software program can be used to create, resize, delete, and manipulate these partitions on the hard disk. Contents  [hide ] 1 Benefits of multipl e partitions 2 PC part iti on type s 2.1 Primary partiti on 2.2 Extended partit ion 3 Partiti oning schemes 3.1 DOS, Windows , and OS/2 3.2 Unix, Linux and Mac OS X 3.3 Multi-boot and mixed-bo ot systems 4 Part ition recovery

Disk partitioning

Embed Size (px)

Citation preview

8/8/2019 Disk partitioning

http://slidepdf.com/reader/full/disk-partitioning 1/13

Disk partitioningFrom Wikipedia, the free encyclopedia

This article needs additional citations for verification .Please help improve this article by adding reliable references . Unsourced materialmay be challenged and removed .(September 2010)

GParted is a popular utility used for disk partitioning

Disk partitioning is the act of dividing ahard disk driveinto multiple logical storageunits 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 and Solaris. Apartition editor software program can be used to create, resize, delete, and manipulatethese partitions on the hard disk.

Contents

[hide ]

• 1 Benefits of multiple partitions

• 2 PC partition types

○ 2.1 Primary partition

○ 2.2 Extended partition

• 3 Partitioning schemes

○ 3.1 DOS, Windows, and OS/2

○ 3.2 Unix, Linux and Mac OS

X

○ 3.3 Multi-boot and mixed-boot

systems

• 4 Partition recovery

8/8/2019 Disk partitioning

http://slidepdf.com/reader/full/disk-partitioning 2/13

• 5 Compressed disks

• 6 See also

• 7 References

• 8 Further reading

• 9 External links

[edit]Benefits of multiple partitionsCreating more than one partition has the following advantages:

Separation of the operating system (OS) and program filesfrom user files. This allowsimage backups (or clones) to be

made of only the operating system and installed software.Having an area for operating system virtualmemory swapping/paging.

Keeping frequently used programs and data near each other.

Having cache and log files separate from other files. Thesecan change size dynamically and rapidly, potentially makinga file system full.

Use of multi-bootsetups, which allow users to have morethan one operating system on a single computer. For example, one could installLinux, Mac OS X,MicrosoftWindows or others on different partitions of the same harddisk and have a choice of booting into any compatibleoperating system at power-up.

Protecting or isolating files, to make it easier to recover acorrupted file system or operating system installation. If one

partition is corrupted, none of the other file systems areaffected, and the drive's data may still be salvageable.Having a separate partition for read-only data also reducesthe chances of the file system on this partition becomingcorrupted.

Raising overall computer performance on systems wheresmaller file systems are more efficient. For instance, largehard drives with only oneNTFS file system typically have a

very large sequentially accessed Master File Table (MFT)

8/8/2019 Disk partitioning

http://slidepdf.com/reader/full/disk-partitioning 3/13

and it generally takes more time to read this MFT than thesmaller MFTs of smaller partitions.

"Short Stroking", which aims to minimize performance-eating

head repositioning delays by reducing the number of tracksused per hard drive.[1] The basic idea is that you make onepartition approx. 20-25% of the total size of the drive. Thispartition is expected to: occupy the outer tracks of the harddrive, and offer more than double the throughput — less thanhalf the access time. If you limit capacity with short stroking,the minimum throughput stays much closer to the maximum.

For example a 1 TB disk might have an access time of

12 ms at 200 IOPS (at a limited queue depth) with anaverage throughput of 100 MB/s. When it ispartitioned to 100 GB (and the rest left unallocated)you might end up with an access time of 6 ms at 300IOPS (with a bigger queue depth) with an averagethroughput of 200 MB/s..

[edit]PC partition typesThis section describes the master boot record (MBR)

partitioning scheme, as used in DOS, MicrosoftWindows and Linuxon PC compatible computer systems.For examples of partitioning schemes used in other operating systems, see GUID Partition Table, Slice (disk),or BSD disklabel.

The total data storage space of a PC hard disk can bedivided into at most four primary partitions , or alternativelythree primary partitions and an "extended partition ". Thesepartitions are described by 16-byte entries that constitutethe Partition Table , located in the master boot record.

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

8/8/2019 Disk partitioning

http://slidepdf.com/reader/full/disk-partitioning 4/13

Once a specific partition'stype has been identified,additional information about its purpose and probablecontents may be found (see: list of partition types). For example, some partition type codes are used to hide apartition's contents from various operating systems.However, if an OS or some partitioning tool has beenprogrammed to also examine the boot sectors of anypartition, then its file system may no longer remain hidden.(Note: There are no officially assigned partition types; thus,more than one kind of file system maylay claim to the samecode value.) Additionally, partition types and boot indicatorscan be easily modified using applications such

as MBRWizardif required.[edit]Primary partition

A primary partition contains one file system. InDOS andearlier versions of Microsoft Windowssystems, the systempartition was required to be the first partition. Windowsoperating systems must be located in a primary partition.Other operating systems do not have this peculiar requirement. However, other factors, such as aPC's BIOS(see Boot sequence on standard PC ) may alsoimpart specific requirements as to which partition mustcontain the primary OS.

The partition typecode 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 filesystem) or indicate that the partition has a special use (e.g.code 0x82 usually indicates a Linuxswap partition).The FAT16 and FAT32 file systems have made use of anumber of partition type codes due to the limits of variousDOS and Windows OS versions. Though a Linux operatingsystem may recognize a number of different file systems(ext4, ext3, ext2, ReiserFS , etc.), they have all consistentlyused the same partition type code: 0x83 (Linux native filesystem).

[edit]Extended partition

8/8/2019 Disk partitioning

http://slidepdf.com/reader/full/disk-partitioning 5/13

A hard disk may contain only one extended partition; theextended partition can be subdivided into multiplelogical

partitions . In DOS/Windows systems, each logical partitionmay then be assigned an additional drive letter. Linuxoperating systems can be installed into (and run from)logical partitions, whereas Windows operating systems arerestricted to primary partitions.

See extended boot record for information on the structure of an extended partition.

[edit]Partitioning schemes[edit]DOS, Windows, and OS/2

With DOS,Microsoft Windows, and OS/2, a commonpractice is to use one primary partition for the activefilesystem that will contain the operating system, thepage/swap file, and 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 hard disk that may or may not bevisible as drives, such as recovery partitions or partitionswith diagnostic tools or data. (Microsoft drive letters do notcorrespond to partitions in a one-to-one fashion, so theremay be more or less drive letters than partitions.)

Proponents of multiple partitions assert that a benefit of having multiple partitions is the ability to store data files on apartition separate from one containing the system files. If the system partition then become corrupted for any reason,irreplaceable user files stored on the independent partitionwould be able to be more easily retrieved (or recovered),not having been corrupted along with the system files.Another operating system (loaded from a LiveCD or USB,for example) could access the files on the (presumably)uncorrupted independent data partition without having toworry about the corrupted system partition at all.

Further, when data files are kept in a separate partition, if anoperating system needs to be re-installed / restored (due tomalware infiltration, for example), this can be done without

8/8/2019 Disk partitioning

http://slidepdf.com/reader/full/disk-partitioning 6/13

risking damage to the data files (that in a single-partitionsystem are stored along with the operating system files).

Windows 2000, Windows XP, Windows Vista, and Windows

7 include an inbuilt 'Disk Management' program whichallows for the creation, deletion and movement of Windows(but not other types of) partitions. The Windows 7/Vista DiskManager is not compatiblewith Windows 2000 or XP, nor,for the most part, other operating systems.

Other examples of partition management programs for Windows are Acronis Disk Director , Norton Ghost,and Perfect Disk. In some instances specialized recovery

programs are supplied with retail consumer computers.[edit]Unix, Linux and Mac OS X

On Unix-based and Unix-likeoperating systems suchas Linuxand Mac OS X, it is possible to use multiplepartitions on a disk device. Each partition can be used for a file systemor as a swap partition.

Multiple partitions also allow directories suchas /tmp, /usr , /var , or home directoryspace to be allocatedtheir own file system. Such a scheme has a number of potential advantages:

If one file system gets corrupted, the data outside thatfilesystem/partition stay intact, minimizing data loss.

Specific file systems can be mounted read-only, or withthe execution of setuid files disabled (thus enhancingsecurity).

Performance may be enhanced due to less disk headtravel.

A program which produces too much output (such as asystem logging daemon) fills up only a single filesystem,therefore does not fill up more critical filesystems. (Oftensystems will not function correctly if / or /tmp fills up.)

However, the disadvantage of subdividing the drive intofixed-size partitions is that a file system in one partition may

8/8/2019 Disk partitioning

http://slidepdf.com/reader/full/disk-partitioning 7/13

become full, even though other file systems still have plentyof usable space.

A good partitioning scheme requires the user to predict how

much space each partition will need, which may be adifficult task; especially for new users. Logical volumemanagement (LVM), often used in servers, increasesflexibility by allowing data in volumes to expand intoseparate physical disks (which can be added whenneeded). Another option is to resize existing partitions whennecessary. LVM allows this easily by resizing (shrinking) afilesystem, reducing the size of the logical volumecontaining that filesystem, allocating that freed space toanother logical volume, and expanding (resizing) this other filesystem.

Typical Linux desktop systems use two partitions: oneholding a file system mounted on "/" (theroot directory) anda swap partition. (However, an almost unlimited number of partitions can be accommodated by Linux operatingsystems.)

By default, Mac OS X systems also use a single partition for the entire filesystem, but use a swap fileinside the filesystem (like Windows) rather than a swap partition.

[edit]Multi-boot and mixed-boot systemsMain article: Multi-boot

AGRUBstartup menu showing Ubuntu Linux (with threedifferent boot modes) and Windows Vista options

8/8/2019 Disk partitioning

http://slidepdf.com/reader/full/disk-partitioning 8/13

Multi-boot systems are computers where the user can bootinto one of two or more distinct operating systems (OS)stored in separate partitions on a hard drive. In suchsystems, a menu at startup gives a choice of which OS toboot/start (and only one OS at a time is loaded).

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

Multi-boot systems are typically mixed-boot systems,

withdifferent OSes installed, although multiple copies of the same OS can be installed for safety, testing, andredundancy. A mixture of Windows,Mac OSX (facilitated bythe switch to the x86 processor architecture), and LinuxOSs (such as Ubuntu) on the same computer can thereforebe accommodated.

Multi-boot systems require multiple partitions on the harddisk. Each OS requires one or more special types of

partitions whose file systemmay or may not be compatiblewith the those of other OSs on the hard disk. Tools tomanipulate different types of filesystems may be specific for that type of filesystem. In general, Windows-basedfilesystem and partition tools have historically been used tomanipulate partitions with Windows filesystems but notLinux or Mac OS X partitions. Linux-based partitionmanagers can often (but not always) manage bothLinux/Mac OS X and Windows partitions.

A particular problem of multi-boot systems is the mutualincompatibility between thebootloaders of differentoperating systems, which may compete with each other andindependently overwrite important settings.

When most computers boot up, an MBRis referenced bythe BIOS. This record indicates the partition in which thebootloader to be initially run is located. Each operating

system usually attempts to change the MBR so that it pointsto the partition of the particular bootloader program installed

8/8/2019 Disk partitioning

http://slidepdf.com/reader/full/disk-partitioning 9/13

by that OS. In other words, when Windows loads, it changesthe MBR to point to the Windows partition in which theWindows bootloader is stored. When Mac OS X loads, itchanges the MBR to point to the Mac OS X partition inwhich the Mac OS X bootloader is stored. When a Linux OSis loaded, it changes the MBR to point to the Linux partitionin which the Linux OS bootloader (Grub) is stored.

Although all modern OSs include bootloaders that claim tobe able to load other OSs as well as the primary OS, inpractice this is not guaranteed. Subtle differences in filesystems and ongoing changes to the various operatingsystems can eventually make the bootloaders of each OSunable to recognize the file systems of the competing OSs(and therefore prevent correct bootloading). One or moreOSs may then appear to be "unbootable" on that computer.To rectify this, a new bootloader must be installed andconfigured and the MBR reset to point to the newbootloader.

A popular way to circumvent this problem is to install asmall, independent "boot" partition (must be a primarypartition) in which one specific bootloader is permanentlystored. The MBR is then permanently set to always refer tothe partition of this primary bootloader (and is never allowedto be changed or to refer to the partition of any other bootloader). This primary bootloader (in the boot partition)loads no OS directly. It merely presents a menu of operatingsystem choices, and when one is chosen, its only function isto chainload the particular secondary bootloader of whichever OS is selected. Each secondary bootloader resides in the partition of the OS to which it belongs, andis only used to load its native OS (not any other OS). Byutilizing this scheme, incompatibilities between differentbootloaders, file systems and operating systems areavoided.[2]

[edit]Partition recovery

When a partition is deleted, in general, only its partitiontable entry is removed from a table; and although the data

8/8/2019 Disk partitioning

http://slidepdf.com/reader/full/disk-partitioning 10/13

are no longer accessible, some still remain on the disk untilbeing overwritten.Specialized recovery utilities, (suchas TestDisk and gpart), can locate lost file systems andrecreate a partition table which includes entries for theserecovered file systems. However, some disk utilities mayalso overwrite a number of beginning sectors of a partitionthey delete. For example, if Windows Disk Management(Windows 2000/XP, etc.) is used to delete a partition, it willoverwrite the first sector (relative sector 0) of the partitionbefore removing it. It may be possible to restorea FAT32 or NTFS partition if a backup boot sector isavailable.

[edit]Compressed disksHard disks can be compressed to create additional space.In DOS and early Microsoft Windows, programs suchas Stacker (DR-DOS except 6), SuperStor (DR-DOS6), DoubleSpace, or DriveSpace (Windows 95) were used.This compression was done by creating a very large file onthe partition, then storing the disk's data in this file. At

startup, device drivers opened this file and assigned it aseparate letter. Frequently, to avoid confusion, the originalpartition and the compressed drive had their lettersswapped, so that the compressed disk is C:, and theuncompressed area (often containing system files) is givena higher name. (SuperStor required a separate device driver to be loaded, DEVSWAP.COM).

Versions of Windows using the NT kernel, including the

most recent versions, XP and Vista, contain intrinsic diskcompression capability. The use of separate diskcompression utilities has declined sharply.

[edit]See also

The Wikibook Guide toUnixhas a page on thetopic of

Partitioning Disks

Apple Partition Map

8/8/2019 Disk partitioning

http://slidepdf.com/reader/full/disk-partitioning 11/13

Boot Camp

Booting

BSD disklabel

Slice (disk)Disk formatting

Extended boot record

File system

fstab

GUID Partition Table

ISO image

List of disk partitioning software

Logical volume management

Master boot record

RawWrite for Windows

ROM image

Volume (computing)

[edit]References1. ^ Accelerate Your Hard Drive By Short Stroking

2. ^ Ubuntuguide -- Multiple OS installation[edit]Further reading

Stéphane Martineau, Jens Olsson, Nick Roberts (2002-11-02). The Alt-OS-Development Partition Specification

(AODPS) . 0.4.

AndriesBrouwer (1995–2004). List of partition identifiers

for PCs .

AndriesBrouwer (1999-09-16).Minimal Partition Table

Specification .

partitioning primer . Ranish. 1998-08-05.

Allen Smith. ATA (EIDE) Drive Capacity and Addressing .

Microsoft (2005-06-03).Using GPT Drives .

Microsoft.KB69912: MS-DOS Partitioning Summary

8/8/2019 Disk partitioning

http://slidepdf.com/reader/full/disk-partitioning 12/13

[edit]External linksFDISK and FORMAT instructions for any harddrive Simple partition instructions.

Linux Partition HOWTO

Partition Definition- by The Linux Information Project(LINFO)

Multiple OS Installation in multiple partitions-- guide tousing chainloadedbootloaders to enable multiple OSs tocoexist

Partition Types

Properties of partition tablesList of partition tables file system codes.

Guide with advantages and disadvantages to diskpartitioning

Categories : Disk file systems| DOS on IBM PCcompatibles | IBM PC compatibles

• New features•

Log in / create account • Article• Discussion• Read• Edit • View history

Top of Form

Bottom of Form

• Main page•

Contents• Featured content • Current events• Random article• Donate

Interaction• About Wikipedia• Community portal • Recent changes• Contact Wikipedia• Help

Toolbox

8/8/2019 Disk partitioning

http://slidepdf.com/reader/full/disk-partitioning 13/13

Print/export

Languages• Česky• Deutsch• Ελληνικά• Español • Euskara• Français• • Bahasa Indonesia• Italiano• Magyar • Nederlands• • Norsk (bokmål)• Polski • Português• Русский• Simple English• Slovenčina• Suomi • Svenska• Türkçe•

• This page was last modified on 17 October 2010 at 10:04.• Text is available under the Creative Commons Attribution-ShareAlike

License; additional terms may apply. See Terms of Use for details.Wikipedia® is a registered trademark of theWikimedia Foundation,Inc., a non-profit organization.

• Contact us

• Privacy policy

• About Wikipedia

• Disclaimers