2

I accidentally executed

sudo shred -v -n 0 -z /dev/sdb

to prepare a thumb drive for formatting. But /dev/sdb was my external hdd. Although I immediately became aware of my mistake and pressed ctrl+c

lsblk

shows that the ext4 partition on the external hdd got lost. I think shred copied some zeros into the space where the partition table was.

Is there any hope, that I can get my data back? I already tried the data rescue option in gparted but the programm hangs on different devices when attempting this.

  • Try Testdisk. – L. D. James Mar 24 '17 at 8:31
  • I usually use photorec to recover files from corrupted paritions, but this involves copying this recovered files to another drive and loosing the original names, so use it as a last option if you cannot restore it from a superblock. – bistoco Mar 25 '17 at 5:50
2

As there is limited information about the drive type it might help to say that from past experience with thumb drives you should firstly copy the whole disk using something like Win32DiskImager or if the HDD is too large for this then you might be able to copy the stored data area. Some of the recovery tools can potentially make things worse.

Next, there does seem to be some hope of restoring the data, these links should give more information.

http://www.tldp.org/HOWTO/Partition/recovering.html

https://www.linux.com/learn/how-fix-mangled-partition-table-linux

https://unix.stackexchange.com/questions/33284/recovering-ext4-superblocks

  • It is a good idea to create a cloned copy, and do the repair/recovery work on the cloned copy. I can add this link: ubuntuforums.org/… – sudodus Mar 25 '17 at 5:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.