LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices

Reply
 
Search this Thread
Old 05-10-2013, 12:47 AM   #1
ivanatora
Member
 
Registered: Sep 2003
Location: Bulgaria
Distribution: Ubuntu 9.10, FreeBSD 7.2
Posts: 459

Rep: Reputation: 31
FAT filesystem - bad superblock


Hello,
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:

Code:
$ sudo mount /dev/sdb1 tmp
[sudo] password for ivan: 
mount: /dev/sdb1: can't read superblock
Tried to fsck it:

Code:
$ 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:

Code:
$ 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.

[UPDATE] dd failed with Input/output error after copying 2.7 GB. Is it possible the card is really broken?

Last edited by ivanatora; 05-10-2013 at 12:58 AM.
 
Old 05-10-2013, 12:54 AM   #2
pan64
Senior Member
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 4,478

Rep: Reputation: 1220Reputation: 1220Reputation: 1220Reputation: 1220Reputation: 1220Reputation: 1220Reputation: 1220Reputation: 1220Reputation: 1220
usually FAT has a backup too. you can try testdisk to fix your SD card.
 
1 members found this post helpful.
Old 05-10-2013, 01:02 AM   #3
ivanatora
Member
 
Registered: Sep 2003
Location: Bulgaria
Distribution: Ubuntu 9.10, FreeBSD 7.2
Posts: 459

Original Poster
Rep: Reputation: 31
Do you mean photorec? I've installed it from a packet named 'testdisk'. I've already tried it, but with a very limited success.

[EDIT]
Ah, testdisk is different! And it did the job!
Here is what I did:
sudo testdisk

>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

Last edited by ivanatora; 05-10-2013 at 01:44 AM.
 
Old 05-10-2013, 01:46 AM   #4
pan64
Senior Member
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 4,478

Rep: Reputation: 1220Reputation: 1220Reputation: 1220Reputation: 1220Reputation: 1220Reputation: 1220Reputation: 1220Reputation: 1220Reputation: 1220
I mean this: http://www.cgsecurity.org/wiki/TestDisk_Step_By_Step
 
  


Reply

Tags
broken, fat, superblock


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Unable to mount FAT drives (wrong fs type, bad option, bad superblock on /dev/sdb1) tacticalbread Slackware 3 02-24-2011 03:25 PM
mdadm : mount = specify filesystem or bad superblock error ron7000 Linux - Software 3 05-14-2008 02:48 PM
Bad mount of .mdf - "wrong fs type, bad option, bad superblock, on /dev/loop0" Maybe-not Linux - General 2 02-29-2008 01:30 PM
mount: wrong fs type, bad option, bad superblock on /dev/sda1 yekim Linux - Hardware 10 07-05-2007 11:28 AM
how important is superblock to FAT fs? ramya272 Programming 6 03-07-2004 10:14 PM


All times are GMT -5. The time now is 09:16 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration