I was messing around with my new hard drive, which only contains some personal files, and to check its write speed, I typed:
sudo dd if=/dev/zero of=/dev/sda,
/dev/sda/ being the new 2 TB connected to my Raspberry Pi.
Hopefully, I cancelled the command and only 11 MB have been written.
Now disk content can't show up, and now
parted tell me that the partition tree is like this:
|--- unallocated 8.00 MB |--- unknown 1.82 TB |--- unallocated 9.08 MB
Before, it was like this:
|--- ext4 1.82 TB
I don't know if
dd did overwrite the first 11 MB of the disk, which means that the partition table have been totally overwritten, or random bits of the hard drive have been overwritten.
Now the hard drive is connected to my Xubuntu 14.04 laptop as
/dev/sdb. I've tried
gpart which is still running, and also
testdisk without success.
Knowing that the whole disk was
ext4 and that sector size was 4096, is it possible to recover the partition table without re-formating and make me able to access my files again (even if some have been corrupted/deleted)? Or the only solution I have is to use a file recovery tool, which would be tiresome because of the amount of data to copy stored on this drive?