Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Last night my android phone said it can't read the SD card and it wanted to format it. I pulled it out, put it in a card reader and tried to mount it on my desktop pc:

$ sudo mount /dev/sdb1 tmp
[sudo] password for ivan: 
mount: /dev/sdb1: can't read superblock

Tried to fsck it:

$ sudo fsck.msdos /dev/sdb1
dosfsck 3.0.12, 29 Oct 2011, FAT32, LFN
  Contains a free cluster (2). Assuming EOF.
FAT32 root dir starts with a bad cluster!

And to see if there is actualy anything to mount:

$ sudo fdisk -l /dev/sdb

Disk /dev/sdb: 3951 MB, 3951034368 bytes
122 heads, 57 sectors/track, 1109 cylinders, total 7716864 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: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1            8192     7716863     3854336    b  W95 FAT32

Now I'm doing a dd image before I've broken something else.

I know EXT filesystems have superblock backups across the device that can be used in such a moment. Does FAT have backups?

Do you know any method for recovery?

I've tried photorec and it did manage to retrieve data, but without any file names or directory structure. It doesn't do any good except to restore my pictures, and they are my least concern.

share|improve this question
    
Actually dd failed with Input/output error after copying 2.7 GB... Is it possible that the card hardware is damaged in some way? –  Ivan Petrushev May 10 '13 at 5:56
    
If dd fails it is in 99.999% of the cases a hardware failure. –  Bobby May 10 '13 at 6:54
add comment

1 Answer

up vote 2 down vote accepted

testdisk did the job!

>Create a new log file
[Choose Disk]
>Intel/PC partition
>Advanced
[Choose Partition]
>Boot
>Repair FAT
[Accept Defaults and Write]
>(Q)uit until exited

From here: http://ubuntuforums.org/showthread.php?t=2103994

share|improve this answer
    
This was a life saver, thanks! Two things: 1) In my case, I had to choose "Rebuild BS" before the "Repair FAT" action was open to me. As a comment in the forum thread you linked points out, more info on that (and TestDisk generally) is here: cgsecurity.org/wiki/… 2) You should accept your own answer, I believe that's the protocol. Hopefully it helps people turn up this solution, because it's a common problem! –  Michael Nov 17 '13 at 3:47
    
I'm glad it did a thing for someone. Yeah, probably you are right - accepted the answer. –  Ivan Petrushev Nov 17 '13 at 12:00
    
This worked for me however I experienced partial data loss. Thanks. –  gg_s Dec 27 '13 at 3:00
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.