Updated by

Linda

Written by

Cici

Updated on May 06, 2024

External hard drives are undoubtedly a boon for those who often struggle with managing their data. However, encountering data corruption or hard drive issues can be quite frustrating. Fortunately, you can repair a hard disk using the built-in Command Prompt in Windows. In this article, we will guide you on how to fix a corrupted hard drive using the Command Prompt.

How to Fix a Corrupted Hard Drive

In this article, we will present two methods to address a corrupted hard drive: either by using Command Prompt (CMD) or through a more straightforward approach with a tool like tools Partition Master Free. Here's a brief overview of both solutions:

  • The Command Prompt executes shell commands. To fix a corrupt hard drive, you must run CHKDSK, also known as CheckDisk, which is an official Windows application designed to check the integrity of a hard disk and repair it if damage is detected.
  • An alternative method to fix a corrupted hard drive is by using the utility Partition Master, a disk repair tool. With a single click, you can scan and rectify partition issues on Windows 10, 8, or any other Windows operating system using Partition Master Free.

To help you choose the better solution, we made a table to compare the two hard drive repair tools from their cons and pros:

Comparison

Tools - Partition Master

Command Prompt (CMD)

Pros
  • Check hard drive health status and errors
  • Fix corrupted hard drive by rebuilding MBR, formatting
  • Can clone corrupted hard drives
  • Suitable for all drives, including RAW drive
  • Check hard drive/partition errors
  • Repair corrupted drive by formatting, rebuilding
Cons
  • Requires downloading the tool
  • Not suitable for RAW drives
  • Takes more time and effort to fix issues
  • Requires mastering command parameters
✍️Difficulty Simple Complex
?‍?Suitable Users For all users, including beginners For experienced users

Editor's Advice: Obviously, the tool Partition Master has more features and better compatibility. No matter what state your hard drive is in, you can find a solution with this tool. However, CMD requires you to be proficient in command parameters. Otherwise, it could lead to data loss.

Keep reading. Let's figure out the detailed steps for both solutions.

How to Repair a Corrupted Hard Drive Using the Command Prompt for Free

The Partition Master tool will scan for hard disk issues and perform automatic repairs. This utility serves as the best alternative when you encounter errors like CHKDSK not working with RAW drives. It offers several methods to fix a corrupted drive, such as:

  • Check and repair the corrupted file system
  • Rebuild corrupted hard drive MBR
  • Format a corrupted hard drive
  • Clone a hard drive with bad sectors

To resolve the issue more promptly, this guide will present two methods to repair a corrupted hard drive. Download it now and give them a try:

1. Check and Repair Corrupted File System

Step 1. Right-click the problematic partition.

Step 2. Choose "Advanced" > "Check File System".

Step 3. Confirm whether you want to hide the partition or not.

Step 4. In the Check File System window, select the "Try to fix errors if found" option.

Step 5. Click "Start" to scan for errors on your partition.

2. Repair Corrupted Hard Drive MBR

Step 1. Create a WinPE bootable disk

    Translate the following text into English: < li > Launch AOMEI Partition Assistant, and click "Bootable Media" on the toolbar. Select "Create bootable media". < /li > < li > Click "Next" to complete the process. < /li >
Create a bootable disk

Step 2. Boot the Tools Partition Master Bootable USB

    Connect the bootable USB or CD/DVD to your PC. Press F2 or Del when you restart the computer to enter the BIOS screen. Set and boot your computer from "Removable Devices" or "CD-ROM Drive". Then, the Partition Master tool will run automatically.

Step 3. Rebuild MBR

    Click "Toolkit" and choose "Rebuild MBR".

Rebuild MBR

    Select the disk and the type of MBR, and then click "Rebuild".
Rebuild MBR
    After that, you can see "MBR has been successfully rebuilt on Disk X".
Rebuild MBR

For more solutions: Please provide the languages you need them translated into.

How to Repair a Corrupted Hard Drive Using Command Prompt

The Command-Line Interface, commonly referred to as Command Prompt or CMD, is utilized for running shell commands. It is essential to type each command accurately at the command prompt. You might be curious about the hard disk issues that the Command Prompt can resolve. Below are the features to repair a corrupted hard drive:

    Translate the following phrases into English:
  • Use CHKDSK to Repair Hard Drive
  • Try Diskpart to Repair Corrupted Drive
  • Run SFC Scan

1] Use CHKDSK to Repair Hard Drive Translation: 1] Utilize the CHKDSK utility to repair the hard drive.

The disk checking software allows users to scan for logical and physical disk issues by examining the file system and file system metadata of a specific volume. It is also associated with multiple switches that can perform different tasks. Let's explore how to use Command Prompt to fix a corrupted hard drive:

Step 1: Open Command Prompt as an Administrator.

Step 2: Copy the following command, paste it, and press Enter to execute it:

chkdsk X: /F This command translates to: Check Disk Utility on drive X: with the /F switch In English, this command is used to run the Chkdsk (Check Disk) utility on the specified drive letter (X:) with the /F flag, which tells the utility to fix any file system errors it encounters.

chkdsk

Important: Replace H with the letter of the hard drive that you want to restore or repair.

In addition to the /F parameter, there are a few other options you can include on the command line. Here are the various parameters and their functions:

    Here are the translations of the provided language options into English:
  • /f - Locates and corrects all hard drive errors.
  • /r - Finds any corrupt sectors on the disk and restores readable data.
  • /x - Unmounts the drive before the process begins.
  • /b - Removes bad clusters from the disk and rechecks all allocated and free clusters for errors. Use it with the NTFS File System.

Step 3: To perform a more comprehensive scan, you can customize the program to include each available option. In this case, the command line for the G drive would be:

If you fix an internal drive, the application will prompt you to restart your computer. To restart directly from the command prompt, press Y and Enter.

< strong > You May Also Like: < /strong >

2] Use DiskPart to Repair the Corrupted Drive

With this method, you can attempt to format your hard disk using the DiskPart utility. You can forcefully format a RAW hard drive to NTFS/exFAT/FAT32 using the DiskPart tool. You can also format the drive through either the Windows File Explorer or the Disk Management utility. To execute the DiskPart command, follow these steps:

Step 1: Open Command Prompt as an administrator, type diskpart, and press Enter.

Step 2: To view all connected storage devices, type list disk or list volume and press Enter.

Step 3: Choose the disk to format by typing select disk X or select volume X. (Replace "X" with the number of the disk you wish to format.)

Step 4: After selecting the corrupted disk, type the following command and press Enter to format it.

These languages translate to English as: format fs=ntfs quick This is actually a command in the Command Prompt (CMD) of Windows operating systems, not a language. It formats a drive with the NTFS file system quickly.

format hard drive cmd

Once formatted, you'll see the confirmation message DiskPart successfully formatted the volume, after which you can close the elevated Command Prompt window.

3] Run System File Checker and Disk Utility Scan

A corrupted file system can indeed be the source of a corrupted hard drive. Thankfully, you can repair and fix the corrupted hard disk using the System File Checker (SFC) tool. Here's how to run an SFC scan: 1. **Open Command Prompt as Administrator:** - Press the Windows key + X on your keyboard and select "Command Prompt (Admin)" or "Windows PowerShell (Admin)" from the menu. 2. **Run the SFC command:** - In the Command Prompt window, type the following command and press Enter: ``` sfc /scannow ``` 3. **Wait for the scan to complete:** - The SFC scan will now start, and it may take some time to finish, depending on the size of your hard drive and the extent of corruption. 4. **Review the results:** - Once the scan is completed, you'll see a message indicating whether any issues were found and if they were fixed. For example, it might say "Windows Resource Protection did not find any integrity violations." or "Windows Resource Protection found corrupt files and successfully repaired them." 5. **Reboot your computer:** - After the scan, restart your computer for the changes to take effect. 6. **Check for further issues:** - If the SFC scan didn't resolve the issue, you might want to try running the DISM (Deployment Imaging Servicing and Management) tool as well. Type the following commands one by one, pressing Enter after each: ``` dism /online /cleanup-image /restorehealth sfc /scannow ``` Remember that while these tools can often fix corrupted file systems, there's no guarantee they will solve every problem. If the issue persists, you may need professional assistance or consider data recovery options.

Step 1: As an administrator, launch Command Prompt.

Step 2: If you're using Windows 10 or later, copy and paste the following command and press Enter. If you're using an earlier version of Windows, you don't need to run this.

DISM.exe /Online /Cleanup-image /Restorehealth

scan

Following the scan, your computer will automatically connect to the Windows Update service to download and replace any corrupted files.

Step 3: Type the command sfc /scannow and press Enter to run it.

The application will begin checking the integrity of all protected system files and replacing any damaged or missing files. Keep the Command Prompt window open until the scan is 100% complete.

If the hard drive is external, run the following command:

sfc /scannow /offbootdir=X:\ /offwindir=C:\Windows This command translates to: System File Checker /scannow /offlineBootDirectory=X:\ /offlineWindowsDirectory=C:\Windows

Note: Replace "x:" with the letter assigned to your external hard drive. Also, remember to substitute "C:\Windows" with the location where Windows is installed on your computer.

Further Reading: SFC SCANNOW Stuck

These are the two methods to fix a corrupted hard drive. Does it help? If you like it, feel free to hit the social buttons and share it with your friends.

1. 中文 (Chinese): Chinese 2. 英语 (English): English 3. 法语 (French): French 4. 德语 (German): German 5. 西班牙语 (Spanish): Spanish 6. 意大利语 (Italian): Italian 7. 日语 (Japanese): Japanese 8. 韩语 (Korean): Korean 9. 阿拉伯语 (Arabic): Arabic 10. 俄语 (Russian): Russian 11. 葡萄牙语 (Portuguese): Portuguese 12. 印地语 (Hindi): Hindi 13. 泰语 (Thai): Thai 14. 越南语 (Vietnamese): Vietnamese 15. 土耳其语 (Turkish): Turkish 16. 希腊语 (Greek): Greek 17. 荷兰语 (Dutch): Dutch 18. 瑞典语 (Swedish): Swedish 19. 丹麦语 (Danish): Danish 20. 挪威语 (Norwegian): Norwegian 21. 菲律宾语 (Filipino): Filipino 22. 印尼语 (Indonesian): Indonesian 23. 波兰语 (Polish): Polish 24. 匈牙利语 (Hungarian): Hungarian 25. 波斯语 (Persian): Persian 26. 希伯来语 (Hebrew): Hebrew 27. 马来语 (Malay): Malay 28. 芬兰语 (Finnish): Finnish 29. 克罗地亚语 (Croatian): Croatian 30. 罗马尼亚语 (Romanian): Romanian.

Bonus Tip: The Reasons and Symptoms of a Corrupted Hard Drive

Why does a hard drive fail or become corrupted? Here are some leading causes.

    Here are the translations for the languages you've provided in English:
  • Logical damage: Virus infection, bad sectors, unknown file system, unformatted disk, raw file system, and lost or damaged partition table.
  • Physical damage: Short circuits, chip damage, corrupted headers, drops from significant heights, and aging of the hard drive's mechanical components.
  • Manual damage: Incorrect human actions such as unexpected power cuts, removal without safely removing, improper system shutdown, etc.

Corrupted hard drives often manifest by not being recognized or functioning properly. The indicators of a failing or corrupted hard drive can differ, but if you encounter one or more of the issues listed below, it's advisable to handle your hard drive with care.

    Here are the translations for the given text:
  • The majority of your hard drive's files are corrupted or missing.
  • Translation: Most of the files on your hard drive are corrupted or missing.
  • You get an error notice when you connect the hard drive to the computer or attempt to open it. For instance:
  • Translation: You receive an error message when you connect the hard drive to the computer or try to access it, such as:

"X:\ is not accessible. Access is denied."

"You need to format the disk in the drive before using it. Do you want to format it?"

    Here are the translations for the given languages: 1. When checking in Disk Properties, the hard disk shows 0 bytes of free and used space. 2. In Disk Management, the hard disk is displayed as RAW.

Even though your hard drive is corrupted, you don't need to throw it out just yet. The good news is that since your computer recognizes the hard disk, it doesn't have any physical problems that would prevent repair or data recovery. In other words, you can use the Command Prompt on your Windows PC to fix the hard disk issue.

To learn more about repair tools on Windows 11, click the link below:

related articles

Top 8 Windows 11 Repair Tools | 2024 Best Picks

Searching for the best option to fix your Windows computer? Explore the top 8 choices that function as effective Windows 11 repair utilities.

repair tools

Conclusion

Okay, let me translate that into English for you: "So, I hope you understood the steps for using Command Prompt (CMD) to fix a corrupted hard drive. tools Partition Master is an excellent choice for quickly repairing a corrupted hard drive. Additionally, you can utilize other solutions, such as running the chkdsk, diskpart, and sfc scan commands, to address the issue with the corrupted hard drive."

If none of these solutions fix your hard drive, listen for any clicking sounds when you connect it to your PC. Clicking noises suggest physical or mechanical damage, so reach out to a service center.

Frequently Asked Questions About How to Repair a Corrupted Hard Drive Using Command Prompt

Do you have more questions about how to fix a corrupted hard drive using CMD? Check out the following frequently asked questions and their answers:

1. How to fix a corrupted SSD using Command Prompt?

You can use the chkdsk command to fix a corrupted SSD using Command Prompt. Here's how: 1. Open Command Prompt as an administrator: - Press the Windows key + X on your keyboard, then select "Command Prompt (Admin)" from the menu. 2. Type the following command and press Enter: ``` chkdsk /f /r /x C: ``` Replace "C:" with the drive letter of your SSD if it's different. 3. The command will prompt you to schedule the check for the next restart. Type 'Y' and press Enter to confirm. 4. Restart your computer. The chkdsk utility will run during the startup process and scan for any errors on your SSD. 5. Once the scan is complete, your computer will boot normally. If chkdsk found and fixed any issues, your SSD should be less corrupted. Note: The `/f` switch tells chkdsk to fix any errors it finds, `/r` searches for bad sectors and recovers readable information, and `/x` forces the volume to dismount before checking, ensuring no programs are accessing the drive during the process.

Step 1: Type "CMD" into the Windows search bar, right-click on the result, and select "Run as administrator" from the context menu.

Step 2: Copy the command provided below and press Enter:

chkdsk C: /f /r /x

Note: Replace the letter C with the letter of your corrupted hard drive.

**2. Can I reset the hard drive using CMD?**

Yes, you can reset your hard drive using DiskPart. To do this, follow these steps: 1. Press `Windows + X` on your keyboard and choose "Command Prompt (Admin)" or "Windows Terminal (Admin)" to open an elevated command prompt. 2. Type `diskpart` and press Enter. This will launch the DiskPart utility. 3. Once inside DiskPart, type `list disk` and press Enter. This will display a list of all the disks connected to your computer. 4. Identify the correct disk you want to reset (usually Disk 0 or Disk 1) and type `select disk ` replacing `` with the disk number, then press Enter. 5. Now, type `clean` and press Enter. This command will erase all partitions and data on the selected hard drive, preparing it for a fresh setup. 6. After the cleaning process is complete, you can create new partitions and format them as needed using the `create partition primary`, `format fs= quick`, and `assign` commands. Remember that this process will permanently delete all data on the selected drive, so make sure you have backups of important files before proceeding.

3. How to check disk errors using CMD?

Any errors discovered are located and corrected using the chkdsk/F /R command. On the C: drive, CHKDSK (without any parameters) initiates an analysis utility that scrutinizes the file system, security descriptors, file name connectivity, and file system structure. Disk errors are rectified through CHKDSK /F. The CHKDSK /R command identifies corrupt sectors and recovers readable data.