4

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
guntbert
  • 13,134
  • Which commands did you run? – Eric Carvalho Mar 05 '13 at 17:59
  • 1
    sudo dd bs=4M if=~/Downloads/RetroPieImage_ver1.2.1.img of=/dev/sdd – papadoo1 Mar 05 '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 05 '13 at 18:37

1 Answers1

6

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

Panther
  • 102,067