Score:0

initramfs -- unable to boot into encrypted hardisk

in flag

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')
Score:0
in flag

Fixed it by changing my crypttab to the UUID... I can see the cryptab entry was renamed 'backup' which is what I renamed it to when I was messing around.

Seem to be booting okay for now.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.