Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Yesterday I used dd to write an OS into my Raspberry Pi flash card. Even though all my commands ( I checked history ) were for /dev/sdd which was the flash , when I checked my external drive(500GB) there were only 2 partitions there, one of 3 GB and one of 15MB instead of all my precious data.

Is there any way to recover from that ? Cause, theoretically my data is still there. Or shall I just start crying ?

This is the command I ran:

sudo dd bs=4M if=~/Downloads/RetroPieImage_ver1.2.1.img of=/dev/sdd
share|improve this question
    
Which commands did you run? –  Eric Carvalho Mar 5 '13 at 17:59
1  
sudo dd bs=4M if=~/Downloads/RetroPieImage_ver1.2.1.img of=/dev/sdd –  papadoo1 Mar 5 '13 at 18:05
1  
Did you double check your mistake? Have you validated that the image indeed was not written to the Pi? Isn't the HDD issue a coincidental problem? When checking the HDD's partition table, did you not accidentally look at /dev/sdd? Not to give false hope, but panic begets foolish mistakes. –  zwets Mar 5 '13 at 18:37
add comment

1 Answer

With that dd command you have lost some data.

You can try to recover data using testdisk and/or photorec

sudo apt-get install testdisk

photorec is part of the testdisk package

Here is a step by step tutorial

See also: https://help.ubuntu.com/community/DataRecovery

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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