在Arch Linux上,我使用KDE分区管理器在LVM卷上设置了一个加密分区。
我丢失了该分区的密码,并使用KDE删除了partion。
此后,启动进程冻结,从未到达登录提示符。
我从分区备份恢复,所有运行都很好。
现在,我在登录前得到一个提示,请求一个密码,我可以跳过几次按enter。
/etc/crypttab包含到该分区的一个条目,但是/etc/fstab不包含。
对于指向缺席卷的/etc/crypttab条目来说,冻结引导进程是一种预期的行为吗?
我正在试图找出条目是否是引导问题的可能原因,以及是否可以安全地删除条目和分区。
LVM卷未加密。
编辑:在拱门上使用mkinitcpio -P重新生成initramfs
发布于 2022-05-13 04:52:47
/etc/crypttab中的条目的工作方式类似于/etc/fstab:如果列出的设备不存在,那么引导进程将尝试等待它,过了一段时间,启动进程将失败。它不应该冻结,在超时之后,您应该切换到shell。如果要防止出现这种情况,可以始终添加nofail选项:
nofail This device will not be a hard dependency of cryptsetup.target. It'll still be pulled in and started, but the system will not wait for the device to show up and be unlocked, and boot will not fail if this is unsuccessful. Note that other units that depend on the unlocked device may still fail. In particular, if the device is used for a mount point, point itself also needs to have the nofail option, or the boot will fail if the device is not unlocked successfully.
如果加密的设备不再存在(因此它不仅仅是暂时丢失的),您可以从/etc/crypttab中删除它,但在此之后还需要重新生成initramfs。你没有说你使用了什么发行版,在Ubuntu上你会在Fedora dracut --regenerate-all上使用update-initramfs -u
https://unix.stackexchange.com/questions/702345
复制相似问题