I managed to ruin a server drive by trying to clone it to another drive with dd
. In the process, the original boot
and sda1
partitions were overwritten.
I immediatly stopped using the drive,I made an image of the damaged drive with ddrescue
then attempted to recover the lost partition with testdisk
. Running a deepscan I found what seemed to resemble my lost sda1
partition so I restored.
After running an fsck
on it and sudo e2fsck -b block_number /dev/xxx
to restore a uncorrupted superblock, I was able to mount the partition and found a lost+found
directory containing almost all my files.
It seems my files are there so how would I be able to recover/rebuild the filesystem of the original partition?