[Bug 1879085] Re: update-initramfs can't handle encrypted swap-files

Jesse 1879085 at bugs.launchpad.net
Thu Oct 22 04:26:32 UTC 2020


** Also affects: cryptsetup
   Importance: Undecided
       Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to initramfs-tools in Ubuntu.
https://bugs.launchpad.net/bugs/1879085

Title:
  update-initramfs can't handle encrypted swap-files

Status in cryptsetup package in Ubuntu:
  New
Status in initramfs-tools package in Ubuntu:
  Confirmed

Bug description:
  OS: Ubuntu 20.04 Mate

  I have an encrypted swap-file, which is working fine:

  # grep cryptswap /etc/fstab
  /dev/mapper/cryptswap none swap  defaults 0 0
  # grep cryptswap /etc/crypttab
  cryptswap /cryptswapfile /dev/urandom swap,cipher=aes-xts-plain64,size=256

  But everytime I update the kernel and update-initramfs is executed, an
  error occurs:

  cryptsetup: ERROR: Couldn't resolve device /cryptswapfile
  cryptsetup: WARNING: Resume target cryptswap uses a key file

  And after the next reboot, the system can't load the cryptswap while
  booting and hangs for several minutes.

  Workaround: Boot into rescue mode and wait until the loading of the
  cryptswapfile timeouts. Go to a shell and comment the lines in the
  fstab and crypttab. Execute # swapoff -a && update-initramfs -u. Now
  uncomment the lines in fstab and crypttab again and reboot. Your
  system should boot fine and you should have an encrypted swapfile.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/cryptsetup/+bug/1879085/+subscriptions



More information about the foundations-bugs mailing list