I am currently experiencing the exact same problem, after doing the exact same upgrade. Good news! Your data is safe.
Setup:
Encrypted LUKS partition containing LVM with root and swap partition. Boot partition unencrypted.
Problem:
After do-release-upgrade -d (20.04 -> 22.04) unlocking LUKS during boot fails ("bad password or options" error)
When booting with recovery mode I get a more useful error.
Right before the prompt for cryptsetup appears there is the following error
/sbin/cryptsetup: symbol lookup error: /lib/x86_64-linux-gnu/libcryptsetup.so.12: undefined symbol: EVP_MD_get_size, version OPENSSL_3.0.0
Any password fails and the same error appears right before the new prompt appears. Similar to bidaveygeorge "vgubuntu not found" and similar messages appear Before the first prompt is shown.
My theory:
The initramfs contains a cryptsetup which was compiled against openssl. The compiletime version differs from the version included in the initramfs.
Disclaimer: I have no experience with the crypto ecosystem of Ubuntu. My programming experience would suggest such an error. The cryptsetup manpage mentions compiled-in backends.
Further research:
As a temporary solution I downloaded a live USB Image of 22.04.
I was able to mount my disk and analyze the initrd.img
root@ubuntu-mate:/# lsinitramfs /boot/initrd.img | grep ssl
etc/ld.so.conf.d/openssl-3.0.0-alpha14.conf
usr/local/ssl
usr/local/ssl/lib
usr/local/ssl/lib/libcrypto.so.3
root@ubuntu-mate:/# lsinitramfs /boot/initrd.img | grep cryptsetup
usr/lib/cryptsetup
usr/lib/cryptsetup/askpass
usr/lib/cryptsetup/functions
usr/lib/x86_64-linux-gnu/libcryptsetup.so.12
usr/lib/x86_64-linux-gnu/libcryptsetup.so.12.7.0
usr/sbin/cryptsetup
All following commands were executed as root:
cryptsetup open /dev/sda3 sda3_crypt
IMPORTANT the sda3_crypt part should be the same as the
name used in your /etc/crypttab. Otherwise chroot wont work properly.
This automatically opened the LVM within the encrypted LUKS.
If there is a plain FS behind LUKS, sda3_crypt should be the fs to mount.
mount /dev/mapper/my-vg--root /mnt
# No data is lost. Password works fine.
prepare chroot
mount --rbind /dev /mnt/dev
mount --rbind /run /mnt/run
mount --rbind /proc /mnt/proc
mount --rbind /sys /mnt/sys
sda2 is my boot partition
mount /dev/sda2 /mnt/boot
Chroot to be able to run commands on the non-bootable system
chroot /mnt
System fully up to date as of this post
apt update
apt upgrade
apt dist-upgrade
do-release-upgrade -d
Reinstalling has no effect
apt reinstall openssl cryptsetup cryptsetup-initramfs
Installing a new initramfs does not change anything.
update-initramfs -c -k all