科技界可能发生的最可怕的事件之一是存储介质损坏,例如内部或外部硬盘驱动器、闪存驱动器、存储卡等。如果存储介质包含一些内容,该事件甚至可能引发小型心脏病发作重要数据(家庭照片或视频、工作相关文件等)。一些表明硬盘驱动器损坏的迹象是错误消息,例如“未找到扇区”、“您需要先格式化磁盘才能使用它。您现在要格式化吗?', 'X: 不可访问。访问被拒绝。',(Access)磁盘管理(Disk Management)中的'RAW'状态,文件名开始包括 & * # % 或任何此类符号等。
现在,根据存储介质的不同,损坏可能是由不同的因素引起的。硬盘(Hard)损坏最常见的原因是物理损坏(如果硬盘发生故障)、病毒攻击、文件系统损坏、坏扇区或仅仅是由于老化。在大多数情况下,如果损坏不是物理和严重的,则可以通过修复/修复磁盘本身来检索损坏的硬盘中的数据。Windows有一个用于内部和外部硬盘驱动器的内置错误检查器。除此之外,用户可以在提升的命令提示符下运行一组命令来修复损坏的驱动器。
在本文中,我们将向您展示可用于修复或修复 Windows 10 中损坏的硬盘驱动器的多种方法。( repair or fix corrupted hard drive in Windows 10.)
如何使用 CMD 修复或修复损坏的硬盘?(How to Repair or Fix Corrupted Hard Drive Using CMD?)
首先,确保您备份了损坏磁盘中包含的数据,如果没有,请使用第三方应用程序检索损坏的数据。一些流行的数据恢复应用程序是DiskInternals Partition Recovery、免费的 EaseUS 数据恢复向导(Free EaseUS Data Recovery Wizard)、MiniTool Power 数据恢复软件(MiniTool Power Data Recovery Software)和CCleaner的Recuva。其中每一个都有一个免费试用版和一个带有附加功能的付费版本。我们有一整篇文章专门介绍各种数据恢复软件及其提供的功能 - 9 款最佳免费数据恢复软件(9 Best Free Data Recovery Software)。
此外,尝试将硬盘驱动器USB电缆连接到不同的计算机端口或完全连接到另一台计算机。确保电缆本身没有故障,如果可用,请使用另一根电缆。如果损坏是由病毒引起的,请执行防病毒扫描(Settings > Update和Security > Windows Security > Virus和威胁防护>立即扫描(Scan))以删除所述病毒并修复硬盘驱动器。如果这些快速修复都不起作用,请转到下面的高级解决方案。
(5 )使用命令提示符 (CMD) 修复损坏硬盘的(Ways to Fix Corrupted Hard Drive using Command Prompt (CMD)
)5 种方法
方法 1:更新磁盘驱动程序
如果硬盘驱动器可以在另一台计算机上成功使用,则很可能您的磁盘驱动程序需要更新。许多人可能都知道,驱动程序是帮助硬件组件与计算机软件有效通信的软件文件。这些驱动程序由硬件制造商不断更新,它们可能会因Windows(Windows)更新而损坏。要更新计算机上的磁盘驱动程序 -
1.按Windows key + R运行(Run)命令框,键入devmgmt.msc,然后单击确定( OK)打开设备管理器( Device Manager)。
2.展开磁盘驱动器和通用串行总线控制器( Expand Disk Drives and Universal Serial Bus Controllers)以找到损坏的硬盘驱动器。驱动软件过时或损坏的硬件设备将标有黄色感叹号。(yellow exclamation mark.)
3.右键单击(Right-click )损坏的硬盘并选择更新驱动程序(Update Driver)。
4. 在以下屏幕中,选择“自动搜索更新的驱动程序软件”(‘Search automatically for updated driver software’)。
您也可以从硬盘制造商的网站手动下载最新的驱动程序。只需(Simply)在Google上搜索“ *Hard drive brand* 驱动程序”,然后单击第一个结果。下载驱动程序的.exe文件并像安装任何其他应用程序一样安装它。
另请阅读:(Also Read:) 如何在 Windows 10 中修复损坏的系统文件(How to Repair Corrupted System Files in Windows 10)
方法 2:执行磁盘错误检查(Disk Error Checking)
如前所述,Windows有一个内置工具来修复损坏的内部和外部硬盘驱动器。通常,一旦检测到有故障的硬盘驱动器连接到计算机, Windows就会自动提示用户执行错误检查,但用户也可以手动运行错误扫描。(Windows)
1.通过双击桌面快捷方式图标或使用热键组合Windows key + E打开Windows 文件资源管理器(Windows File Explorer)(或我的电脑) 。
2.右键单击(Right-click )您要修复的硬盘驱动器,然后从随后出现的上下文菜单中选择“属性”。(Properties )
3. 移至“属性”窗口的“工具”选项卡。(Tools )
4. 单击错误检查部分下的检查(Check )按钮。Windows现在将自动扫描并修复所有错误。
方法 3:运行 SFC 扫描
由于文件系统损坏,硬盘驱动器也可能出现异常。幸运的是,系统文件检查器(System File Checker)实用程序可用于修复或修复损坏的硬盘驱动器。
1. 按Windows key + S调出开始搜索(Start Search)栏,键入命令提示符(Command Prompt )并选择以管理员身份运行(Run as Administrator)选项。
2. 在请求允许应用程序更改系统的用户帐户控制(User Account Control)弹出窗口中单击是。(Yes )
3. Windows 10、8.1 和 8 用户应先运行以下命令。Windows 7 用户可以跳过此步骤。(Windows 7 users can skip this step.)
DISM.exe /Online /Cleanup-image /Restorehealth
4. 现在,在命令提示符中输入 sfc /scannow回车(Enter)执行。
5. 该实用程序将开始验证所有受保护系统文件的完整性并替换任何损坏或丢失的文件。在验证达到 100% 之前不要关闭命令提示符。(Command Prompt)
6. 如果硬盘是外置硬盘,请运行以下命令而不是sfc /scannow:
sfc /scannow /offbootdir=X:\ /offwindir=C:\Windows
注意:(Note:)将“ x:\” 替换为 分配给外部硬盘驱动器的字母。另外,不要忘记将“C: Windows ”替换为安装(Windows)Windows的目录。
7. 扫描完成后重新启动计算机(Restart your computer)并检查您现在是否可以访问硬盘驱动器。
方法 4:使用 CHKDSK 实用程序
除了系统文件检查器之外,还有另一个实用程序可用于修复损坏的存储介质。检查磁盘实用程序允许用户通过检查特定卷的文件系统和文件系统元数据来扫描逻辑和物理磁盘错误。(file system metadata)它还有许多与之关联的开关来执行特定的操作。让我们看看如何使用CMD(CMD)修复损坏的硬盘:
1.再次以管理员身份打开命令提示符。(Open Command Prompt)
2. 仔细输入以下命令并回车(Enter)执行。
chkdsk X: /F
注意:将 X 替换(Replace X)为您要修复/修复的硬盘驱动器的盘符。
除了 /F 参数之外,您还可以将其他几个参数添加到命令行。不同的参数及其作用如下:
- /f – 查找(– Finds)并修复硬盘驱动器上的所有错误。
- /r - 检测磁盘上的任何坏扇区并恢复可读信息
- /x – 在进程开始之前卸载驱动器
- /b – 清除(– Clears)所有坏簇并重新扫描所有已分配和空闲簇以查找卷上的错误(仅与NTFS 文件系统一起(NTFS File System)使用(Use))
3.您可以将以上所有参数添加到命令中以运行更细致的扫描。在这种情况下,G 驱动器的命令行将是:
chkdsk G: /F /R /X
4. 如果您正在修复内部驱动器,程序会要求您重新启动计算机。按 Y(Press Y),然后输入以从命令提示符本身重新启动。
方法 5:使用 DiskPart 命令
如果上述两个命令行实用程序都无法修复损坏的硬盘驱动器,请尝试使用DiskPart实用程序对其进行格式化。DiskPart实用程序允许您将RAW硬盘驱动器强制格式化为NTFS/exFAT/FAT32。您还可以从Windows 文件资源管理器(Windows File Explorer)或磁盘管理(Disk Management)应用程序(如何在 Windows 10 上格式化硬盘(How to Format Hard Drive on Windows 10))格式化硬盘。
1.以管理员身份再次启动命令提示符。(Command Prompt)
2. 执行diskpart命令。
3.输入list disk或list volume并回车(Enter),查看连接到您计算机的所有存储设备。
4. 现在,通过执行命令select disk X(select disk X )或select volume X选择需要格式化的磁盘。(将 X 替换(Replace X)为您要格式化的磁盘编号。)
5. 选择损坏的磁盘后,format fs=ntfs quick并按Enter以格式化该磁盘。
6. 如果您想将磁盘格式化为FAT32,请改用以下命令:
format fs=fat32 quick
7. 命令提示符将返回确认消息' DiskPart 已成功格式化卷(DiskPart successfully formatted the volume)'。完成后,键入exit并按Enter关闭提升的命令窗口。
受到推崇的:(Recommended:)
我们希望本指南对您有所帮助,并且您能够在 Windows 10 中使用 CMD 修复或修复损坏的硬盘驱动器。(repair or fix corrupted hard disk drive using CMD in Windows 10.)如果没有,请在将硬盘驱动器连接到计算机时留意任何咔嗒声。咔哒声表示损坏是物理/机械损坏,在这种情况下,您需要联系服务中心。
How to Repair or Fix Corrupted Hard Drive Using CMD?
One of the most terrifying incidents that can happen in the tech world iѕ 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 thе storаge media cоntained some important data (family pictures or videos, work-related files, etc.). A few signs that indicate a сorrupt hard drive are error messages like ‘Ѕector not found.’, ‘Yоu neеd to format the disk before you can use it. Do you wаnt to format іt now?’, ‘X:\ is not accessible. Acceѕs is denied.’, ‘RAW’ status in Disk Managеment, file names start including & * # % or any sυch 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.
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.
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-
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.