How to Repair or Fix Corrupted Hard Drive Using CMD?

One of the most terrifying incidents that can happen in the tech world is the corruption of storage media such as internal or external hard drives, flash drives, memory cards, etc. The incident can even prompt a mini heart attack if the storage media contained some important data (family pictures or videos, work-related files, etc.). A few signs that indicate a corrupt hard drive are error messages like ‘Sector not found.’, ‘You need to format the disk before you can use it. Do you want to format it now?’, ‘X:\ is not accessible. Access is denied.’, ‘RAW’ status in Disk Management, file names start including & * #  % or any such symbol, etc.

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.

Contents

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.

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.

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-

1. Open the Run command box by pressing Windows key + R, type devmgmt.msc, and click on OK to open the Device Manager.

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

3. Right-click on the corrupted hard disk and select Update Driver.

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

1. Open Windows File Explorer (or My PC) by either double-clicking on its desktop shortcut icon or using the hotkey combination Windows key + E.

2. Right-click on the hard drive you are trying to fix and select Properties from the ensuing context menu.

3. Move to the Tools tab of the Properties window.

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

1. Press Windows key + S to bring up the Start Search bar, type Command Prompt and select the option to Run as Administrator.

2. Click on Yes in the User Account Control pop-up that arrives requesting permission for the application to make changes to the system.

3. Windows 10, 8.1, and 8 users should run the below command first. Windows 7 users can skip this step.

DISM.exe /Online /Cleanup-image /Restorehealth

4. Now, type sfc /scannow in the Command Prompt and press Enter to execute.

5. 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:

sfc /scannow /offbootdir=X:\ /offwindir=C:\Windows

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:

1. Open Command Prompt as an Administrator once again.

2. Carefully type the following command and press Enter to execute it.

chkdsk X: /F

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)

3. 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:

chkdsk G: /F /R /X

4. 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).

1. Launch Command Prompt again as an administrator.

2. Execute the diskpart command.

3. Type list disk or list volume and press Enter to view all the storage devices connected to your computer.

4. 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.)

5. 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:

format fs=fat32 quick

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

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.

Sign up and earn $1000 a day ⋙

What should I do if Netflix is ​​hacked?

What should I do if Netflix is ​​hacked?

What should I do if my Netflix account is hacked? What should I do if my Netflix account is hacked? Here's what you need to know when your Netflix account is hacked.

Tips for using LDPlayer you may not know

Tips for using LDPlayer you may not know

Tips for using LDPlayer you may not know. LDPlayer is one of the most popular Android emulators on computers today. This article will provide it to you

Shortcuts in Blender that users need to know

Shortcuts in Blender that users need to know

Shortcuts in Blender that users need to know. Blender shortcuts help you work faster when designing graphics. Therefore, WebTech360 will synthesize the keys for you

Kahoot hacking tips you may not know

Kahoot hacking tips you may not know

Kahoot hacking tips you may not know, how to hack Kahoot to get answers to difficult questions? This article will suggest you some of the simplest Kahoot hacks.

What is Google TasksBoard?

What is Google TasksBoard?

What is Google TasksBoard?, Google TasksBoard is a new task management app, helping you increase work efficiency. Let's learn with Donwload.vn how to use Google TasksBoard

Is Google Takeout a good data backup option?

Is Google Takeout a good data backup option?

Is Google Takeout a good data backup option?, Google Takeout comes from a line of free services from Google. Google says it will help users download it

Host permissions and how to specify co-host in Zoom

Host permissions and how to specify co-host in Zoom

Host rights and how to designate co-host in Zoom. How to regain host rights on Zoom is not difficult. This article will introduce you to host and reclaim host details

6 steps to become a Pinterest expert

6 steps to become a Pinterest expert

6 steps to become a Pinterest expert, Pinterest is a tool for collecting, organizing, and sharing photos and videos you glean from the Internet. Here are 6

3 ways to edit sunsets in Photoshop

3 ways to edit sunsets in Photoshop

3 ways to edit sunset in Photoshop, Sunset is always a scene that every photographer wants to capture. However, taking sunset photos is not easy. Wear

Convert text to speech online

Convert text to speech online

Convert text to speech online. If you want to listen to the pronunciation on Google Translate or Google Translate, users can download this voice to your computer easily.

(2024) The Best Free Cloning Software for Windows 10/11

(2024) The Best Free Cloning Software for Windows 10/11

Are you looking for the free cloning software for Windows 10? This passage will share you the best free Windows 10/11/7 cloning software in 2024.

Steps to create a new database in Access

Steps to create a new database in Access

Steps to create a new database in Access, Steps to create a new database in Microsoft Access are not difficult. This article will guide you in detail on the steps to build muscle

3 ways to save files better on your computer

3 ways to save files better on your computer

3 better ways to save files on your computer, How to save files on your computer is not difficult. However, what is the best way to save on the computer? Let's find out with Dowload.vn

10 poems for the first day of school in 2023 - 2024

10 poems for the first day of school in 2023 - 2024

10 poems for the opening day of school in 2023 - 2024, TOP 10 short and unique poems for the opening day of the new school year. We invite you to follow along!

Things you should do first when buying a Samsung smartphone

Things you should do first when buying a Samsung smartphone

Things you should do first when buying a Samsung smartphone, Samsung phones contain a lot of applications and settings. Here are the settings you should do when

The easiest ways to create borders for photos

The easiest ways to create borders for photos

The easiest ways to create borders for photos, Adding frames to photos is not difficult and you have a lot of options. This article will summarize for you ways to add frames to beautiful photos

Office 2021 vs. Microsoft 365: Which software is right for you?

Office 2021 vs. Microsoft 365: Which software is right for you?

Office 2021 vs. Microsoft 365: Which software is right for you?, Office 2021 and Microsoft 365 can both meet office editing tasks. So Office 2021

Gemini - Googles artificial intelligence model

Gemini - Googles artificial intelligence model

Gemini - Google's artificial intelligence model, Google launches Gemini - an artificial intelligence model competing with OpenAI's GPT-4, this is an artificial intelligence model

What is rendering?

What is rendering?

Rendering is the process of creating an image from a model into a movie scene or image using computer software.

What is CPU? What are the popular CPU types today?

What is CPU? What are the popular CPU types today?

The CPU is the data processing center, or simply understood, it is the brain that controls most of the rest of the components in a computer.