HardenedArray在高效加密的UEFI引导拱安装上有一个有帮助的archlinux安装指南。
然而,在安装过程的早期,我遇到了困难--特别是在打开LUKS分区的时候。
命令cryptsetup -c aes-xts-plain64 -h sha512 -s 512 --use-random luksFormat /dev/sda3
完成时没有出错,但在输入命令cryptsetup luksOpen /dev/sda3 tsundoku
后,/dev/mapper/tsundoku就不可用了。
ls /dev/mapper
只列出/dev/mapper/控件,而不像我预期的那样列出/dev/mapper/tsundoku。
以下错误消息出现在cryptsetup luksOpen /dev/sda3 tsundoku --verbose --debug
上:
“尝试读取. LUKS2标头在偏移量. LUKS头读取失败(-22)。命令失败与代码-1 (错误或缺少参数)。”
有人能给出错误的原因的任何提示吗?到目前为止,我在在线研究方面的尝试并没有取得什么成果。
非常感谢
编辑
为了实现三个目标中的任何一个,我问了这个问题:(1)在有6年历史的x86-64 Intel Core i5 2.50GHz ASUS上安装arch-linux (以任何方式);(2)更具体地说,用加密分区安全地安装arch-linux;(3)学习为什么尽管我期望cryptsetup luksOpen /dev/sda3 tsundoku
不会在path /dev/mapper中创建tsundoku映射条目。
我是arch-linux的新手,所以虽然我更喜欢用加密方式安装操作系统,但我还是会以任何方式安装它。
我以前在官方的拱形wiki中没有多少运气,所以当我看到HardenedArray的清晰描述的安装指南时,我想我可以试一试--最坏的情况是,我可能会遇到上面描述的问题,我可能会学到一些新的东西。
关于这个问题,下面是一些更多的细节:
按照HardenedArray的指南:i gdisk /dev/sda
并创建以下分区:
然后我做以下几件事:
mkfs.vfat -F 32 /dev/sda1
mkfs.ext2 /dev/sda2
此时,我尝试初始化一个LUKS分区并设置一个映射。
> cryptsetup --verbose -c aes-xts-plain64 -h sha512 -s 512 --use-random luksFormat /dev/sda3
Command successful
> cryptsetup -v isLuks /dev/sda3
Command successful
> ls /dev/mapper
control
> cryptsetup luksOpen /dev/sda3 tsundoku --verbose --debug
cryptsetup 2.0.0. processing "cryptsetup luksOpen /dev/sda3 tsundoku --verbose --debug"
Running command open.
Locking memory.
...
Trying to load any crypt type from device /dev/sda3.
Crypto backend ... initialized ...
Detected kernel Linux 4.14.9-1-ARCH x86_64.
...
Reading LUKS header of size 1024 from device /dev/sda3.
...
Activating volume tsundoku using token -1.
STDIN descriptor passphrase entry requested.
Activating volume tsundoku [keyslot -1] using passphrase.
...
Detected dm-ioctl version 4.37.0.
Device-mapper backend running with UDEV support enabled.
dm status tsundoku [ opencount flush ] [...] (...)
Trying to open key slot 0 [ACTIVE_LAST].
Reading key slot 0 area.
Using userspace crypto wrapper to access keyslot area.
Trying to open key slot 1 [INACTIVE].
# key slots 2-7 are also [INACTIVE]
Releasing crypt device /dev/sda3 context.
Releasing device-mapper backend.
Unlocking memory.
Command failed with code -2 (no permission or bad passphrase).
> ls /dev/mapper
control
> cryptsetup luksDump /dev/sda3
LUKS header information for /dev/sda3
Version: 1
Cipher name: aes
Cipher mode: xts-plain64
Hash spec: sha512
...
UUID: 56d8...
Key Slot 0: ENABLED
...
Key Slot 1: DISABLED
# Key Slots 2-7 are also DISABLED
我上面列出的步骤是否有任何不准确之处?也许我应该采取其他的选择,或者干预我错过的行动?
如果不是,命令cryptsetup luksOpen /dev/sd{a} {volume}
是否应该在路径/dev/mapper中创建卷映射?
如果是这样的话,我上面添加的细节是否允许任何人确定为什么路径/dev/sda3 3/tsundoku没有出现在我的机器上?如果没有,我是否可以补充更多的资料,使问题更清楚?
非常感谢。
发布于 2018-03-15 04:43:57
在完成安装并引导到新的Arch之前,您将使用错误的命令来代替以下命令:
# cryptsetup --type luks open /dev/sdaX plain1 #change **plain1** to your map location
在启动到新操作系统之后,您可以使用另一个操作系统。别忘了DuckDuckGo,Qwant,谷歌等等都是你的朋友。继续,祝你好运。
https://unix.stackexchange.com/questions/417135
复制相似问题