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

时间:2014-03-13 19:41:43

标签: linux

有人可以帮帮我吗?我有一个320GB的硬盘,我把它分为20GB fat32和300GB作为ext4和luks加密,“猜测”作为密码短语。 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**

所有的区号,但仍然没有运气。

**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.

我真的需要帮助。

1 个答案:

答案 0 :(得分:1)

No key available with this passphrase

这只是错误的密码短语。除非你得到正确的密码,否则你无能为力。

也许某些内容已经损坏了LUKS标头,如果您有可用的标头备份,可以尝试使用它,请参阅--header-backup-file中的man cryptsetup

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

否则无法绕过或通过加密(毕竟这是它的重点: - )