Author Topic: DiskPart Commands: Guide to Format and Fix Drives Not Working  (Read 39 times)

Offline javajolt

  • Administrator
  • Hero Member
  • *****
  • Posts: 35168
  • Gender: Male
  • I Do Windows
    • windows10newsinfo.com
DiskPart Commands: Guide to Format and Fix Drives Not Working
« on: September 08, 2020, 05:04:57 PM »
Sometimes the disk on your Windows 10 system may not work correctly, or the Windows fails to start because of the hard disk error. To rectify such disk errors, Windows 10 comes with an excellent tool known as DiskPart.

The DiskPart is a powerful command tool that lets you manage the Windows disks and partitions using Command Prompt or Windows PowerShell. This command interpreter allows you to delete, create, and modify partitions on any drives your PC can detect, even the external hard drives and USB storage. It is quite useful when any Pendrive or hard disks get corrupted because of logical errors and stopped working. Using DiskPart commands, you can wipe out the data and start clean.

DiskPart is not a new concept. It has been the part of the Windows even before Windows 10. It is the best alternative when other disk utility such as Disk Management Tool fails to work.

In this guide, we will learn to use the common DiskPart commands to fix ‘Drive not Working’ and other disk errors.

How to open DiskPart on Windows 10?

Launching the DiskPart is not a big task. You just require to open the command terminals, either the Command Prompt or Windows PowerShell with the administrative rights.

In this guide, we would use the Command Prompt to run the DiskPart commands. The same commands can be directly used in Windows PowerShell without any changes.

1. Search Command Prompt in the Windows search bar and launch it with admin rights.



2. In the command window, type diskpart and hit enter. The DISKPART tool would be open and ready to use.



3. If you want to glance on the full list of available commands of DiskPart type help in the command window and press the enter key.



4. After using it, type Exit and hit the enter key to exit the tool.



Common DiskPart Commands

We would now explore the common DiskPart commands that you will mostly require.

+ List all DiskPart Commands

Listing Existing Hard Drives, Volumes & Partitions using DiskPart

Before applying any destructive commands, you can first check the current internal and external hard disks and USB storage layout.

To check the available disks:

1. Open the DiskPart and after “DISKPART>” prompt type list disk and hit enter. This command will list all the available and detectable storage disks, including internal and external drives and USB storage.



2. To apply the DiskPart commands on the disks, you need to remember the disk number. For example, the windows disk is “Disk 0.“

To display the list of detected Volumes:

1. Launch DiskPart and next to “DISKPART>” prompt type list volume.



2. All volumes would be listed.

Check the list of partitions:

1. To check the partition list, you must first select the hard disk with the list disk command.

2. After the disk list is displayed, type followed by the disk number.



3. Once the disk is selected, type list partition, and hit the enter key, the selected disk’s partition list will be displayed. You can further modify the partitions using the partition number.



How to Delete Hard Drive, Volume, and Partition using DiskPart?

If you want to delete the Volume or Partition of your system’s hard disk using Diskpart, follow these steps:

1. First, select the hard drive using the select disk command, followed by the disk number.

2. Now open the partition list of the chosen disk using list partition command.

3. Chose the partition using select partition # command, replace # with the required partition number.

4. Once the partition is selected, you can delete it using the delete partition command. The partition will be deleted.



5. Similarly, you can delete the disk volume. Type list volume, check your chosen volume number, then type select volume #, replacing # with your volume number.



6. Type delete volume, to delete the chosen volume.

How to Completely Wipe Out the Hard Disk using DiskPart?

If you face a problem in formatting the system hard disk, external hard drive, or the USB Pendrive, then using DiskPart, you can easily wipe them out. Obviously, you won’t be able to clean the disk on which your OS is installed.

1. Similar to previous steps, on the DISKPART prompt window, type list disk.

2. By typing select disk # command where # is your disk number, choose the disk that you want to format completely.

3. After selecting the disk, type clean command to format it completely. Remember that it would not warn you, so make sure that you have selected the correct disk.



4. After the cleanup, DiskPart would display the success message, and the disk would be ready for creating the new partitions.

How to Create and Format New Hard Drive Partitions using DiskPart?

Using the steps from the last section, you might have cleaned your hard disk. Now its time to create the new partitions and format them with Windows-friendly file systems like NTFS or FAT32.



1. Open the disk list using the list disk command and select the disk using the select disk # command, where # is the disk number.

2. After selecting the disk type the create partition primary command to create a partition using the entire space on that drive.

3. If you want to create multiple partitions, you can assign how much space a partition could take. For that type, create partition primary size=X, where X is the size that you wish to set to the partition.

4. To ensure that the new partition is listed, type list partition command.

5. Use active command to activate the partition. It is required to use the partition as a bootable drive.

6. To format the partition with the NTFS file system, use format FS=NTFS label=Data quick command. You can replace Data with any label you want.

7. After it gets format, the DiskPart would automatically assign the letter to the partition. If it doesn’t, you can manually set it. For that type, assign letter=g, where you can replace g with any drive letter that you want.



Conclusion

These are the top used DiskPart commands that you can use to fix your hard drive problems and clean the USB drives and hard disks.

There are more commands, too, if you want to know about them, type help after launching DISKPART in the command window.

1. How to open DiskPart in Windows 10?

You can open DiskPart utility through Command Prompt or Windows PowerShell in Windows 10. After launching any of the command terminals, type diskpart to launch DiskPart.

2. How to fix hard drive problems with DiskPart?

DiskPart utility is specifically available for solving the disk issues on Windows 10. After launching the diskpart, type the help command to know about all the commands supported by diskpart. This post guides you on how to use the most common DiskPart commands.

source