0

在 linux 中,fsck gpt 外置硬盘 fsck 无法检查 gpt 分区的外置硬盘。

该怎么办?我无法 fsck 该磁盘的文件系统!如何检查我的文件系统?我做错了什么?

以下是有关我的外置硬盘的一些信息。

  elias@eliasc:~$ sudo fdisk -l /dev/sdc
    Disk /dev/sdc: 931.5 GiB, 1000170586112 bytes, 1953458176 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disklabel type: gpt
    Disk identifier: 66BAEFE2-F3F9-491C-B40F-C964F28AE483
    
    Device     Start        End    Sectors   Size Type
    /dev/sdc1   2048 1953456127 1953454080 931.5G Microsoft basic data

 elias@eliasc:~$ sudo fsck  /dev/sdc
    fsck from util-linux 2.31.1
    e2fsck 1.44.1 (24-Mar-2018)
    ext2fs_open2: Bad magic number in super-block
    fsck.ext2: Superblock invalid, trying backup blocks...
    fsck.ext2: Bad magic number in super-block while trying to open /dev/sdc
    
    The superblock could not be read or does not describe a valid ext2/ext3/ext4
    filesystem.  If the device is valid and it really contains an ext2/ext3/ext4
    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 <device>
     or
        e2fsck -b 32768 <device>
    
    Found a gpt partition table in /dev/sdc

sudo  gdisk /dev/sdc
GPT fdisk (gdisk) version 1.0.3

Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with protective MBR; using GPT.

Command (? for help): i
Using 1
Partition GUID code: EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 (Microsoft basic data)
Partition unique GUID: 593BA7FF-C46F-4A0E-BAAF-FF505C0425F8
First sector: 2048 (at 1024.0 KiB)
Last sector: 1953456127 (at 931.5 GiB)
Partition size: 1953454080 sectors (931.5 GiB)
Attribute flags: 0000000000000000
Partition name: 'MyPassport'

Command (? for help): v

No problems found. 4029 free sectors (2.0 MiB) available in 2
segments, the largest of which is 2015 (1007.5 KiB) in size.
4

1 回答 1

0

截至 2020 年 7 月 15 日,Linux 下无法检查格式化为 NTFS 的硬盘的文件系统完整性。

我做了什么?

  • 我将 Windows Enterprise 的免费试用版下载为 ISO
  • sudo apt-get remove Virtualbox virtualbox-dkms virtualbox*
  • 从这里安装最新的 Virtualbox
  • 下载Virtualbox extpack的匹配版本
  • 由于访问拒绝硬盘错误,我以用户身份添加到磁盘组
    • sudo usermod -a -G disk $USER
    • sudo usermod -a -G vboxusers $USER
  • sudo /sbin/vboxconfig
  • 运行 VirtualBox,并在 File -> Preferences -> Extentions 中添加 Virtualbox extpack
  • 重启你的电脑
  • 使用 NTFS(USB 或非 USB)创建指向物理硬盘的链接 VBoxManage internalcommands createrawvmdk -filename "</path/to/file>.vmdk" -rawdisk /dev/sdX
  • 创建机器 -> 新建 -> Windows 10(64 位)(任意匹配) -> 创建虚拟磁盘
  • 附加下载的 Windows Enterprise 免费试用版 ISO 映像
  • 在您新创建的虚拟 Windows 映像 -> 首选项 -> 存储 -> 附加 ntfs 硬盘的 vmdk 映像
  • 它可能会失败。不用担心。对我来说也失败了。我提到它,因为我找到了它。它可能对你有用。
  • 转到虚拟 Windows 映像 --> 首选项 -> USB,检查 USB 3,添加您的 NTFS 硬盘
  • 运行您的虚拟“Windows Enterprise 免费试用”机器。
  • 单击继续,修复您的计算机(在左下方),故障排除,运行命令提示符
  • 通过写入例如转到您的磁盘。C:
  • 检查它是否是您的磁盘,例如。目录
  • 在磁盘上运行 chkdsk /f

这个过程修复了我的 NTFS 文件系统,它是错误的。我希望它也对你有帮助。

如果您发现任何更简单的解决方案,仅在 Linux 下,请发布。

于 2020-07-15T05:33:22.230 回答