Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
sudo dd bs=4M if=~/Downloads/RetroPieImage_ver1.2.1.img of=/dev/sdd – papadoo1 Mar 5 '13 at 18:05
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

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:

share|improve this answer

Your Answer


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.