Lately, I did a fresh install of kubuntu (coming from linux mint) where I also encypted the drive and swapfile. During booting I got the error:
Cryptsetup waiting for encrytped source device /swapfile.
After some searching I found that a command called sudo update-initramfs -u -k all
should solve it. However, I get some errors I cannot resolve:
update-initramfs: Generating /boot/initrd.img-5.19.0-38-generic
cryptsetup: WARNING: cryptswap1: couldn't determine device type, assuming
default (plain).
cryptsetup: ERROR: Couldn't resolve device /swapfile
cryptsetup: WARNING: cryptswap1: key file /dev/loop0 has insecure ownership,
see /usr/share/doc/cryptsetup/README.Debian.gz.
cryptsetup: WARNING: Resume target cryptswap1 uses a key file
I: The initramfs will attempt to resume from /dev/dm-0
I: (/dev/mapper/cryptswap1)
I: Set the RESUME variable to override this.
update-initramfs: Generating /boot/initrd.img-5.19.0-35-generic
cryptsetup: WARNING: cryptswap1: couldn't determine device type, assuming
default (plain).
cryptsetup: ERROR: Couldn't resolve device /swapfile
cryptsetup: WARNING: cryptswap1: key file /dev/loop0 has insecure ownership,
see /usr/share/doc/cryptsetup/README.Debian.gz.
cryptsetup: WARNING: Resume target cryptswap1 uses a key file
I: The initramfs will attempt to resume from /dev/dm-0
I: (/dev/mapper/cryptswap1)
I: Set the RESUME variable to override this.
The content of the /etc/crypttab file is cryptswap1 /swapfile /dev/loop0 swap,offset=1024,cipher=aes-xts-plain64,size=256
The command lsblk -f
gives the following:
NAME FSTYPE FSVER LABEL UUID FSAVAIL FSUSE% MOUNTPOINTS
loop0 swap 1 7ab8406f-ea13-4984-8211-b9dd27a0677c
└─cryptswap1 swap 1 cryptswap1 4cd157f7-3d8d-4893-aea8-be54200244e1 [SWAP]
Is somebody able to help me here? I probably has something to do with the crypttab file but I don't know what to change.