Diskpart

Last updated
diskpart
Developer(s) Microsoft, Lee Schroeder
Initial releaseFebruary 17, 2000;23 years ago (2000-02-17)
Operating system Windows, ReactOS
Platform Cross-platform
Predecessor fdisk
Type Command
License Windows: Proprietary commercial software
ReactOS: GPLv2
Website learn.microsoft.com/en-us/windows-server/administration/windows-commands/diskpart
The Windows 7 diskpart command Create partition primary.jpg
The Windows 7 diskpart command
The ReactOS diskpart command ReactOS-0.4.13 diskpart command 667x434.png
The ReactOS diskpart command

In computing, diskpart is a command-line disk partitioning utility included in Windows 2000 and later Microsoft operating systems, replacing its predecessor, fdisk. [1] [2] The command is also available in ReactOS. [3]

Contents

Overview

The diskpart utility is used for partitioning internal hard drives, but can also format removable media such as flash drives. [4]

It has long been possible, theoretically, to partition removable drives – such as flash drives or memory cards – from within Windows NT 4.0 / 2000 / XP; e.g., during system installation. In reality, however, it was not possible to create, for instance, a recovery console, for such a device. A message would appear: 'Cannot format removable disk'. Microsoft noticed this error, and responded by disabling the functionalities of creating and viewing partitions on the device from within Windows, beginning with Vista up to[ clarification needed ] Windows 10.[ citation needed ]

With diskpart, scripts are supported to facilitate such functions. For example, the code below would create a new partition:

create partition logical size=2048 assign letter=F

Specifically, the above will create a 2 GB logical partition, provided that adequate space is available, and assign it the drive letter 'F:'. [5]

The installed disks and their associated volumes and/or partitions can be viewed using these commands:

list disk list volume list partition

The sel command will select them. The command clean will perform a "quick" disk wipe, and clean all zeroes out the entire partition/disk. The ReactOS version was developed by Lee Schroeder and is licensed under the GPLv2. [6]

Recovery Console

On the Recovery Console, which is included in all Windows 2000, Windows XP and Windows Server 2003, there is a diskpart command which is significantly different from the one included in the actual operating system. It only provides functionality for adding and deleting partitions, but not for setting an active partition. [7] [8]

See also

Related Research Articles

<span class="mw-page-title-main">Disk partitioning</span> Creation of separate accessible storage areas on a secondary computer storage device

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, 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.

<span class="mw-page-title-main">Drive letter assignment</span> Alphabetical assignment to logical drives on computers (e.g., C:\)

In computer data storage, drive letter assignment is the process of assigning alphabetical identifiers to volumes. Unlike the concept of UNIX mount points, where volumes are named and located arbitrarily in a single hierarchical namespace, drive letter assignment allows multiple highest-level namespaces. Drive letter assignment is thus a process of using letters to name the roots of the "forest" representing the file system; each volume holds an independent "tree".

fdisk Command line utility of DOS and Microsoft Windows operating systems

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, NetBSD, OpenBSD, DragonFly BSD and macOS for compatibility reasons. Windows 2000 and its successors have replaced fdisk with a more advanced tool called diskpart.

<span class="mw-page-title-main">Multi-booting</span> Act of installing multiple operating systems on a single computer

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.

In computing, data recovery is a process of retrieving deleted, inaccessible, lost, corrupted, damaged, or formatted data from secondary storage, removable media or files, when the data stored in them cannot be accessed in a usual way. The data is most often salvaged from storage media such as internal or external hard disk drives (HDDs), solid-state drives (SSDs), USB flash drives, magnetic tapes, CDs, DVDs, RAID subsystems, and other electronic devices. Recovery may be required due to physical damage to the storage devices or logical damage to the file system that prevents it from being mounted by the host operating system (OS).

In computer data storage, a volume or logical drive is a single accessible storage area with a single file system, typically resident on a single partition of a hard disk. Although a volume might be different from a physical disk drive, it can still be accessed with an operating system's logical interface. However, a volume differs from a partition.

<span class="mw-page-title-main">GUID Partition Table</span> Computer disk partitioning standard

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, 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.

<span class="mw-page-title-main">Windows Preinstallation Environment</span> Lightweight version of Microsoft Windows for deployment

Windows Preinstallation Environment is a lightweight version of Windows used for the deployment of PCs, workstations, and servers, or troubleshooting an operating system while it is offline. It is intended to replace MS-DOS boot disks and can be booted via USB flash drive, PXE, iPXE, CD, DVD, or hard disk. Traditionally used by large corporations and OEMs, it is now widely available free of charge via Windows Assessment and Deployment Kit (WADK).

In computing, SUBST is a command on the DOS, IBM OS/2, Microsoft Windows and ReactOS operating systems used for substituting paths on physical and logical drives as virtual drives.

The Logical Disk Manager (LDM) is an implementation of a logical volume manager for Microsoft Windows NT, developed by Microsoft and Veritas Software. It was introduced with the Windows 2000 operating system, and is supported in Windows XP, Windows Server 2003, Windows Vista, Windows 7, Windows 8, Windows 10 and Windows 11. The MMC-based Disk Management snap-in hosts the Logical Disk Manager. On Windows 8 and Windows Server 2012, Microsoft deprecated LDM in favor of Storage Spaces.

In Unix-like operating systems, a loop device, vnd, or lofi is a pseudo-device that makes a computer file accessible as a block device.

<span class="mw-page-title-main">Recovery Console</span> Microsoft Windows feature

The Recovery Console is a feature of the Windows 2000, Windows XP and Windows Server 2003 operating systems. It provides the means for administrators to perform a limited range of tasks using a command-line interface.

The NTFS file system defines various ways to redirect files and folders, e.g., to make a file point to another file or its contents without making a copy of it. The object being pointed to is called the target. Such file is called a hard or symbolic link depending on a way it's stored on the filesystem.

NTBackup is the built-in backup application introduced in Windows NT 3.51 and included in Windows NT 4.0, Windows 2000, Windows XP, and Windows Server 2003. NTBackup comprises a command-line utility and a set of wizard interfaces that provide multiple options to create, customize, and manage backups, and it is integrated with Shadow Copy and Task Scheduler. NTBackup creates backups in a proprietary BKF file format to external sources including floppy disks, hard drives, tape drives, and ZIP drives.

Windows Vista contains a range of new technologies and features that are intended to help network administrators and power users better manage their systems. Notable changes include a complete replacement of both the Windows Setup and the Windows startup processes, completely rewritten deployment mechanisms, new diagnostic and health monitoring tools such as random access memory diagnostic program, support for per-application Remote Desktop sessions, a completely new Task Scheduler, and a range of new Group Policy settings covering many of the features new to Windows Vista. Subsystem for UNIX Applications, which provides a POSIX-compatible environment is also introduced.

Windows Deployment Services (WDS) is a deprecated component of the Windows Server operating system that enables centralized, network-based deployment of operating systems to bare-metal computers. It is the successor to Remote Installation Services (RIS). WDS officially supports remote deployment of Windows Vista and later, as well as Windows Server 2008 and later. However, because WDS uses disk imaging, in particular the Windows Imaging Format (WIM), it could deploy virtually any operating system. This is in contrast with its predecessor, RIS, which was a method of automating the installation process.

VHD and its successor VHDX are file formats representing a virtual hard disk drive (HDD). They may contain what is found on a physical HDD, such as disk partitions and a file system, which in turn can contain files and folders. They are typically used as the hard disk of a virtual machine, are built into modern versions of Windows, and are the native file format for Microsoft's hypervisor, Hyper-V.

In some operating systems, vol is a command within the command-line interpreters (shells) such as COMMAND.COM and cmd.exe. It is used to display the volume label and volume serial number of a logical drive, such as a hard disk partition or a floppy disk, if they exist.

Windows Assessment and Deployment Kit, formerly Windows Automated Installation Kit, is a collection of tools and technologies produced by Microsoft designed to help deploy Microsoft Windows operating system images to target computers or to a virtual hard disk image in VHD format. It was first introduced with Windows Vista. WAIK is a required component of Microsoft Deployment Toolkit.

In computing, WBAdmin is a command-line utility built into Windows Vista, Windows Server 2008, Windows 7, Windows Server 2008 R2, Windows 8, Windows Server 2012, Windows 10 and Windows 11 operating systems. The command is used to perform backups and restores of operating systems, drive volumes, computer files, folders, and applications from a command-line interface.

References

Footnotes

  1. "DiskPart". Windows XP Command-line reference A-Z. Microsoft . Retrieved 3 April 2015.
  2. "How to extend a data volume in Windows Server 2003, in Windows XP, in Windows 2000, and in Windows Server 2008". Support. Microsoft. 11 September 2011.
  3. "Reactos/Reactos". GitHub .
  4. "DiskPart Commands". Windows Server 2008 R2 and Windows Server 2008 Command-Line Reference. Microsoft . Retrieved 3 April 2015.
  5. Bhardwaj, Pawan K.; Andreou, Kimon; Barber, Brian; Kleiman, Dave; Satyanarayana, Mahesh (2006). How to cheat at Windows System Administration using command line scripts . Rockland, MA: Syngress. ISBN   1-59749-105-5.
  6. "Reactos/Reactos". GitHub . 3 January 2022.
  7. "Description of the Windows XP Recovery Console for advanced users". Support. Microsoft. 11 July 2013.
  8. "Partition Diskpart - Create, Extend or Delete a Disk Partition" . Retrieved 2021-02-28.

Citations

Further reading