How to Extend Volume of Lost EXT4 LUKS Partition

How to use TestDisk to recover lost partition
Forum rules
When asking for technical support:
- Search for posts on the same topic before posting a new question.
- Give clear, specific information in the title of your post.
- Include as many details as you can, MOST POSTS WILL GET ONLY ONE OR TWO ANSWERS.
- Post a follow up with a "Thank you" or "This worked!"
- When you learn something, use that knowledge to HELP ANOTHER USER LATER.
Before posting, please read https://www.cgsecurity.org/testdisk.pdf
Locked
Message
Author
deneme
Posts: 2
Joined: 21 Sep 2019, 21:48

How to Extend Volume of Lost EXT4 LUKS Partition

#1 Post 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.

User avatar
cgrenier
Site Admin
Posts: 5432
Joined: 18 Feb 2012, 15:08
Location: Le Perreux Sur Marne, France
Contact:

Re: How to Extend Volume of Lost EXT4 LUKS Partition

#2 Post 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.

deneme
Posts: 2
Joined: 21 Sep 2019, 21:48

Re: How to Extend Volume of Lost EXT4 LUKS Partition

#3 Post by deneme »

Thanks for the reply. It worked.

Locked