Moving LUKS-LVM partition with KDE Partition Manager broke it

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

I hope someone on this list can help me fix a stupid mistake I made. My apologies if this is not the right place. This page made it sound like it would be ok to ask for help here: https://gitlab.com/cryptsetup/cryptsetup/wikis/FrequentlyAskedQuestions

My computer is set up to dual boot Windows and Linux. Directly after the main Windows partition, is a LUKS-encrypted partition containing 3 LVM logical volumes, set up following this guide: https://wiki.gentoo.org/wiki/Sakaki%27s_EFI_Install_Guide

In case it is useful information, I actually followed "Option 6" in the guide (i.e. using a password only): https://wiki.gentoo.org/wiki/Sakaki%27s_EFI_Install_Guide/Using_Your_New_Gentoo_System_under_OpenRC#Migrating_Off_the_Boot_USB_Key_.28Optional.29

Recently, I wanted to increase the Windows partition by 100 GB. This meant shrinking my LUKS partition by 100 GB, and moving it to the right 100 GB, to free up space on the left for Windows.

I successfully shrank the LUKS partition, and tested it by booting into Linux and viewing my data.

However, things went wrong when I used KDE Partition Manager to move the shrunken LUKS partition to the right. After that, the partition's type showed up in partitionmanager and gparted as "unknown" instead of LUKS, and trying to run cryptsetup luksOpen returned that the partition "is not a valid LUKS device".

I did manage to recover the LUKS header from the freshly unallocated space between the Windows and LUKS partitions by using hexdump and dd. Decrypting the LUKS partition using the recovered header (i.e: sudo cryptsetup --readonly --header /path/to/recovered/header/file luksOpen /dev/partition <insert some name here>) seems to work in the sense that cryptsetup accepts my password, and the mapping shows up in /dev/mapper. However, lvdisplay and vgdisplay detect nothing, and mounting it fails.

In the worst case, I do have a qcow2 image of my entire disk that is several months old that I may be able to use to recover most of my data, but I would like to try that last.

Thanks in advance to anyone who can help!

_______________________________________________
dm-crypt mailing list
dm-crypt@xxxxxxxx
https://www.saout.de/mailman/listinfo/dm-crypt

[Index of Archives]     [Device Mapper Devel]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux