我试图使用加密设置来加密一些分区,但是得到了错误的IO error while decrypting keyslot.
命令和输出是:
root@rescue ~ # cryptsetup --debug --verbose --cipher aes-xts-plain64 --key-size 256 --hash sha256 --iter-time 6000 luksFormat /dev/sda3
# cryptsetup 1.6.6 processing "cryptsetup --debug --verbose --cipher aes-xts-plain64 --key-size 256 --hash sha256 --iter-time 6000 luksFormat /dev/sda3"
# Running command luksFormat.
# Locking memory.
# Installing SIGINT/SIGTERM handler.
# Unblocking interruption on signal.
WARNING!
========
This will overwrite data on /dev/sda3 irrevocably.
Are you sure? (Type uppercase yes): YES
# Allocating crypt device /dev/sda3 context.
# Trying to open and read device /dev/sda3.
# Initialising device-mapper backend library.
# Timeout set to 0 miliseconds.
# Iteration time set to 6000 miliseconds.
# Interactive passphrase entry requested.
Enter passphrase:
Verify passphrase:
# Formatting device /dev/sda3 as type LUKS1.
# Crypto backend (gcrypt 1.6.3) initialized.
# Detected kernel Linux 4.9.85 x86_64.
# Topology: IO (512/0), offset = 0; Required alignment is 1048576 bytes.
# Checking if cipher aes-xts-plain64 is usable.
# Using userspace crypto wrapper to access keyslot area.
IO error while decrypting keyslot.
# Releasing crypt device /dev/sda3 context.
# Releasing device-mapper backend.
# Unlocking memory.
Command failed with code 5: IO error while decrypting keyslot.我确实找到了抛出这个错误的代码,这里,但是它没有给我提供任何洞察力。
正如您从输出中看到的,分区被格式化了,但是键槽没有被写入。
/dev/sda是一个3 3ware数组,分区表由debian安装程序写入设备。我发现(错误的),我可以在整个设备上创建一个LUKS容器,但这对我来说不是一个可行的解决办法,因为它是服务器上唯一的存储设备,我需要一个未加密的/boot分区。
发布于 2018-04-08 22:35:51
我理解了这一点,在问题中的命令之前,我在通过uuid指定分区时尝试了相同的操作,如下所示:
cryptsetup <options> luksFormat /dev/disk/by-uuid/<disk uuid>在此操作期间,uuid将更改。我不理解细节,但我最终得到了一个损坏的分区表。
https://serverfault.com/questions/906660
复制相似问题