Page 1 of 1

lost data with sudo dd if=pcbsd...img of=/dev/sdb

Posted: Thu Apr 25, 2013 1:28 am
by LuxPro
Hi,

I did a

Code: Select all

$sudo dd if=pcbsd...img of=/dev/sdb 
(instead of /dev/sdc)
Now the external hdd has become zfs but I terminated the command with ^C as soon as I realised the error.

The HDD won´t be recognised in Linux.
I ran testdisk on it but it won´t get anything.

Here is the output of sudo dd ...

Code: Select all

sudo dd if=PCBSD9.1-RELEASE-04-12-2013-x64-USB-live.img of=/dev/sdb
[sudo] password for kavish: 
^C202825+0 records in
202825+0 records out
103846400 bytes (104 MB) copied, 18.1321 s, 5.7 MB/s
Is it possible to recover the data?
Thanks.

Re: lost data with sudo dd if=pcbsd...img of=/dev/sdb

Posted: Thu Apr 25, 2013 1:34 am
by grimdestripador
Although I don't know the specific instructions to help you with. I can say that although you harddrive lost data, not all data is lost. There is a chance the old harddrive partition structure can still be 'recovered'. What this means is that you harddrive will act as if the files at the 'beginning of the harddrive' were neverwritten over, but really was; which can be used to recover 'some' data. Since in your case, I don't think much is lost, since only 5Megs were transfered before being cancled. On a cautionary note, tell us is /dev/sdb a linux boot disk? You might need a live cd.

Can some linux expert tell how to.
1) restore a linux partition table from 'hidden' backup nodes

Re: lost data with sudo dd if=pcbsd...img of=/dev/sdb

Posted: Thu Apr 25, 2013 3:43 am
by LuxPro
/dev/sdb had three partitions; certainly two of them were primary ext4; the other one might have been primary (or extended) but it was ext4.

Also please note it was not 5M that was overwritten but 104MB.

Thanks.

Re: lost data with sudo dd if=pcbsd...img of=/dev/sdb

Posted: Thu Apr 25, 2013 5:01 am
by catweazel