Are you suffering from the BSOD error or other device issues? Your computer has probably become corrupted, leading to a system crash and data loss. Don’t worry. This MiniTool post shows specific steps to fix corrupted hard drive using CMD and recover data from the corrupted hard drive.

It is a common issue that people fail to start their computers normally. File system damage, human errors, virus infections, boot sector corruption, and other reasons can lead to computer corruption. This post mainly tells you how to fix corrupted hard drive using CMD, but before this, you need to recover data from the corrupted hard drive to avoid data loss during the repair process.

Recover Data from Corrupted Hard Drive

If you can successfully boot the computer, backing up your files on this computer to another device is the best method to protect data. Since there should be numerous files on your computer, using professional backup software is time-saving and secure. MiniTool ShadowMaker works well in backing up files, folders, partitions, and disks. MiniTool ShadowMaker Trial allows you to enjoy a 30-day free trial. You can enjoy the backup features with this edition.

MiniTool ShadowMaker TrialClick to Download100%Clean & Safe

back up files

If your computer can’t boot up, you need to recover files from this computer immediately with the assistance of professional data recovery software, like MiniTool Power Data Recovery. This file recovery software is capable of restoring files from unbootable devices, formatted drives, damaged devices, and more.

To recover files from the corrupted hard drive, you need to create a bootable media with MiniTool Power Data Recovery Bootable Builder then make the computer boot from it. Your computer will launch MiniTool Power Data Recovery automatically after launching; thus, you can run this software to secure files from it.

MiniTool Power Data Recovery FreeClick to Download100%Clean & Safe

recover files from an unbootable computer
Convenient Way to Recover Data After a Hard Drive Crash
Convenient Way to Recover Data After a Hard Drive Crash

Do you know how to recover data after a hard drive crash? If don’t know, you can read this post and try the methods here.

Read More

Fix Corrupted Hard Drive Using CMD

If you can start your computer, just follow the steps below to run the different command lines.

If the computer fails to boot up, you can boot to Command Prompt via Windows Recovery Environment. After entering WinRE, you need to choose Troubleshoot > Advanced options > Command Prompt. In the following interface, choose an account and input the correct password to open Command Prompt.

open Command Prompt

#1. Run the CHKDSK Command

The file system is the way that the computer organizes files. If, unfortunately, the file system is corrupted or unreadable, your computer may be unable to boot normally. The CHKDSK utility can detect and fix file system errors and keep your system data well-organized. Here is how to use CHKDSK to repair disk. If you launch Command Prompt via Windows Recovery Environment, you can start with Step 3 directly.

Step 1: Press Win + R to open the Run window.

Step 2: Type cmd into the box and press Shift + Ctrl + Enter to run Command Prompt as administrator.

Step 3: Type CHKDSK x: /f and hit Enter. You need to change x with the drive letter of the hard drive you need to repair.

run the CHKDSK command

Adding different parameters can perform different functions:

  • /f: find and fix all hard drive errors.
  • /r: find corrupted sectors and restore readable data on them.
Fix Windows Stuck in a CHKDSK Loop & Perform Data Recovery
Fix Windows Stuck in a CHKDSK Loop & Perform Data Recovery

What to do if you find Windows stuck in a CHKDSK loop? This post explains two methods to help you resolve this problem.

Read More

#2. Run the SFC and DISM Command

When there are corrupted or damaged system files, your computer is probably prevented from booting. You can run the SFC and DISM command lines to find and repair corrupted system files.

Step 1: Type Command Prompt into the Windows Search bar, then right-click on the best-matched result to choose Run as administrator from the context menu.

Step 2: Type sfc /scannow and press Enter to execute this command.

run the SFC command

Step 3: Wait for the process to complete. Type DISM /Online /Cleanup-Image /Restorehealth

and hit Enter.

run the DISM command

#3. Run the DiskPart Command

The last method to repair corrupted drive using CMD is running the DiskPart command line to format the hard drive. DiskPart is used to partition, format, create, or resize a partition or to complete other operations. Here are the specific steps to fix corrupted hard drive using CMD.

Step 1: Run Command Prompt as administrator.

Step 2: Type the following command lines and hit Enter at the end of each one.

  • diskpart
  • list disk
  • select disk 1
  • clean
  • create partition primary
  • format fs=NTFS quick
  • exit
run the DiskPart command

Bottom Line

After reading this post, hope you know how to repair hard disk using CMD. Different command lines have different functions in repairing a corrupted hard drive. You need to be careful when running command lines.

The most important thing is to ensure the security of data on this corrupted hard drive. You can run MiniTool Power Data Recovery to retrieve files from it.

MiniTool Power Data Recovery FreeClick to Download100%Clean & Safe

The best way to ensure data security is to back them up periodically since data loss always happens unexpectedly.

  • linkedin
  • reddit