Fix a USB flash, SD card with the diskpart command

If a USB flash, or SD card, or in general a drive does not work very well, then the “diskpart” command and removing partitions is one of the that you have. We would say that this solution fixes problems with a disk that cannot be formatted or one that shows an error in capacity.

usb diskpart

This technique will completely delete all partitions (volumes) that cannot be deleted with the usual ones , like the Disk Management that comes with Windows. After this process you will have to reset the partitions on your drive.

We repeat the Warning: This process will completely delete the entire disk you choose. Before you make sure you back up the important files inside it. Also, you should be very careful to determine the correct disk, since there is the possibility of confusing and erasing the wrong disk.

STEP 1: Open a command-line window as an administrator
First, you need to open a command prompt window as an administrator. In Windows 10 or 8.1, you can simply right-click the Start button (or press Windows + X) and select "Command Prompt (Administrator)".

In Windows 7, you will need to locate the “Command Prompt” shortcut in the Inception. Then right-click on the shortcut and select “Run as Administrator”.

STEP 2: Use the diskpart command to clean a disk
Before proceeding, be sure to connect the USB flash drive, SD card, or any other drive you want to clean to your computer.

Type the following command in the command prompt window and press Enter:

diskpart

clean1

STEP 3: See your list of units
To see a complete list of storage units that are currently connected to your computer, type the following command and press Enter:

list disk

clean2

STEP 4: Select the correct drive
Examine them command to specify the number of disks you want to clear. Be very careful here! If you choose the wrong disk number, you will delete the wrong disk and you will lose all the data.

In the following , we can see that “Disk 0” is 465 GB in size, “Disk 1”, “Disk 2” and “Disk 3” are 931 GB in size, and “Disk 8” is 14 GB in size. We know that our particular USB drive is 14GB in size. This tells us that Disk 8 is the USB drive connected to the computer, and Disk 0,1,2 and 3 are the computer's system drives.

Once you recognize you know the disk number you want to clean, type the following command, replacing # with the disk number specified above.

Warning: Be very careful to determine the correct disk number! If you enter the wrong disk number, all subsequent steps will act on the wrong disk, which will cause it to be completely deleted.

select disk #

clean3

STEP 5: Delete the partitions of the selected disk
The diskpart command has now selected the disk you specified. All actions you perform will be applied to the selected drive. To completely delete the partitions of the selected disk, type the following command and press the Enter key.

Warning: This command will delete all data about the selected disk! Be sure you back up your important data before proceeding!

clean

clean4

You will see a "diskpart succeeded in cleaning the disk" which means that diskpart managed to clean the disk and everything worked fine. Close the command prompt window to continue.

STEP 6: Partition and Disk Format
You will now have to prepare, partition and format the disk as you would normally do, using the Disk Management (Disk Management Tool) built into Windows. You can also use the diskpart command to do this, but it is perhaps easier to use the Disk Management graphical interface.

To start Disk Manager in Windows 10 or 8.1, simultaneously press Windows + X and select "Disk Manager".

In Windows 7, press Windows + R, type “diskmgmt.msc” in the Run dialog box and press Enter (works for Windows 10 or 8.1).

clean7

You will see that the disk no longer has any partitions. Right-click on the unallocated space and select "New Simple Volume" to create a disk partition and format it to your desired file system. By default, Windows will create only one partition that extends to the entire drive.

clean5

clean6

Proceed the Windows process to configure your disk to the end. That's it ! You're done!

If all of the above methods did not work until the end - for example, if the disk was successfully cleaned but does not seem to work properly when you try to partition, or if the diskpart can not see the disk or clean properly - then it is possible that the drive is physically damaged and will no longer work properly no matter what you do. The "clean" disk with diskpart is a solution that can revive disks that seem to be damaged.

iGuRu.gr The Best Technology Site in Greecefgns

every publication, directly to your inbox

Join the 2.082 registrants.

Written by Dimitris

Dimitris hates on Mondays .....

Leave a reply

Your email address is not published. Required fields are mentioned with *

Your message will not be published if:
1. Contains insulting, defamatory, racist, offensive or inappropriate comments.
2. Causes harm to minors.
3. It interferes with the privacy and individual and social rights of other users.
4. Advertises products or services or websites.
5. Contains personal information (address, phone, etc.).