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

Quick to answer questions about finding your way around Linux Mint as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
LuxPro

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

Post 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.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
grimdestripador
Level 6
Level 6
Posts: 1051
Joined: Fri Feb 16, 2007 2:26 am

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

Post 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
LuxPro

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

Post 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.
User avatar
catweazel
Level 19
Level 19
Posts: 9763
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

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

Post by catweazel »

"There is, ultimately, only one truth -- cogito, ergo sum -- everything else is an assumption." - Me, my swansong.
Locked

Return to “Beginner Questions”