Ubuntu – Mistakenly renamed LVM volume group, now Ubuntu won’t start, drops to busybox

bootencryptionfilesystemlvmpartitioning

  1. I installed encrypted Ubuntu on a SSD disk on PC1.
  2. PC1 got a hardware problem, so I put SSD into PC2.
  3. I booted a live USB Ubuntu trial on PC2, and in "Disks" I tried to mount the SSD.
  4. My disk was correctly mounted on /dev/mapper/luks-67xxx after being asked for the encryption password, but I could not see my files.
  5. I believed it was because the SSD's volume had the same name as the live USB's volume, so after reading https://askubuntu.com/a/766141/4066 I ran vgrename to rename it to "ubulive", but mistakenly renamed the SSD instead of the USB volume, it seems.
  6. Good news: PC1 is repaired. So I put the SSD back into PC1.
  7. Bad news: After asking me for the encryption password, Ubuntu drops me to the busybox/ash/initramfs command prompt
  8. I booted the live USB again, renamed back with vgrename tkr3Cj-xxx ubuntu--vg-root. I confirmed that I can see my encrypted files by typing sudo mount /dev/ubuntu--vg-root/root /media/somefolder. Then I unplugged the USB and rebooted.
  9. Bad news: After entering the encryption password, I still get dropped to busybox.

Question: How to make it boot normally again?
In particular, why does Grub still see the mistaken volume name "ubulive" even though from the live USB all I can see is "ubuntu–vg-root"?

LVM block storages seen from the live USB Ubuntu:

# lvscan
  ACTIVE            '/dev/ubuntu--vg-root/root' [<930.37 GiB] inherit
  ACTIVE            '/dev/ubuntu--vg-root/swap_1' [976.00 MiB] inherit
# lvmdiskscan 
  /dev/loop0                                            [       1.88 GiB] 
  /dev/mapper/luks-67b5b6d6-4ac3-4f79-b1ae-40a83cc050bc [    <952.64 GiB] LVM physical volume
  /dev/loop1                                            [     <89.25 MiB] 
  /dev/sda1                                             [     512.00 MiB] 
  /dev/ubuntu--vg-root/root                             [    <930.37 GiB] 
  /dev/loop2                                            [     <53.71 MiB] 
  /dev/sda2                                             [     732.00 MiB] 
  /dev/ubuntu--vg-root/swap_1                           [     976.00 MiB] 
  /dev/loop3                                            [     143.50 MiB] 
  /dev/sda3                                             [     952.65 GiB] 
  /dev/loop4                                            [      <4.02 MiB] 
  /dev/loop5                                            [      14.74 MiB] 
  /dev/loop7                                            [      <3.67 MiB] 
  /dev/loop8                                            [      35.31 MiB] 
  /dev/sdb1                                             [      30.46 GiB] 
  1 disk
  13 partitions
  1 LVM physical volume whole disk
  0 LVM physical volumes

enter image description here

Best Answer

Instead of vgrename tkr3Cj-xxx ubuntu--vg-root, run this command:

vgrename tkr3Cj-xxx ubuntu-vg

With that, Ubuntu booted and mounted the encrypted disk flawlessly.

It seems that the -root part and the doubling of the - happen somewhere in the process.

Related Question