Partition recovery with testdisk

OK! So you’ve accidentally deleted a partition. Step 1: NOBODY PANIC

Step 2: Don’t work on the live data!
If you have a large enough backup disk, attach it, and use ddrescue or testdisk to write a byte-by-byte recovery image file to some other location. You’ll use this for your work. I won’t cover that in my post yet, because I’m lazy. But that’s golden rule #2 - never ever work on live data.

Step 3: Profit! Just kidding. Step 3 is launching testdisk; Here we’ll create a recovery log.
testdisk%201

Step4: Select the disk or disk image to recover.
Here, I’m lazy. I’ve erased the partition table from a USB disk. I’m just selecting my disk, but you’ll use your recovery image.
testdisk%202

Step5: Select your partition type. If it’s an old style MSDOS partition table, select “Intel” otherwise you’ll probably select “EFI/GPT”. At the bottom, where it says “Hint:…” it should tell you what it’s detected.
testdisk%203

Step6: Select Analyze.
testdisk%204

Step 7: Perform a quick search.
testdisk%206

testdisk%207

Step 8: Now we’re cooking with gas! Looks like a partition was found!
testdisk%208

Step 9: Select the partition for recovery and prepare to write it.
testdisk%209

Step 10: Write your partition table.
testdisk%2010

Step 11: Look at those glorious files!
testdisk%2011

Sorry, I missed this, but this actually a great post. Thanks for the share!