LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 01-11-2012, 03:47 PM   #1
conormacaoidh
Member
 
Registered: Mar 2009
Distribution: Fedora
Posts: 41

Rep: Reputation: 15
Repair FAT hard drive superblock


Hi,

I'm attempting to fix a friend's hard drive for them. I'm pretty sure its formatted with FAT, but can't be certain. It's a 2.5" drive, i stripped the case and used a hard drive enclosure to access it.

I can't mount the drive, but "/dev/sdb" does appear when I plug it in. When trying to mount the drive i get this error:

Code:
[root@conor ~]# mount /dev/sdb /mnt/temp
mount: /dev/sdb: can't read superblock
fdisk -l doesn't show the disk, gparted doesn't show the disk.

I've tried fsck as well:

Code:
[root@conor ~]# fsck.vfat /dev/sdb
dosfsck 3.0.12, 29 Oct 2011, FAT32, LFN
Got 0 bytes instead of 512 at 0
I've also tried using testdisk to examine the drive, but it doesn't show up on the list of devices within fdisk.

I'm really at a loss as to what to do next, any advice would be helpful

thanks
 
Old 01-11-2012, 04:03 PM   #2
Doc CPU
Senior Member
 
Registered: Jun 2011
Location: Stuttgart, Germany
Distribution: Mint, Debian, Gentoo, Win 2k/XP
Posts: 1,099

Rep: Reputation: 344Reputation: 344Reputation: 344Reputation: 344
Hi there,

Quote:
Originally Posted by conormacaoidh View Post
Code:
[root@conor ~]# mount /dev/sdb /mnt/temp
mount: /dev/sdb: can't read superblock
have you tried to force -t vfat? Probably you have, to no avail.

Quote:
Originally Posted by conormacaoidh View Post
fdisk -l doesn't show the disk, gparted doesn't show the disk.

I've tried fsck as well:

Code:
[root@conor ~]# fsck.vfat /dev/sdb
dosfsck 3.0.12, 29 Oct 2011, FAT32, LFN
Got 0 bytes instead of 512 at 0
I've also tried using testdisk to examine the drive, but it doesn't show up on the list of devices within fdisk.
That's really weird. Summing all up, my concern is that the drive may be physically corrupted. Things like these happen when the drive's controller isn't able to even access the disk itself. Then it would announce itself as an IDE or SATA controller to the host system, but with no storage media. Had exactly that with a Fujitsu HDD a few years ago: It reported itself correctly to the BIOS, with type and model number, but any attempt to read a sector would only produce a block of 0-bytes.
Does your friend have precious data stored on that disk? If not, I'd declare the unit junk; if yes, consider spending a few 100$ for a professional data rescue expert.

[X] Doc CPU
 
Old 01-11-2012, 05:21 PM   #3
mmrtnt
LQ Newbie
 
Registered: Nov 2006
Location: las vegas, nevada
Distribution: fedora core x
Posts: 25

Rep: Reputation: 8
I seem to remember something about alternative superblocks.

I looked this up real quick.

Good luck!
 
Old 01-13-2012, 02:58 PM   #4
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,297

Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
Quote:
[root@conor ~]# mount /dev/sdb /mnt/temp
mount: /dev/sdb: can't read superblock
It's trying ext. You want MBR, not superblock. and you want the partition

mount -t vfat or -t ntfs-3g /dev/sdb1


Presuming that doesn't work

If fdisk -l doesn't show it that looks grim. Try
hdparm -i /dev/sdb
hdparm -I /dev/sdb
smatrctl [clevber optione] /dev/sdb # man smartctl with coffee required

The first reads what the kernel picked up, the second asks the disk personally. Rhe third is a health check.

The best for that sort of thing is testdisk, imho. also try

dd if=/dev/sdb of=mbr bs=512 count=1. That's the mbr.

Last edited by business_kid; 01-13-2012 at 02:59 PM.
 
1 members found this post helpful.
Old 01-13-2012, 05:31 PM   #5
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,982

Rep: Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626
Mount it raw and look at the first few blocks with a hex editor.
 
Old 01-14-2012, 04:10 AM   #6
Doc CPU
Senior Member
 
Registered: Jun 2011
Location: Stuttgart, Germany
Distribution: Mint, Debian, Gentoo, Win 2k/XP
Posts: 1,099

Rep: Reputation: 344Reputation: 344Reputation: 344Reputation: 344
Hi there,

Quote:
Originally Posted by business_kid View Post
and you want the partition

mount -t vfat or -t ntfs-3g /dev/sdb1
I guess using sdb1 (the partition) instead of sdb (the entire drive) is the key here. I completely missed that in my first post too.
By the way, I would preferrably leave the -t parameter out and let the OS auto-detect the file system. Works well most of the time.

[X] Doc CPU
 
  


Reply



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
Possible hard drive repair? kieranmullen Linux - Newbie 8 10-29-2010 02:47 PM
Trying To Repair Damaged Hard Drive kool_kid Linux - Server 3 09-09-2008 11:26 AM
Repair Hard Drive Sectors raylhm Linux - Hardware 7 02-05-2008 09:33 AM
Bad superblock when mounting hard drive... SamJ Linux - Hardware 5 06-04-2005 07:32 PM
recovering a fat 32 hard drive kingswood76 Linux - General 13 07-26-2002 08:29 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 04:17 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration