Hi all,
While preparing a bootable USB a wild dd command was executed on the wrong 
partition, namely on /dev/sda5 instead of the intended /dev/sdb.The 
consequences are easy to imagine. However, as the start of the disk has not 
been touched (the command run on sda5) I still have some hope to be able to 
recover part of the data before wiping out the disk and reinstalling (the 
overwritten portion of the disk is very small).
Running fdisk on /dev/sda yields the following:
> fdisk -l /dev/sdaDisk /dev/sda: 596.17 GiB, 640135028736 bytes, 1250263728 
> sectorsDisk model: SAMSUNG HM641JI Units: sectors of 1 * 512 = 512 
> bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size 
> (minimum/optimal): 512 bytes / 512 bytesDisklabel type: dosDisk identifier: 
> 0x3d27ec68
Device     Boot   Start        End    Sectors   Size Id Type/dev/sda1  *       
2048    1050623    1048576   512M  b W95 FAT32/dev/sda2       1052670 
1250263039 1249210370 595.7G  5 Extended/dev/sda5       1052672 1250263039 
1249210368 595.7G 83 Linux

The partition table should be intact, sda5 is a partition inside the extended 
sda2. The partition should be Ext4.

Question: having those information, is it possible to repair the partition to a 
state where I can copy away as much data I can and how can I do it?
Thanks to everybody!

Andrea
PS: yes, I know, data should have been backed up. Lesson learned.

Reply via email to