In Windows, it is possible to create a variety of distinct partitions for your computer. Regardless of the partition type you want to create in Windows 11/10, you can accomplish whatever you need to do with DiskPart by using the appropriate commands.
We will walk you through a detailed and comprehensive step-by-step explanation that will teach you how to create partitions with DiskPart.
In this article
Part 1. How To Create a Primary Partition Using DiskPart
It is also possible to create system volumes by using the DiskPart command. The system volume, commonly referred to as the primary partition, is the location on your computer where you will install your operating system and other programs. (In this article, volume is equal to partition.)
Follow these steps carefully to create a system volume using the DiskPart command:
Step 1: Launch the Command Prompt (CMD) on your Windows PC by pressing Windows+R to open the Run box and type cmd.
Step 2: Enter DISKPART and then Type list disk.
Step 3: Choose a disk to work with by issuing the select disk x command. (Replace x with the number corresponding to the disk you want to pick.)
Step 4: To establish a new partition with size, use the command create primary partition size=20480 into the command prompt.
By entering those above, a main system volume partition will be created. Simply change "create partition primary" to "create partition logical" whenever you need to make a logical partition. In addition, the size may be altered to suit your requirements at any time.
Step 5: When the procedure is finished, type exit to end the partition creation process with DiskPart.
After you have created a partition for the system volume, you can do a clean installation of Windows and other software on that disk.
Part 2. How To Create a Boot Partition Using DiskPart
Even if a disk has bootable data, your computer could occasionally fail to recognize it as a valid bootable partition. This is typically partly related to the reality that for a partition to be recognized by your computer as a bootable partition, it not only requires to contain a bootable setting but also needs to be particularly marked as an active system partition.
If a partition does not meet both of these requirements, then your computer will not be able to recognize it as a bootable partition. However, using the command-line disk management utility, DiskPart, which is integrated into Windows, you can add an active marker to a hard drive partition.
Step 1: Launch the Windows Start screen, then enter cmd into the search box. Select "Run as administrator" from the context menu when you right-click the "Command-Line Prompt" shortcut.
Step 2: After typing DISKPART, hit the Return key to continue. DiskPart will begin to launch. While DiskPart runs, the standard command-line prompt will be replaced by a DiskPart prompt. This indicates that any command you type into the command prompt will be handled by the program that is now active.
Step 3: Type the following diskpart commands and hit Enter one after one.
- list disk. (Take note of the number allocated to the drive that houses the partition you want to turn into a bootable one. That number is located in the column to the left of the first column.)
- Select disk X (Replace "X" with the number allocated to the appropriate drive.)
- list volume (Take note of the number assigned to the partition that you want to turn into a bootable one.)
- select volume X (Replace “X” with the number of the partition whose selection you want to make bootable)
- active (You will give DiskPart the instruction to declare that partition as active and bootable.)
Step 4: Finally, use exit command followed by "Enter" on your keyboard to finish creating the boot partition in the DiskPart command prompt.
Part 3. How To Create Recovery Partition in Windows 10/11 Using DiskPart
Your computer has a recovery partition, a section of the hard disk drive that stores an operating system's image. It may assist you in recovering Windows or fixing issues with the system. In most cases, the recovery partition does little more than save the system's configuration when it was initially set up on the PC by the manufacturer. It shows up as a WIM file, and the recovery interface is the only way to open it.
Creating a recovery partition is a bit complicated, so you can check the video tutorial below to learn how to create a recovery partition with DiskPart.
Part 4. How To Create Dynamic Partition Using DiskPart
Basic and dynamic disks are the two kinds of hard disks that may be found in a computer. Regarding Windows, the most popular storage media is the basic disk. Most personal computers seen in homes are set up with Basic disks. On the other hand, most IT experts favor the usage of dynamic disks because of their additional capability, higher reliability, and improved performance.
When establishing a dynamic partition on a disk, it is not necessary to provide a size for the partition. This is because your disk has the potential to develop and expand over time.
Attention
Before beginning this procedure, you should know that some of your data may be lost due to this operation. Therefore, it is necessary that you first create a backup of your data by copying it to an external hard drive.
Suppose you already use a basic disk as a storage place for shadow copies and want to change the disk into a dynamic disk. In that case, you must take the following precautions to prevent data loss. Suppose the disk is not a boot volume and is different from the partition in which the original files reside. In that case, you will need to unmount and take offline the original files' volume before converting the disk containing shadow copies to a dynamic disk.
However, this step is unnecessary if the disk is a boot volume. If you wait more than 20 minutes to bring the disk that contains the original files back online, you risk losing the previously saved data in the shadow copies that were previously created. According to Microsoft, if the shadow copies are stored on a boot volume, it is possible to change the disk to dynamic mode without the shadow copies being erased.
To create a dynamic volume with the help of the DiskPart command, carry out the following steps:
Step 1: Launch the Command Prompt (CMD) on your Windows machine with the abovementioned steps.
Step 2: Type DISKPART and then enter the following commands one after one by hitting Enter:
- list disk
- select disk x (Replace x with the number of the disk you want to change to a dynamic disk.)
- convert dynamic (The command gives DiskPart the instruction to declare that disk as dynamic volume.)
Step 3: Type exit to close the DiskPart command prompt.
Part 5.How To Create RAID-5 Partition Using DiskPart
To boost speed and safeguard your data against the loss of data due to the malfunction of a single drive, you may use a RAID 5 configuration on Windows to merge numerous drives into a bigger logical storage space. You also get improved disk performance and security from using RAID 5 and improved storage management.
The following steps need to be followed to build a RAID-5 partition using the DiskPart command:
Step 1: Launch the Command Prompt (CMD) on your Windows machine with the abovementioned steps.
Step 2: Type DISKPART.
Step 3: Type list disk at the command prompt to see the current disk numbers.
Step 4: Enter create volume raid disk=1 (The number 1 refers to the disk that will be added to the RAID-5 volume you are building.) This number may be changed to correspond with any of the other disk numbers.
Step 5: Type exit to close the DiskPart command prompt and complete creating a RAID 5 volume with DiskPart.
Part 6. How To Create Mirrored System Partition Using DiskPart
Mirrored volumes are data stored on hard disks or other storage devices that are created by copying the contents of another volume. If the main storage device fails, mirrored volumes act as backup storage devices, contributing to increased fault tolerance. Data stored on mirror volumes are safeguarded if a disk fails.
Using the mirrored system partition, you can generate a copy of data stored on another drive. If you want to build a mirrored system volume via DiskPart, follow the procedures below:
Step 1: Launch the Command Prompt application on your Windows machine.
Step 2: Type DISKPART.
Step 3: Type list disk, followed by choose disk, which refers to the volume you wish to mirror using the select disk x command.
Step 4: To list the volume of the chosen disk, type list volume into the appropriate field.
Step 5: Now, pick the volume you wish to mirror to a disk by entering the select volume c command into the command prompt. (Substitute c with the letter of the volume alphabet that you choose)
Step 6: Type the command add disk=x into the console (replace x with the disk where you want a backup of the selected volume).
Step 7: enter the retain command, and you can effectively establish a mirrored system volume.
Part 7. How To Create EFI System Partition Using DiskPart
An EFI partition is a requirement that must be met to make a data drive capable of booting a computer system. By following the instructions that are shown below in DiskPart, you will be able to build an EFI partition:
Step 1: Launch the Command Prompt application on your Windows machine.
Step 2: Type DISKPART in CMD and press enter.
Step 3: To choose the disk, type the list disk command and select disk x from the list. (Replace x with the number of the disk you want to create the UEFI system volume.)
Step 4: The next step is constructing the partition for the EFI partition using the create partition efi size=100 command.
To sum up, executing this command will result in the creation of an EFI partition on the disk that you have specified.
Step 5: Type exit to close the DiskPart command prompt.
Summing Up
Several kinds of partitions within a Windows operating system may be used for different purposes. You may build these partitions in Windows using the command DiskPart. You do not need to install any software to use the DiskPart tool since it is already there, and you can access it using CMD.
For Windows XP/Vista/7/8/10/11
For macOS X 10.10 or later