使用parted缩小分区后无法安装外部硬盘

使用parted缩小分区后无法安装外部硬盘

我通过缩小外部硬盘驱动器中的 NTFS 分区来调整其大小,然后从第一个分区的末尾开始创建第二个 fat32 分区。我还将启动标志从 NTFS 分区切换到 FAT32 分区。

退出 parted 后,插入后新的 FAT32 分区会自动挂载,但无法使用udisksctl手动挂载或挂载第一个 NTFS 分区。后者给我:

[user@host mnt]# mount /dev/sdd1 /mnt/volume
ntfs_attr_pread_i: ntfs_pread failed: Input/output error
Failed to calculate free MFT records: Input/output error
NTFS is either inconsistent, or there is a hardware fault, or it's a
SoftRAID/FakeRAID hardware. In the first case run chkdsk /f on Windows
then reboot into Windows twice. The usage of the /f parameter is very
important! If the device is a SoftRAID/FakeRAID then first activate
it and mount a different device under the /dev/mapper/ directory, (e.g.
/dev/mapper/nvidia_eahaabcc1). Please see the 'dmraid' documentation

我尝试ntfsfix /dev/sdX修复 ntfs 分区,下面的输出表明它解决了问题,但我仍然无法安装它:

    [user@host mnt]# ntfsfix /dev/sdd1
Mounting volume... Failed to read last sector (976769198): Invalid argument
HINTS: Either the volume is a RAID/LDM but it wasn't setup yet,
   or it was not setup correctly (e.g. by not using mdadm --build ...),
   or a wrong device is tried to be mounted,
   or the partition table is corrupt (partition is smaller than NTFS),
   or the NTFS boot sector is corrupt (NTFS size is not valid).
FAILED
Attempting to correct errors... Failed to read last sector (976769198): Invalid argument
HINTS: Either the volume is a RAID/LDM but it wasn't setup yet,
   or it was not setup correctly (e.g. by not using mdadm --build ...),
   or a wrong device is tried to be mounted,
   or the partition table is corrupt (partition is smaller than NTFS),
   or the NTFS boot sector is corrupt (NTFS size is not valid).
FAILED
Failed to startup volume: Invalid argument
Failed to read last sector (976769198): Invalid argument
HINTS: Either the volume is a RAID/LDM but it wasn't setup yet,
   or it was not setup correctly (e.g. by not using mdadm --build ...),
   or a wrong device is tried to be mounted,
   or the partition table is corrupt (partition is smaller than NTFS),
   or the NTFS boot sector is corrupt (NTFS size is not valid).
Trying the alternate boot sector
The alternate bootsector is usable
Set sector count to 937497952 instead of 976769199
Rewriting the bootsector
The boot sector has been rewritten

Processing $MFT and $MFTMirr...
Reading $MFT... OK
Reading $MFTMirr... OK
Comparing $MFTMirr to $MFT... OK
Processing of $MFT and $MFTMirr completed successfully.
Setting required flags on partition... OK
Going to empty the journal ($LogFile)... OK
Checking the alternate boot sector... FIXED
NTFS volume version is 3.1.
NTFS partition /dev/sdd1 was processed successfully.
  • 可能是我更改了标志,还是缩小和增长导致了这个问题?
  • 显示的最终尺寸与和显示的parted不同。后者是 465G,而显示的是 500G,因此有点混乱该跟随哪一个。我最终使用了 500G,因为我使用的是not 。fdisklsblkpartedpartedfdisk
  • 是否有任何已知的解决方案可以恢复分区以便可以再次安装它?

更新

在 Windows 和 中尝试过chkdisk /f和。chkdisk /r"I'm getting corrupt master file table, chkdsk aborted"

答案1

可能是我更改了标志,还是缩小和增长导致了这个问题?

你的问题是由收缩和增长引起的。此类操作始终是危险的,因此如果数据很重要,则在没有现有备份的情况下切勿执行。

是否有任何已知的解决方案可以恢复分区以便可以再次安装它?

最好的解决方案是不要费心恢复它,而是重新格式化分区并从备份中恢复文件。

如果这不可能,您的第二个最佳选择是尝试修复 Windows 中的分区。

第三个选择是删除 FAT 分区并将 NTFS 分区的大小调整回原来的样子。也许之后再服用第二剂ntfsfix就能解决问题,但此时不要指望有任何奇迹。

ntfsfix 是一个修复一些常见 NTFS 问题的实用程序。 ntfsfix 不是 chkdsk 的 Linux 版本。它仅修复一些基本的 NTFS 不一致问题、重置 NTFS 日志文件并安排首次启动 Windows 时进行 NTFS 一致性检查。

如果您认为 NTFS 卷已被 Windows 或其他方式损坏并且无法安装,您可以在该卷上运行 ntfsfix。 -https://linux.die.net/man/8/ntfsfix

相关内容