crypto_LUKS 驱动器上的超级块问题

crypto_LUKS 驱动器上的超级块问题

当我尝试从主驱动器启动时,出现以下错误:

在此输入图像描述

该消息显示“发现属于损坏的孤立链接列表一部分的索引节点”,所以我尝试了这个 -https://askubuntu.com/questions/651577/dev-sda1-inodes-that-were-part-of-a-corrupted-orphan-linked-list-found- 并得到:

:~$ sudo fsck /dev/sda5 
fsck from util-linux 2.20.1
fsck: fsck.crypto_LUKS: not found
fsck: error 2 while executing fsck.crypto_LUKS for /dev/sda5

我的问题似乎与此类似 -如何解决e2fsck超级块问题?- 但该解决方案对我不起作用。

当我尝试该解决方案(在辅助驱动器上运行)时:

:~$ sudo e2fsck -b 163840 /dev/sda5
e2fsck 1.42.9 (4-Feb-2014)
e2fsck: Invalid argument while trying to open /dev/sda1

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>

/dev/sda5 contains a crypto_LUKS file system

我不能 100% 确定加密的驱动器是解决方案不起作用的原因;也许事实并非如此。但我还可以采取哪些其他方法来解决这个问题?

如果我可以提供更多信息,请告诉我。

答案1

根逻辑卷上的文件系统已损坏,而不是 LUKS 设备本身。/dev/sda5是保存 LUKS/dm-crypt 设备的分区,具有加密(以及您也在使用的 LVM),存储分层工作,您不能fsck在 LUKS(加密)层上运行,您必须在LVM 逻辑卷层——/dev/mapper/trisquel--vg-root在您的情况下。

如果您从 LUKS 设备已解锁的 initramfs 运行此命令(您之前提供了密码),则需要运行fsck /dev/mapper/trisquel--vg-root.如果您从 LiveCD 运行此程序,则需要首先手动解锁加密驱动器(您可以通过双击加密驱动器从 GUI 简单地完成此操作,或者手动使用密码设置),然后运行相同的fsck /dev/mapper/trisquel--vg-root命令。

答案2

您正在尝试 fsck 错误的事情。 Fsck 认为该分区是 LUKS 加密的。从这张照片来看,您似乎也在使用 LVM。

所以我猜你有一个用 LUKS 加密的 LVM 物理卷。

照片显示您已被扔进紧急外壳中。我怀疑发生这种情况时,加密驱动器已解锁并且卷组(和逻辑卷)已被映射......

...所以您应该能够从紧急 shell 中 fsck 逻辑卷:

fsck /dev/mapper/trisquel--vg-root

相关内容