gpt4 book ai didi

linux - 如何修复损坏的 linux luks 加密 ext4

转载 作者:太空狗 更新时间:2023-10-29 11:19:18 31 4
gpt4 key购买 nike

有人可以帮帮我吗?我有一个 320GB 的硬盘驱动器,我将其分区为 20GB fat32 和 300GB 为 ext4,使用 luks 加密,密码为“guess”。 20gb fat32 打开没有任何问题。但是当我尝试打开它时,出现以下错误:

Error unlocking /dev/sdc2: Command-line 
`cryptsetup luksOpen "/dev/sdc2" "luks-6be73c00-88e7-4dd8-abf0-d5aaaaceec73" '
exited with non-zero exit status 2: No key available with this passphrase.

我尝试了一些我在谷歌中找到的帮助,但我没有运气。这是我试过的:

**fdisk -l /dev/sdc.**

Disk /dev/sdc: 320.1 GB, 320072932352 bytes
255 heads, 63 sectors/track, 38913 cylinders, total 625142446 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
Disk identifier: 0xe0046ef8

Device Boot Start End Blocks Id System
/dev/sdc1 * 2048 40962047 20480000 c W95 FAT32 (LBA)
/dev/sdc2 40964096 625142445 292089175 83 Linux

**mke2fs -n /dev/sdc2**

mke2fs 1.42.8 (20-Jun-2013)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
18259968 inodes, 73022293 blocks
3651114 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
2229 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872, 71663616

**e2fsck -b “blockNumber” /dev/sdc2**

对于所有的 block 号,但仍然没有运气。

**cryptsetup -v luksDump /dev/sdc2**

Version: 1
Cipher name: aes
Cipher mode: cbc-essiv:sha256
Hash spec: sha1
Payload offset: 4096
MK bits: 256
MK digest: 8d 3e b6 ab 3f de 35 6c 1e 54 6f 90 d8 2d 27 9c 80 c7 8c d2
MK salt: b3 fc 8c 29 aa a3 68 3c 30 d2 24 a2 41 b4 23 80
b3 cb 13 04 4f 78 ca 7f bf 8e 14 12 62 be ff 0a
MK iterations: 11875
UUID: 6be73c00-88e7-4dd8-abf0-d5aaaaceec73

Key Slot 0: ENABLED
Iterations: 158382
Salt: 82 63 fc 86 5e 0b d7 9b c6 9a ee a6 5b e9 ce 7b
0f 84 68 92 cf 8a bf 58 19 cd 06 4d e5 c1 b3 44
Key material offset: 8
AF stripes: 4000

Key Slot 1: DISABLED
Key Slot 2: DISABLED
Key Slot 3: DISABLED
Key Slot 4: DISABLED
Key Slot 5: DISABLED
Key Slot 6: DISABLED
Key Slot 7: DISABLED
Command successful.

**cryptsetup -v luksOpen /dev/sdc2 sdc2_crypt**

我正确输入了密码,但我得到了这个:-

Enter passphrase for /dev/sdc2: 
No key available with this passphrase.
Enter passphrase for /dev/sdc2:
No key available with this passphrase.
Enter passphrase for /dev/sdc2:
No key available with this passphrase.

我真的需要帮助。

最佳答案

No key available with this passphrase

那只是错误的密码。除非您获得正确的密码,否则您无能为力。

也许某些东西损坏了 LUKS header ,如果您有 header 的备份仍然有效,您可以尝试一下,参见 --header-backup-fileman cryptsetup .

或者如果您有主 key 的备份,您可以尝试 --master-key-file

否则就没有办法绕过或通过加密(毕竟这就是它的意义:-)

关于linux - 如何修复损坏的 linux luks 加密 ext4,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22389222/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com