On the bootscreen I get the message:
cryptsetup: waiting for encrypted source device /swapfile...
which then leaves me hanging for about 2 minutes followed by
Initramfs unpacking failed: Decoding failed.
I then get dropped to Initramfs.
This is on Ubuntu 20.04 with an encrypted home folder. I got the error after switching back to the nouveau driver in order to install cuda-10 (it was complaining about nvidia driver already being in use)
Other suggestions involve doing something with /etc/crypttab
, but that file doesn't exist on my system. cat /etc/fstab
also shows an empty file. Some reading suggests that in that case it would be using default settings but if so how does it know what disk should be used as a swapspace? Or is there something I can do with a live usb?
The output of mount is
none on / type rootfs (rw)
sysfs on /sys type sysfs (rw,nosuid, nodev, noexec, relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
udev on /dev type devtmpfs (rw,nosuid, noexec,relatime,size=32840428k,nr_inodes=8210107,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on/run type tmpfs (rw,nosuid,nodev,noexec,relatime,size=6583428k,mode=755)
lsblk returns a non found error (this is in inframs so that might not work)
While mounting sdc1 on /mnt on a life usb I can get the following results:
cat /mnt/etc/fstab
looks like
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/sdc1 during installation
UUID=5df229c0-be7c-43d7-b616-67ec15e2a6d3 / ext4 errors=remount-ro 0 1
# /boot/efi was on /dev/nvme0n1p2 during installation
UUID=D23D-B0F6 /boot/efi vfat umask=0077 0 1
#/swapfile none swap sw 0 0
/dev/mapper/cryptswap1 none swap sw 0 0
. cat /mnt/etc/crypttab
looks like
# <target name> <source device> <key file> <options>
cryptswap1 /swapfile /dev/urandom swap,offset=1024,cipher=aes-xts-plain64
and lsblk -o name, type, uuid, label
looks like
NAME TYPE UUID LABEL
loop0 loop
loop1 loop
loop2 loop
loop3 loop
loop4 loop
loop5 loop
sda disk
└─sda1 part 8C45-E3AC UBUNTU 20_0
sdb disk
├─sdb1 part
└─sdb2 part
sdc disk
└─sdc1 part 5df229c0-be7c-43d7-b616-67ec15e2a6d3
nvme0n1 disk
├─nvme0n1p1 part 60FC3C5FFC3C3220 Recovery
├─nvme0n1p2 part D23D-B0F6
├─nvme0n1p3 part
└─nvme0n1p4 part
If I don't miss anything, everything seems fine with your configurations. However it might help to regenerate initramfs while disabling the
/swap
file encryption.Boot up the system using a live Ubuntu disk. mount these two partitions:
Open
/mnt/etc/fstab
and comment this line (add a # at the beginning):Open
/mnt/etc/crypttab
and comment this line (add a # at the beginning):Now we have to chroot into system and regenerate the initramfs:
It's all done. exit from chroot environment:
Un-mount the mounted partitions and reboot:
Now you lost the encryption on
/swap
. However I think you didn't want it in the first place. You might try these instructions without editing/etc/fstab
and/etc/crypttab
. That might work too.