I'm on Ubuntu 18.04 and in trying to fix my backups and spending time with DmSetup and renaming LVM volumes; I broke my system and it now boots into initramfs.
In trying to fix it; I've made it worse (by rerunning update-initramfs) and at the moment I've spent a few days trying to fix it and having no luck.
Apologies for the newbie questions in advance but I have no idea how to recover.
If I boot into a Live USB and open disks I can see my 512gb SSD:
in 3 partitions
1) EFI 537mb /dev/nvme0n1p1 UUID 9F4F-2C7F
2) 512mb /dev/nvme0n1p2 UUID a740b36f-...
3) 511gb /dev/nvme0n1p3 UUID 7f168f4c-....
When I run sudo cryptsetup luksOpen /dev/nvme0n1p3 nvme0n1p3 I get another 494 GB Block device showing on disks:
494gb /dev/ubuntu-vg/root UUID 5240c465...
As well as /dev/mapper/nvme0n1p3 showing up underneath /dev/nvme0n1p3 UUID 7f168f4c
511gb /dev/mapper/nvme0n1p3 UUID: scLAMg-YBIS (Contents: LVM2 Physical volume)
dmsetup ls shows:
nvme0n1p3 (253:0)
ubuntu--vg-swap_1
ubuntu--vg-root (253:1)
I'm unable to mount nvme0n1p3 as it says unknown filesystem type 'LVM2_member'
but I can mount ubuntu--vg-root
Contents of /etc/fstab are below:
/dev/mapper/ubuntu--vg-root ext4 errors=remount-ro 0 1
#boot was on /dev/nvme0n1p2 during installation
UUID=a740b36f... /boot ext2 defaults 0 2
#boot/efi was on /dev/nvme0n1p1 during installation
UUID=9F4F-2C7F /boot/efi vfat umask=077 0 1
/dev/mapper/ubuntu--vg-swap_1 none swap sw 0 0
Can someone please assist before I make matters worse!
Thank you
Update: following this guide:
https://feeding.cloud.geek.nz/posts/recovering-from-unbootable-ubuntu-encrypted-lvm-root-partition/
If I cryptsetup luksopen /dev/nvme0n1p3 ubuntu--vg-root
I get WARNING when I try to vgchange -ay
device-mapper: create ioctl on ubuntu--vg-root LVM-2E8Ay3ng..... failed: Device orresource busy
It then fails to mount
(unknown filesystem type 'LVM2_member')