1

I got a problem with my SD card which had got Raspbian. Everything seemed to be ok while working with the raspberry.

I inserted it to my laptop running Ubuntu 12.04.4 to fetch some files. It first couldn't load the files from Home partition (boot partition was shown too)so I tried to unmount it from nautilus and ejected the card manually.

Then, when I inserted the card again, it showed one only partition named "+00, and all it shows are files with out any format or extension known and with weird names.

Tried to boot the raspberry with the card but naturally it didn't boot at all.

Partitions actually seem to have disappeared. Is there any way to recover my files?

fdisk -l output:

Disk /dev/sdb: 8068 MB, 8068792320 bytes
249 heads, 62 sectors/track, 1020 cylinders, total 15759360 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000981cb

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1            8192      122879       57344    c  W95 FAT32 (LBA)
/dev/sdb2          122880    15759359     7818240   83  Linux
diegoaguilar
  • 621
  • 3
  • 10
  • 21
  • You can use parted -l to print the partition table. If all is good, I would then try fsck to hopefully fix any filesystem corruption. – Graeme Mar 03 '14 at 13:36
  • I tried sudo fsck -v /dev/sdb1 and got not results. However, partition table print suggests me there's still a solution. What do you think? – diegoaguilar Mar 03 '14 at 13:38
  • So the partition table is ok, just filesystem issues. Which filesystem is it? – Graeme Mar 03 '14 at 13:42
  • Well I used to got raspbian within. I think one FAT and one ext4? – diegoaguilar Mar 03 '14 at 13:43
  • 1
    Probably ext4. I would just google 'repair corrupted ext4 filesystem' there are various things you can try. Unfortunately I don't know the different methods very well. All I can recommend is to backup the partition, sudo dd if=/dev/sdb2 of=sdb2.bak (unmount first). Then do any operations on the backup in case anything causes you to completely lose data. You can mount the backup like this: sudo mount -o loop sdb2.bak somedir – Graeme Mar 03 '14 at 13:51
  • Seach around for forensic tools, they may turn out the only hope of recovering anything from a thrashed SD. – vonbrand Mar 03 '14 at 14:55
  • You can also try ddrescue if there are read read errors with dd. This queation may help too - http://unix.stackexchange.com/questions/14560/how-to-recover-data-from-a-bad-sd-card – Graeme Mar 03 '14 at 15:31

0 Answers0