LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 05-05-2002, 05:14 AM   #1
Gaidal
LQ Newbie
 
Registered: May 2002
Location: Sweden
Distribution: Arch x64
Posts: 29
Blog Entries: 2

Rep: Reputation: 0
Desperately need to mount broken VFAT fs


As stated in the topic, I need to mount a VFAT fs to rescue some data before it collapses. It is a 60gb IBM disk with a bad superblock, unrepairable bad blocks, and perhaps worst of all: FAT32. The bad blocks are spreading rapidly, but they should not be able to go outside the disc they are on, so at least two thirds of the disk drive should be fine. Or am I completely wrong?

What I need to do is: Mount the drive in some way without using a correct partition table, while ignoring all errors. Then I have to access as many files as possible, and then run before the drive explodes. This is the final stage. You've got three extra lives and one neutron bomb. Good luck.

Anyway, I have to admit that I haven't even used Linux enough to call myself a good newbie yet. I installed Slackware on a cheap 2gb drive when the crash occurred, and I have been playing around with mount, dd, debugfs and such tools for a couple of days. But since I'm an almost-newbie, I have no clue on how to do this. I've read about similar problems on the net, however, those people were not using VFAT filesystems, for some odd reason. And if this succeeds, neither will I...

All I know is that I somehow need to find a backup superblock (I think I have 32k bytes/sector), but mount does not seem to support "-t vfat" together with "sb=n".

Well then, suggestions? Saving the hdd contents is like saving my life, so please give it a try.

Last edited by Gaidal; 05-05-2002 at 05:16 AM.
 
Old 05-05-2002, 05:57 AM   #2
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
Do you have a disk big enough to keep all this Windows partition? If yes:
dd if=/dev/hda1 of=/mnt/extra/file
This copies the whole hda1 partition to /mnt/extra/file. Remember thet the file will be BIG.
After this you have all data, so you can try to extract as much as you can later.
Mount does not support "sb=n" option with FAT, sorry. You can also try with fdisks (both Linux and DOS versions), but after you have a copy of your data.
 
Old 05-05-2002, 07:35 AM   #3
Gaidal
LQ Newbie
 
Registered: May 2002
Location: Sweden
Distribution: Arch x64
Posts: 29

Original Poster
Blog Entries: 2

Rep: Reputation: 0
Yes, I have another disk with alot of space. I tried to dd, but got errors no matter how I mounted the file, might be superblock related. And even if I was able to do this, how could I possibly extract the data? In what way would fdisk help me? And one more thing, is it OK if I use skip=xx and dd from the middle of the partition, because the first two partitions are empty, but I don't know exactly where they end...

Thanks.
 
Old 05-05-2002, 11:24 AM   #4
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
To use dd you don't need to mount anything.
hda1 is first partition on your first hd. hda2 is the second partition and so on.
use cat /proc/partitions to look which partitions is which. If you think about 3rd partition, it can be hda6. It's true is you have one partition for Windows and 2 (or more) extra for data. As Windows don't like more than one primary partitions (hda1, hda2, hda3, hda4), those extra are likely to be logical (hda5, hda6 etc).
Skip should be ok.
It'll be rather easy to get text (just search the big file and copy your data), much bigger problem with programs...
 
Old 05-05-2002, 12:54 PM   #5
Gaidal
LQ Newbie
 
Registered: May 2002
Location: Sweden
Distribution: Arch x64
Posts: 29

Original Poster
Blog Entries: 2

Rep: Reputation: 0
No mounting required to use dd, but to use the file I create. The really important files are not text files, unfortunately... So what can I do to find them? I can save the data with dd, and I know the filesystem, but where is file name information stored?

If I extract a whole partition, is it possible to mount it? I always get an error that goes like "wrong fs type, bad loop-something, or too many filesytems mounted".

Well, I know what partition it is since I originally made the partition table in fdisk (Linux version).

Sorry for asking too many questions, I'm starting to panic. Which I shouldn't.
 
Old 05-05-2002, 03:00 PM   #6
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
You can mount a file, no problem. The thing will be to fix it before mounting... I suggest a good guide to FAT filesystem ( I think I have something like this at home, but it needs some digging). After fixing it (with a backup copy, of course) you'll be able to mount it. The thing is to fix it. Note down the error you get while mounting it. It'll help much (tell use what's wrong and what to fix).
 
Old 05-05-2002, 03:26 PM   #7
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
Look at www.cgsecutity.org/testdisk.html
Looks quite promising... I'm searching for more.
 
Old 05-07-2002, 10:11 AM   #8
Gaidal
LQ Newbie
 
Registered: May 2002
Location: Sweden
Distribution: Arch x64
Posts: 29

Original Poster
Blog Entries: 2

Rep: Reputation: 0
As far as I know, the FAT file system keeps two copies of the File Allocation Table on the drive, and both of these seem to be destroyed. Testdisk could not find anything such, even after searching for ten hours with different methods. Partition Magic failed as well. And if the FAT is gone, how could I possibly mount the file? This is, most likely, the error that prevents me from mounting my copy.

If I had made a copy at once, I would probably have been able to recover some data, but now it really seems impossible.

If you still think it is possible to extract even one file, except text data, please tell me. Otherwise I will low-level format the drive, or send it to IBM if necessary. After thinking about this for nearly a week, I think I am prepared to forget about all data, and Start Over... Wisdom through suffering.

Thanks alot for helping me!
 
Old 05-07-2002, 07:00 PM   #9
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
There's a toolkit called TCT (The Coroner’s
Toolkit). It's not for the weak, takes a lot of time to image your disks, and even then the outcome ain't guaranteed, but if there is data you would really like to recover, trade time for result I'd say.
 
Old 05-07-2002, 08:06 PM   #10
zmedico
Member
 
Registered: Feb 2002
Location: Mission Viejo, California, USA
Distribution: Gentoo
Posts: 707

Rep: Reputation: 30
Here is another program for imaging a damaged disk:
ftp://ftp.atnf.csiro.au/pub/people/r...ls-current.tgz
http://www.atnf.csiro.au/people/rgooch/linux/
 
  


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
vfat charset mount help Iban Linux - General 3 11-08-2005 09:05 AM
Cannot mount vfat bsdpowa Fedora 5 07-28-2005 09:22 AM
Can't mount VFAT oneandoneis2 Linux - Hardware 5 12-18-2004 10:54 PM
Mount vfat without execute? SharpyWarpy Linux - General 6 04-26-2003 09:22 PM
Mount vfat on startup niteshadw Linux - Distributions 4 04-05-2003 01:37 AM

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

All times are GMT -5. The time now is 02:56 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