Now, depending on the storage media, corruption may be caused by different factors. Hard disk corruption is most commonly caused due to physical damage (if the hard disk took a tumble), a virus attack, file system corruption, bad sectors, or simply due to age. In most cases, if the damage isn’t physical and severe, the data from a corrupted hard disk can be retrieved by fixing/repairing the disk itself. Windows has a built-in error checker for both internal and external hard drives. Apart from that, users can run a set of commands in an elevated command prompt to fix their corrupted drives. In this article, we will show you multiple methods that can be employed to repair or fix corrupted hard drive in Windows 10.
How to Repair or Fix Corrupted Hard Drive Using CMD?
Firstly, ensure you have a backup of the data contained in the corrupted disk, if not, use a third-party application to retrieve the corrupted data. Some popular data recovery applications are DiskInternals Partition Recovery, Free EaseUS Data Recovery Wizard, MiniTool Power Data Recovery Software, and Recuva by CCleaner. Each of these has a free trial version and a paid version with additional features. We have an entire article dedicated to various data recovery software and the features they offer – 9 Best Free Data Recovery Software.
How to Repair or Fix Corrupted Hard Drive Using CMD? 5 Ways to Fix Corrupted Hard Drive using Command Prompt (CMD) Method 1: Update Disk Drivers Method 2: Perform Disk Error Checking Method 3: Run the SFC Scan Method 4: Use the CHKDSK utility Method 5: Use the DiskPart command
Also, try connecting the hard drive USB cable to a different computer port or to another computer altogether. Ensure the cable itself isn’t faulty and use another one if available. If corruption is caused due to a virus, perform an antivirus scan (Settings > Update & Security > Windows Security > Virus & threat protection > Scan now) to remove the said virus and repair the hard drive. If none of these quick fixes worked, move to the advanced solutions below.
5 Ways to Fix Corrupted Hard Drive using Command Prompt (CMD)
Method 1: Update Disk Drivers
If the hard drive can be successfully used on another computer, chances are, your disk drivers need updating. Drivers, as many of you might know, are software files that help hardware components effectively communicate with your computer’s software. These drivers are constantly updated by hardware manufacturers and they can be rendered corrupt by a Windows update. To update the disk drivers on your computer-
Open the Run command box by pressing Windows key + R, type devmgmt.msc, and click on OK to open the Device Manager.
Expand Disk Drives and Universal Serial Bus Controllers to find the corrupted hard drive. A hardware device with outdated or corrupt driver software will be marked with a yellow exclamation mark.
Right-click on the corrupted hard disk and select Update Driver.
In the following screen, choose ‘Search automatically for updated driver software’.
You can also manually download the latest drivers from the hard drive manufacturer’s website. Simply perform a Google search for ‘Hard drive brand drivers’ and click on the first result. Download the .exe file for the drivers and install it as you would any other application. Also Read: How to Repair Corrupted System Files in Windows 10
Method 2: Perform Disk Error Checking
As mentioned earlier, Windows has a built-in tool to fix corrupted internal and external hard drives. Usually, Windows automatically prompts the user to perform an error check as soon as it detects a faulty hard drive is connected to the computer but users can also run the error scan manually.
Open Windows File Explorer (or My PC) by either double-clicking on its desktop shortcut icon or using the hotkey combination Windows key + E.
Right-click on the hard drive you are trying to fix and select Properties from the ensuing context menu.
Move to the Tools tab of the Properties window.
Click on the Check button under the Error-checking section. Windows will now scan and fix all the errors automatically.
Method 3: Run the SFC Scan
The hard drive may also be misbehaving due to a corrupt file system. Fortunately, the System File Checker utility can be used to repair or fix the corrupted hard drive.
Press Windows key + S to bring up the Start Search bar, type Command Prompt and select the option to Run as Administrator.
Click on Yes in the User Account Control pop-up that arrives requesting permission for the application to make changes to the system.
Windows 10, 8.1, and 8 users should run the below command first. Windows 7 users can skip this step.
Now, type sfc /scannow in the Command Prompt and press Enter to execute.
The utility will start verifying the integrity of all protected system files and replace any corrupt or missing files. Do not close the Command Prompt until the verification reaches 100%. 6. If the hard drive is an external one, run the following command instead of sfc /scannow: Note: Replace the “x:\” with the letter assigned to the external hard drive. Also, don’t forget to replace “C:\Windows” with the directory in which Windows has been installed.
7. Restart your computer once the scan completes and check if you can access the hard drive now.
Method 4: Use the CHKDSK utility
Along with the system file checker, there is another utility that can be used to repair corrupted storage media. The check disk utility allows users to scan for logical as well as physical disk errors by checking the file system and file system metadata of a specific volume. It also has a number of switches associated with it to perform specific actions. Let’s see how to fix corrupted hard drive using CMD:
- Open Command Prompt as an Administrator once again.
- Carefully type the following command and press Enter to execute it. Note: Replace X with the letter of the hard drive you wish to repair/fix.
Apart from the /F parameter, there are few other ones that you can add to the command line. The different parameters and their function are as follows:
/f – Finds and fixes all the errors on the hard drive. /r – Detects any bad sectors on the disk and recovers readable information /x – Dismounts the drive before the process starts /b – Clears all the bad clusters and rescans all allocated and free clusters for error on a volume (Use with NTFS File System only)
You can add all the above parameters to the command to run a more meticulous scan. The command line for the G drive, in that case, would be:
If you are repairing an internal drive, the program will ask you to perform a computer restart. Press Y and then enter to restart from the command prompt itself.
Method 5: Use the DiskPart command
If both the above command-line utilities failed to repair your corrupted hard drive, try formatting it using the DiskPart utility. The DiskPart utility allows you to forcefully format a RAW hard drive to NTFS/exFAT/FAT32. You can also format a hard drive from the Windows File Explorer or the Disk Management application (How to Format Hard Drive on Windows 10).
Launch Command Prompt again as an administrator.
Execute the diskpart command.
Type list disk or list volume and press Enter to view all the storage devices connected to your computer.
Now, select the disk that needs to be formatted by executing the command select disk X or select volume X. (Replace X with the number of the disk you would like to format.)
Once the corrupted disk is selected, type format fs=ntfs quick and hit Enter to format that disk. 6. If you want to format the disk in FAT32, use the following command instead:
The command prompt will return a confirmation message ‘DiskPart successfully formatted the volume’. Once done, type exit and press Enter to close the elevated command window. Recommended:
Fix Faulty Hardware corrupted page error on Windows 10 How to Repair Corrupted AVI Files For Free How to Use the Fn Key Lock in Windows 10
We hope this guide was helpful and you were able to repair or fix corrupted hard disk drive using CMD in Windows 10. If you weren’t, keep an ear out for any clicking noises when you connect the hard drive to your computer. Clicking noises imply that the damage is physical/mechanical and in that case, you will need to contact the service center.