Ubuntu Volume Group Not Found

March 8, 2021
ubuntu linux lvm cryptsetup initrd

One of my colleagues asked for help the other day with an Ubuntu system that would not boot after an upgrade. It was failing with the error: Volume group "ubuntu-vg" not found. My first thought was that a hard drive had failed but, booting from a rescue CD, I could see the expected disks. This system was set up with an encrypted partition and LVM, and I found this article very helpful in resolving the problem.

From the rescue CD I was able to mount the root and boot file systems:

cryptsetup open /dev/nvme0n1p3 nvme0n1p3_crypt
vgchange -a y
mount /dev/mapper/ubuntu—vg-root /mnt
mount /dev/nvme0n1p2 /mnt/boot

This was encouraging: the data on disk appeared to be intact. Maybe something had gone wrong creating the initial RAM disk when the kernel was upgraded - I had seen that before when the boot partition ran out of space during an upgrade (there was plenty of space in the boot partition on this system, but a corrupt initrd was still a possibility).

Mounting /dev, /proc and /sys inside the root filesystem, we can chroot into the installed system and re-install the latest kernel:

mount -t proc /proc /mnt/proc
mount -t sys /sys /mnt/sys
mount —bind /dev /mnt/dev
chroot /mnt
apt-get update
apt-get dist-upgrade
apt-get install —reinstall linux-image-4.15.0-136-generic

Now the moment of truth: exit the chroot and try to boot from the SSD. Success! If this hadn’t worked I would have tried booting from an older (previously working) kernel.