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.
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
How can I recover my files? More than the system I care about some files at my /home
directory
fsck
yet?!? If fdisk can see partitions, you should be able toe2fsck /dev/sdb2
.Superblock has an invalid journal (inode 8). Clear<y>?
e2fsck -y
, since sometimes there can be a lot of errors. You may lose some data because of this; after the fsck you should be able to mount the partition, then look in/lost+found
-- recovered partial files will be in there, although without their original names.