LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
LinkBack Search this Thread
Old 02-24-2008, 07:40 AM   #1
stephantom
LQ Newbie
 
Registered: Feb 2008
Posts: 2

Rep: Reputation: 0
Post How to recover a directory on a FAT32 partition?


Hello everyone,

I've got myself some nice FAT32 file system corruption.
Watch what happens if I try to list the files on that partition:

Code:
~$ ls
ls: cannot access (directory name here): Input/output error
(correct display of all other files/directories)
So I suspect that either me or truecrypt (this is a TC partition) managed to damage something related to that directory entry in the FAT.
I tried using testdisk on the unmounted volume and I am able to browse the files in that particular directory, so they still seem to be there. However, extraction does not seem possible (testdisk does not support that).

As the files are NOT deleted I had no luck with foremost/dls.
I guess what I'd need would be a way to either make the directory reable again or extract the contents of that directory directly from the device file.

I also tried dosfsck, I suggests to unlink all files within that particular directory from the FAT. I don't think I want to be doing that.

Any help on that matter is really really appreciated!
 
Old 02-24-2008, 09:23 AM   #2
ronlau9
Senior Member
 
Registered: Dec 2007
Location: In front of my LINUX OR MAC BOX
Distribution: Mandriva 2009 X86_64 suse 11.3 X86_64 Centos X86_64 Debian X86_64 Linux MInt 86_64 OS X
Posts: 2,369

Rep: Reputation: Disabled
how to recover a directory on fat 32 partition

If you,re still also running windos me or 98 try scandisk
As I remember from the past it had the option automatic or manually repair
Scandisk was also a part of the recovery floppy


good luck
 
Old 02-24-2008, 10:53 AM   #3
jiml8
Senior Member
 
Registered: Sep 2003
Posts: 3,171

Rep: Reputation: 114Reputation: 114
you also can run chkdsk on that partition if you have WinNT/2000/XP/Vista. You might create a DOS boot floppy or boot CD and try scandisk from that. You can find DOS boot images on the web; google for it.

Beyond that, I suggest making an image of the partition so you have a backup and can play. dosfsck is effectively asking you if it can delete the files when it asks if you want to unlink them from the FAT; if you do this, then run an undelete tool, that could work. However, if it doesn't work your problems could be compounded which is why I suggest imaging the partition first.
 
Old 02-24-2008, 02:21 PM   #4
Christophe GRENIER
TestDisk & PhotoRec lead developer
 
Registered: Jun 2007
Posts: 12

Rep: Reputation: 2
Quote:
Originally Posted by stephantom View Post
Hello everyone,

I've got myself some nice FAT32 file system corruption.
Watch what happens if I try to list the files on that partition:

Code:
~$ ls
ls: cannot access (directory name here): Input/output error
(correct display of all other files/directories)
So I suspect that either me or truecrypt (this is a TC partition) managed to damage something related to that directory entry in the FAT.
I tried using testdisk on the unmounted volume and I am able to browse the files in that particular directory, so they still seem to be there. However, extraction does not seem possible (testdisk does not support that).
Since TestDisk 6.9, you can copy files from a FAT partition.
Latest 6.10-WIP can be used to recover deleted files.

Good luck,

Christophe
 
Old 02-24-2008, 03:54 PM   #5
stephantom
LQ Newbie
 
Registered: Feb 2008
Posts: 2

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Christophe GRENIER View Post
Since TestDisk 6.9, you can copy files from a FAT partition.
Latest 6.10-WIP can be used to recover deleted files.
Thank you so much! That tip was pure gold!
testdisk 6.9 is copying the "lost" files just now!
 
  


Reply

Tags
corruption, fat32, filesystem, recovery, truecrypt


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 On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Recover FAT32 disk chrisstooss Linux - Hardware 2 01-04-2007 04:57 PM
Lost My Files--Help needed to recover them (Reiser over FAT32) svasanth Linux - General 3 09-06-2006 09:09 PM
lost fat32 partition during resize. Is it possible to recover some files? gkiagia Linux - Hardware 3 07-23-2006 09:15 AM
Software to help me recover 'Deleted' FAT32 Partition Data? flamesrock Linux - Software 8 07-26-2005 10:39 PM
recover deleted files on fat32/ntfs partitons? niteshadw Linux - Software 1 04-21-2005 10:23 AM


All times are GMT -5. The time now is 09:52 AM.

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