Page 1 of 1

How to Extend Volume of Lost EXT4 LUKS Partition

Posted: 21 Sep 2019, 22:35
by deneme
KDE Partition Manager broken my HDD's partition table. So I installed testdisk and when trying to writing new partition table everything has gone. :D

Then I tried testdisk several times. My HDD has NTFS part, EXT4 part and LUKS part. I saved NTFS and EXT4 parts. I figured it out. I found LUKS Header. It's 2mb but I couldn't extend LUKS part.

I tried to edit last sector number of LUKS manually by using Add Partition but It didn't work.

How can I extend it? I know where is my encrypted files on sectors. If I can't extend it I want to know that how can I decrypt LUKS sectors using LUKS Header. I backed up LUKS Header to a USB with a .dd extension.

Re: How to Extend Volume of Lost EXT4 LUKS Partition

Posted: 22 Sep 2019, 10:09
by cgrenier
Set the Linux LUKS partition as D(eleted), use 'a' to manually add a new Linux partition starting at the same location as the LUKS partition and ending just before the next partition or at the end of the disk.
If you have difficulties, lease provide a copy and paste of the testdisk.log file content.

Re: How to Extend Volume of Lost EXT4 LUKS Partition

Posted: 22 Sep 2019, 18:13
by deneme
Thanks for the reply. It worked.