I had a complete failure during Ubuntu LTS do-release-upgrade
and the kernel would panic on boot, even in rescue mode. So I loaded a LiveUSB, mounted my encrypted partition, chrooted to it and repaired/finished the installation. Or so I thought.
It's going farther now (no panic) but it fails to find the right encrypted partition: it's looking for kubuntu-vg while the name of the real one (on /dev/sda5) should be mapper/kubuntu--vg-root then it drops me to a busybox shell.
What should I do to change the name of the LUKS partition ? Is it a grub of initramfs setting ?
Edit: From the initramfs shell:
cryptsetup luksOpen /dev/sda5 kubuntu-vg
lvm pvscan
[Ctrl-D]
It then boots normally. But then how do I fix the system, things seem normal but the boot fails again even after update-grub
:
$ blkid
/dev/sda5: UUID="99db...9f" TYPE="crypto_LUKS" PARTUUID="00...05"
...
$ cat /etc/crypttab
sda5_crypt UUID=99db...9f none luks
$ cat /etc/fstab
/dev/mapper/kubuntu--vg-root / ext4 errors=remount-ro 0 1
...
$ sudo update-initramfs -k all -u
update-initramfs: Generating /boot/initrd.img-5.15.0-47-generic
cryptsetup: WARNING: target 'kubuntu-vg' not found in /etc/crypttab
What am I missing ?
Edit 2: If I edit the fstab:
$ cat /etc/fstab
#/dev/mapper/kubuntu--vg-root / ext4 errors=remount-ro 0 1
/dev/mapper/sda5_crypt / ext4 errors=remount-ro 0 1
$ sudo update-initramfs -k all -u
update-initramfs: Generating /boot/initrd.img-5.15.0-47-generic
cryptsetup: WARNING: target 'kubuntu-vg' not found in /etc/crypttab
W: Couldn't identify type of root file system for fsck hook
So it's worse than just leaving kubuntu--vg-root
/dev/mapper/sda5_crypt
in fstab?