1

I had a working ubuntu with root and swap partitions encrypted with an LVM on LUKS set-up. Name of the LVM virtual group is vg-ubuntu.

Due to a maintenance need (a boot partition, not on LVM, becomming too small), I used LVM ability to move data to another partition (vgextend, pvmove, etc. using a live USB OS). As it was temporary, I did not encrypt this new partition. Ubuntu was still booting.

But, when I tried to move back to the original encrypted partition, ubuntu was not booting: it couldn't find vg-ubuntu.

I found some guides to solve similar issues, indicating to chroot and then update-initramfs, similar to what to do when encrypting the partition for the first time, but it did not work.

I also tried to move the data and then encrypt, but with no success. Moving the data worked fine with ubuntu booting, but after encryption, it was not able to find the VG.

1 Answer 1

1

After a couple of days of research, I found the solution in this blog.

The important step is to reinstall lvm2 and cryptsetup-initramfs after the chroot and before update-initramfs

chroot /mnt
apt install lvm2 cryptsetup-initramfs
update-initramfs -c -k all

In my case, it was necessary to do this reinstall, even though ubuntu had been on an encrypted device before.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .