Ubuntu 19.10 の initramfs-tools から dm-crypt 領域が見つからずエラーとなる

Ubuntu 19.10 amd64 環境でapt upgrade でエラーになります.
新しいKernel が降りてきてinitramfs のところでdm-crypy 領域が見つからない感じのようです.

initramfs-tools (0.133ubuntu9) のトリガを処理しています ...
update-initramfs: Generating /boot/initrd.img-5.2.0-8-generic
cryptsetup: ERROR: Couldn't resolve device
  /dev/disk/by-uuid/805938be-2c29-4a53-9ed2-36fb233d76ea
cryptsetup: ERROR: Couldn't resolve device
  UUID=31145c5b-93fc-4fe0-9e46-3a68bfcadeae
W: initramfs-tools configuration sets RESUME=UUID=31145c5b-93fc-4fe0-9e46-3a68bfcadeae
W: but no matching swap device is available.
処理中にエラーが発生しました:

エラーメッセージで検索すると以下のページを発見.

The problem is that cryptsetup is not supported in the /etc/initramfs-tools/initramfs.conf configuration anymore.

The new location for loading dm-crypt during boot is /etc/cryptsetup-initramfs/conf-hook

CRYPTSETUP=y

you’ll see it in the conf-hook file commented out, just set it as above and it will work again.

If you build a system with encryption, I believe this gets changed at some point, but the live builds are systems that are not built like this, and there isn’t a lot to go on to direct you to make this change.

When you set that and re-make your iso image, you’ll be able to do encrypted persistence again. Worked for me on latest Kali January 2019. :-)

なるほど,この環境はいつも development branch にしているのでこの問題に当たったようですね.

/etc/cryptsetup-initramfs/conf-hookCRYPTSETUP=y と編集して,

$ sudo vi /etc/cryptsetup-initramfs/conf-hook
$ sudo git diff HEAD /etc/cryptsetup-initramfs/conf-hook
diff --git a/cryptsetup-initramfs/conf-hook b/cryptsetup-initramfs/conf-hook
index 8a6a474..fdd7920 100644
--- a/cryptsetup-initramfs/conf-hook
+++ b/cryptsetup-initramfs/conf-hook
@@ -15,7 +15,7 @@
 # cryptsetup initramfs integration.
 #

-#CRYPTSETUP=
+CRYPTSETUP=y

 #
 # KEYFILE_PATTERN: ...

apt でfix-broken を掛けると正常にinitramfs が通り,再起動して新しいkernal で起動しました :)

$ sudo apt install -f
環境
$ dpkg-query -W cryptsetup* initramfs-tools*
cryptsetup      2:2.1.0-5ubuntu2
cryptsetup-bin  2:2.1.0-5ubuntu2
cryptsetup-initramfs    2:2.1.0-5ubuntu2
cryptsetup-run  2:2.1.0-5ubuntu2
initramfs-tools 0.133ubuntu9
initramfs-tools-bin     0.133ubuntu9
initramfs-tools-core    0.133ubuntu9
$ lsb_release -dr
Description:    Ubuntu Eoan Ermine (development branch)
Release:        19.10
$ uname -m
x86_64