Developer(s) | Robert Baron, IBM, Microsoft, Digital Research, Datalight, Novell, Brian E. Reifsnyder |
---|---|
Initial release | 1983, 40–41 years ago |
Operating system | MS-DOS, PC DOS, FlexOS, SISNE plus, OS/2, eComStation, ArcaOS, Windows, DR DOS, ROM-DOS, FreeDOS, PTS-DOS, *BSD, [1] SysV |
Type | Command |
License | MS-DOS, PC DOS, FlexOS, OS/2, Windows, DR DOS, ROM-DOS, PTS-DOS: Proprietary commercial software FreeDOS: GNU GPLv2 |
fdisk is a command-line utility for disk partitioning. It has been part of DOS, DR FlexOS, IBM OS/2, and early versions of Microsoft Windows, as well as certain ports of FreeBSD, [2] NetBSD, [3] OpenBSD, [4] DragonFly BSD [5] and macOS [6] for compatibility reasons. Windows 2000 and its successors have replaced fdisk
with a more advanced tool called diskpart
.
IBM introduced the first version of fdisk
(officially dubbed "Fixed Disk Setup Program") in March 1983, with the release of the IBM PC/XT computer (the first PC to store data on a hard disk) and the IBM PC DOS 2.0 operating system. fdisk
version 1.0 can create one FAT12 partition, delete it, change the active partition, or display partition data. fdisk
writes the master boot record, which supports up to four partitions. The other three were intended for other operating systems such as CP/M-86 and Xenix, which were expected to have their own partitioning utilities.
Microsoft first added fdisk
to MS-DOS in version 3.2. [7] MS-DOS versions 2.0 through 3.10 included OEM-specific partitioning tools, which may have been named fdisk
.
PC DOS 3.0, released in August 1984, added support for FAT16 partitions to handle larger hard disks more efficiently. PC DOS 3.30, released in April 1987, added support for extended partitions. (These partitions do not store data directly but can contain up to 23 logical drives.) In both cases, fdisk
was modified to work with FAT16 and extended partitions. Support for FAT16B was first added to Compaq's fdisk
in MS-DOS 3.31. FAT16B later became available with MS-DOS and PC DOS 4.0.
The undocumented /mbr
switch in fdisk
, which could repair the master boot record, soon became popular.
IBM PC DOS 7.10 shipped with the new fdisk32
utility.
ROM-DOS, [8] DR DOS 6.0 [9] FlexOS, [10] PTS-DOS 2000 Pro, [11] and FreeDOS, [12] include an implementation of the fdisk
command.
Windows 95, Windows 98, and Windows ME shipped with a derivative of the MS-DOS fdisk
. Windows 2000 and its successors, however, came with the more advanced diskpart
and the graphical Disk Management utilities.
Starting with Windows 95 OSR2, fdisk
supports the FAT32 file system. [13]
The version of fdisk
that ships with Windows 95 does not report the correct size of a hard disk that is larger than 64 GB. An updated fdisk
is available from Microsoft to correct this issue. [14] In addition, fdisk
cannot create partitions larger than 512 GB, even though FAT32 supports partitions as big as 2 TB. This limitation applies to all versions of fdisk
supplied with Windows 95 OSR 2.1, Windows 98 and Windows ME.
Before version 4.0, OS/2 shipped with two partition table managers. These were the text mode fdisk [15] and the graphical fdiskpm. [16] The two have identical functionality, and can manipulate both FAT partitions and the more advanced HPFS partitions.
OS/2 4.5 and higher (including eComStation and ArcaOS) can use the JFS file system, as well as FAT and HPFS. They replaced fdisk
with the Logical Volume Manager (LVM).
fdisk
for Mach Operating System was written by Robert Baron. It was ported to 386BSD by Julian Elischer, [17] and the implementation is being used by FreeBSD, [2] NetBSD [3] and DragonFly BSD, [5] all as of 2019, as well as the early versions of OpenBSD between 1995 and 1997 before OpenBSD 2.2. [1]
Tobias Weingartner re-wrote fdisk
in 1997 before OpenBSD 2.2, [4] which has subsequently been forked by Apple Computer, Inc in 2002, and is still used as the basis for fdisk
on macOS as of 2019. [6]
For native partitions, BSD systems traditionally use BSD disklabel, and fdisk
partitioning is supported only on certain architectures (for compatibility reasons) and only in addition to the BSD disklabel (which is mandatory).
In Linux, fdisk
is a part of a standard package distributed by the Linux Kernel organization, util-linux
. The original program was written by Andries E. Brouwer and A. V. Le Blanc and was later rewritten by Karel Zak and Davidlohr Bueso when they forked the util-linux
package in 2006. An alternative, ncurses-based program, cfdisk, allows users to create partition layouts via a text-based user interface (TUI). [18]
File Allocation Table (FAT) is a file system developed for personal computers and was the default filesystem for the MS-DOS and Windows 9x operating systems. Originally developed in 1977 for use on floppy disks, it was adapted for use on hard disks and other devices. The increase in disk drive capacity over time drove modifications to the design that resulted in versions: FAT12, FAT16, FAT32, and exFAT. FAT was replaced with NTFS as the default file system on Microsoft operating systems starting with Windows XP. Nevertheless, FAT continues to be commonly used on relatively small capacity solid-state storage technologies such as SD card, MultiMediaCard (MMC) and eMMC because of its compatibility and ease of implementation.
Disk 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.
A boot sector is the sector of a persistent data storage device which contains machine code to be loaded into random-access memory (RAM) and then executed by a computer system's built-in firmware.
Disk formatting is the process of preparing a data storage device such as a hard disk drive, solid-state drive, floppy disk, memory card or USB flash drive for initial use. In some cases, the formatting operation may also create one or more new file systems. The first part of the formatting process that performs basic medium preparation is often referred to as "low-level formatting". Partitioning is the common term for the second part of the process, dividing the device into several sub-devices and, in some cases, writing information to the device allowing an operating system to be booted from it. The third part of the process, usually termed "high-level formatting" most often refers to the process of generating a new file system. In some operating systems all or parts of these three processes can be combined or repeated at different levels and the term "format" is understood to mean an operation in which a new disk medium is fully prepared to store files. Some formatting utilities allow distinguishing between a quick format, which does not erase all existing data and a long option that does erase all existing data.
Multi-booting is the act of installing multiple operating systems on a single computer, and being able to choose which one to boot. The term dual-booting refers to the common configuration of specifically two operating systems. Multi-booting may require a custom boot loader.
The GUID Partition Table (GPT) is a standard for the layout of partition tables of a physical computer storage device, such as a hard disk drive or solid-state drive, using universally unique identifiers (UUIDs), which are also known as globally unique identifiers (GUIDs). Forming a part of the Unified Extensible Firmware Interface (UEFI) standard, it is nevertheless also used for some BIOSs, because of the limitations of master boot record (MBR) partition tables, which use 32 bits for logical block addressing (LBA) of traditional 512-byte disk sectors.
In computing, sleep is a command in Unix, Unix-like and other operating systems that suspends program execution for a specified time.
An extended boot record (EBR), or extended partition boot record (EPBR), is a descriptor for a logical partition under the common DOS disk drive partitioning system. In that system, when one partition record entry in the master boot record (MBR) is designated an extended partition, then that partition can be subdivided into a number of logical partitions. The actual structure of that extended partition is described by one or more EBRs, which are located inside the extended partition. The first EBR will always be located on the first sector of the extended partition.
TestDisk is a free and open-source data recovery utility that helps users recover lost partitions or repair corrupted filesystems. TestDisk can collect detailed information about a corrupted drive, which can then be sent to a technician for further analysis. TestDisk supports DOS, Microsoft Windows, Linux, FreeBSD, NetBSD, OpenBSD, SunOS, and MacOS. TestDisk handles non-partitioned and partitioned media. In particular, it recognizes the GUID Partition Table (GPT), Apple partition map, PC/Intel BIOS partition tables, Sun Solaris slice and Xbox fixed partitioning scheme. TestDisk uses a command line user interface. TestDisk can recover deleted files with 97% accuracy.
In BSD-derived computer operating systems and in related operating systems such as SunOS, a disklabel is a record stored on a data storage device such as a hard disk that contains information about the location of the partitions on the disk. Disklabels were introduced in the 4.3BSD-Tahoe release. Disklabels are usually edited using the disklabel utility. In later versions of FreeBSD, this was renamed as bsdlabel, and finally deprecated since 15.0.
The partition type in a partition's entry in the partition table inside a master boot record (MBR) is a byte value intended to specify the file system the partition contains or to flag special access methods used to access these partitions.
gpart is a software utility which scans a storage device, examining the data in order to detect partitions which may exist but are absent from the disk's partition tables. Gpart was written by Michail Brzitwa of Germany. The release on the author's website is now older than the releases some distributions are using. It appears that Michail Brzitwa does not actively maintain the code, instead the various distributions appear to maintain their own versions.
In Unix-like operating systems, a device file, device node, or special file is an interface to a device driver that appears in a file system as if it were an ordinary file. There are also special files in DOS, OS/2, and Windows. These special files allow an application program to interact with a device by using its device driver via standard input/output system calls. Using standard system calls simplifies many programming tasks, and leads to consistent user-space I/O mechanisms regardless of device features and functions.
In computing, format
is a command-line utility that carries out disk formatting. It is a component of various operating systems, including 86-DOS, MS-DOS, IBM PC DOS and OS/2, Microsoft Windows and ReactOS.
MS-DOS is an operating system for x86-based personal computers mostly developed by Microsoft. Collectively, MS-DOS, its rebranding as IBM PC DOS, and a few operating systems attempting to be compatible with MS-DOS, are sometimes referred to as "DOS". MS-DOS was the main operating system for IBM PC compatibles during the 1980s, from which point it was gradually superseded by operating systems offering a graphical user interface (GUI), in various generations of the graphical Microsoft Windows operating system.
DOS is a family of disk-based operating systems for IBM PC compatible computers. The DOS family primarily consists of IBM PC DOS and a rebranded version, Microsoft's MS-DOS, both of which were introduced in 1981. Later compatible systems from other manufacturers include DR-DOS (1988), ROM-DOS (1989), PTS-DOS (1993), and FreeDOS (1994). MS-DOS dominated the IBM PC compatible market between 1981 and 1995.
A master boot record (MBR) is a type of boot sector in the first block of partitioned computer mass storage devices like fixed disks or removable drives intended for use with IBM PC-compatible systems and beyond. The concept of MBRs was publicly introduced in 1983 with PC DOS 2.0.
sfdisk is a Linux partition editor. In contrast to fdisk and cfdisk, sfdisk is not interactive. All three programs are written in C and are part of the util-linux package of Linux utility programs.