修复没有Windows的损坏的NTFS分区

我的NTFS分区已经以某种方式腐败了(这是我安装Windows的日子里的遗物)。

GParted截图显示了不同的分区

我把fdisk和blkid的调试输出放在这里 。

同时,任何操作系统都无法挂载我的根分区,该分区位于我的NTFS分区旁边。 不过,我不确定这是否与它有关。 尝试安装我的根分区(sda5)时出现以下错误

mount: wrong fs type, bad option, bad superblock on /dev/sda5, missing codepage or helper program, or other error In some cases useful info is found in syslog - try dmesg | tail or so ubuntu@ubuntu:~$ dmesg | tail [ 1019.726530] Descriptor sense data with sense descriptors (in hex): [ 1019.726533] 72 03 11 04 00 00 00 0c 00 0a 80 00 00 00 00 00 [ 1019.726551] 1a 3e ed 92 [ 1019.726558] sd 0:0:0:0: [sda] Add. Sense: Unrecovered read error - auto reallocate failed [ 1019.726568] sd 0:0:0:0: [sda] CDB: Read(10): 28 00 1a 3e ed 40 00 01 00 00 [ 1019.726584] end_request: I/O error, dev sda, sector 440331666 [ 1019.726602] JBD: Failed to read block at offset 462 [ 1019.726609] ata1: EH complete [ 1019.726612] JBD: recovery failed [ 1019.726617] EXT4-fs (sda5): error loading journal 

当我打开gparted(使用live CD)时,我的NTFS驱动器旁边会有一个感叹号 GParted屏幕截图显示错误

有没有办法在不使用Windows的情况下运行chkdsk

我尝试运行fsck导致以下结果:

 ubuntu@ubuntu:~$ sudo fsck /dev/sda fsck from util-linux-ng 2.17.2 e2fsck 1.41.14 (22-Dec-2010) fsck.ext2: Superblock invalid, trying backup blocks... fsck.ext2: Bad magic number in super-block while trying to open /dev/sda The superblock could not be read or does not describe a correct ext2 filesystem. If the device is valid and it really contains an ext2 filesystem (and not swap or ufs or something else), then the superblock is corrupt, and you might try running e2fsck with an alternate superblock: e2fsck -b 8193  

更新:我能够修复从Hiren的BootCD运行chkdsk的NTFS分区,但似乎超级块问题仍然存在。

更新2:修复了使用e2fsck -c /dev/sda5超级块问题

使用sudo apt-get install ntfs-3g 。 然后在NTFS分区上运行ntfsfix命令。

例如:

ntfsfix /dev/hda6

ntfsfix v2.0.0(libntfs 10:0:0)

用法:ntfsfix [options]设备

 Attempt to fix an NTFS partition. -h, --help Display this help -V, --version Display version information 

开发者的电子邮件地址:

linux-ntfs-dev@lists.sf.net Linux NTFS主页: http : //www.linux-ntfs.org


对于较新的Ubuntus您可以一起使用-b-d选项。 -b尝试修复坏簇,使用-d修复脏状态。 所以命令可以

 sudo ntfsfix -b -d /dev/sda6 

--help显示他们

 ntfsfix v2015.3.14AR.1 (libntfs-3g) Usage: ntfsfix [options] device Attempt to fix an NTFS partition. -b, --clear-bad-sectors Clear the bad sector list -d, --clear-dirty Clear the volume dirty flag -h, --help Display this help -n, --no-action Do not write anything -V, --version Display version information 

我刚刚使用“testdisk”修复了我的USB驱动器,这是一个Linux命令行(还是友好的)实用工具。 我的驱动器甚至没有安装在Windows和Windows 8中发现像6个分区(当驱动器只有一个)。

要使用该实用程序,请安装它:

 sudo apt-get install testdisk 

然后运行它:

 sudo testdisk 

并按照说明操作。 您必须搜索分区,然后编写更改。

希望这有助于任何人。

只是为了清楚你的一些观点。

我尝试运行fsck导致以下结果:

 ubuntu@ubuntu:~$ sudo fsck /dev/sda ... fsck.ext2: Bad magic number in super-block while trying to open /dev/sda 

现在,这并不奇怪,因为你试图fsck磁盘,而不是它的分区。 fsck的作用是,它试图识别FS类型。 因为你已经给它原始磁盘表面,它无法识别并转换为默认类型 – ext,调用fsck.ext。

fsck.ext在该位置找不到任何FS签名并尝试查找超级块。 最终它失败了,因为它的磁盘只有NTFS分区类型。

这就是您遇到此错误的原因。

正确的命令是:

 sudo fsck /dev/sda1 

这将提供第一个SATA硬盘驱动器的FIRST分区,而不是第一个sata磁盘本身。

你的磁盘是烤面包。 检查磁盘实用程序中的SMART诊断以确认; 它应该说你有大量的坏扇区需要更换驱动器。

我同意@psusi:磁盘需要更换,请参阅我接受的答案中的评论。 做一个ntfsfix ,只是延迟了以下的基本动作:

  1. 尽快备份磁盘上的所有数据
  2. 用新的磁盘替换磁盘

没有必要真正检查SMART诊断 – 他们只会收集一定比例的错误。 红旗是两行:

 [ 1019.726558] sd 0:0:0:0: [sda] Add. Sense: **Unrecovered read error** - auto reallocate failed [ 1019.726602] JBD: **Failed to read block** at offset 462 

一旦磁盘开始提供不可恢复的读取错误(URE),就应立即将其替换并仅用于数据恢复。 (过多的非URE也表示需要更换。)

磁盘应被视为必须每隔几年更换一次的耗材,因此具有非常好的备份(自动,每日,完整,至少对外部驱动器)至关重要。

在Ubuntu 14.04中试试吧

 sudo ntfsfix /dev/sdXY 

XY是你的分区。 (在你的情况下/dev/sda2

正如其他答案所说,在这种情况下它可能是一个糟糕的磁盘..

但是为了让其他人面临实际的NTFS损坏 – 不幸的是,与微软的chkdsk相比,ntfsfix工具非常有限。 尝试安装Windows – 最好是使用最新版本的Windows,因为微软可能会不断改进chkdsk(我希望……)新版本的Windows通常可以作为试用版免费提供。 如果问题出在USB磁盘中,您可以尝试在VirtualBox中安装Windows,并为USB设备提供VM控制。

不幸的是,Linux上提供的免费工具在修复NTFS分区方面非常有限。

您很可能仍然可以使用存储在磁盘末尾的辅助MFT来恢复数据。 它通常不使用,但它应包含目录结构的最新版本。 它很可能不受磁盘错误的影响。

在过去,我使用Runtime Software(商业,79美元)产品GetDataBack NTFS取得了巨大成功。 它是在WINE和Linux LiveCD中运行的为数不多的NTFS工具之一(唯一?),免费演示应足以查看您的数据是否仍然存在。 如果是,您的数据可能值得购买该工具。

LiveCD运行Knoppix Linux并预装了所有工具。 请注意,您仍然需要许可证密钥来实际使用这些工具,但它应该足以查看它是否适用于您的计算机。

免责声明: 除了几年前购买产品之外,我与Runtime软件没有任何关系。

这个答案可能适用于10.04(清晰)和更高版本的Ubuntu!

试试sudo ntfsfix -b /dev/sda2

  • 你需要ntfs-3g 安装ntfsprogs 安装。 如果您没有,可以通过单击该链接在软件中心中安装它,或者通过运行以下命令从终端( Ctrl + Alt + T )安装它:

     sudo apt-get update sudo apt-get install ntfs-3g