1
1月
2026
修复:“cryptsetup:错误:无法解析设备覆盖层”
21:21

修复:“cryptsetup:错误:无法解析设备覆盖层”

1 1月 2026 21:21

在执行 sudo apt upgrade 命令或运行 update-initramfs -u 命令时,出现错误“cryptsetup: ERROR: Couldn't resolve device overlay.”

问题

我的电脑上没有使用磁盘加密,但不知何故出现了错误“cryptsetup: ERROR: Couldn't resolve device overlay”。

我检查了文件;其中一个文件系统配置文件几乎是空的,只有一些注释。

cat /etc/crypttab

另一个配置文件中没有提到 overlay。

cat /etc/fstab

第二个错误:“cryptsetup: WARNING: Couldn't determine root device”让我很担心,所以我尝试了

update-initramfs -u

但仍然失败。

解决方案

您需要重新安装 initramfs-tools 软件包。

sudo apt remove initramfs-tools

sudo apt clean

sudo apt install initramfs-tools

这将构建内核。例如:

update-initramfs: Generating /boot/initrd.img-6.1.105-antix.1-amd64-smp

如果您收到类似上述的内核更新成功消息,则无需运行“update-initramfs -u”命令。


来源:



相关出版物