Accidentally booted the Acer Recovery partition of my multi-boot laptop and despite selecting EXIT when presented with a choice of whether I wanted to recover anything or not, one of my partitions got mangled. Now I could really use some advice on rewriting the partition table and recovering the filesystem.
I've cloned the whole drive (dd if=... | ssh me@desktop -of=...) and am working exclusively on the cloned drive.
I've tried gpart, parted, testdisk (as well as gparted). No luck so far.
My drive layout is:
/dev/sda1 ntfs 12GB
/dev/sda2 ntfs 100MB
/dev/sda3 ntfs 72.17GB
/dev/sda4 extended 213.82GB
unallocated 27.93GB
/dev/sda5 ext4 148.98GB
/dev/sda6 ext4 29.33GB
/dev/sda7 swap 7.58GB
unallocated 2.49MB
The mangled partition is the ~30GB unallocated partition (first logical partition in the extended partition).
Too bad Acer Recovery hit that exact partition. I wouldn't have bothered trying to recover any of the others (Windows that I don't use, Linux for testing, Linux alt. distro also for testing). This one, though, contains data I'd really like to recover.
I know the exact boundaries of the partition, I know the details of the underlying (ext4) filesystem.
However, the tools usually recommended to recover are not working. A deep scan by testdisk indicated that the Acer Recovery tool apparently decided to copy the partition table for the main Windows partition resulting in complaints about sizes not matching up. gpart, parted and testdisk were not able to find a filesystem. testdisk found an ntfs filesystem which was "unrecoverable".
I suspect the superblock was nuked as well, but a search revealed the existence of multiple backup superblocks.
What's the best bet moving forward? I want to try and rewrite the partition table and recover the filesystem, presumably with e2fsck using a backup superblock.
What tool will allow me to rewrite the partition table without doing anything to my data? What about setting a filesystem? Would I need to do that before trying to restore the superblock from backup? How?
TIA,
fyo
dd
from a Linux LiveCD to save raw disc to a file and restore it to have another go after a failed recovery.