Help me fix a corrupt Fat32 filesystem resulted from Testdisk processes Topic is solved

Using TestDisk to repair the filesystem
Forum rules
When asking for technical support:
- Search for posts on the same topic before posting a new question.
- Give clear, specific information in the title of your post.
- Include as many details as you can, MOST POSTS WILL GET ONLY ONE OR TWO ANSWERS.
- Post a follow up with a "Thank you" or "This worked!"
- When you learn something, use that knowledge to HELP ANOTHER USER LATER.
Before posting, please read https://www.cgsecurity.org/testdisk.pdf
Post Reply
Message
Author
wert
Posts: 3
Joined: 12 May 2018, 04:27

Help me fix a corrupt Fat32 filesystem resulted from Testdisk processes

#1 Post by wert » 12 May 2018, 04:37

Hi! I used testdisk to rebuild my volume's FS but now many files are corrupt e.g. iso's and archives. Although they open as usual e.g. mounting, extracting they seem all fine but then the resulting data is corrupt e.g. I/O errors when executing binaries, files are missing etc.
Before yesterday I tried to sync/upload files from the volume and the sync app was returning unreadable characters like so :
2018/05/10 01:16:03 [19892] building file list
2018/05/10 01:16:03 [19892] rsync: link_stat "/root/–progress" failed: No such file or directory (2)
2018/05/10 01:16:03 [19892] rsync: change_dir "/root//–files-from=/dev/fd" failed: No such file or directory (2)
2018/05/10 01:16:03 [19892] skipping directory .
2018/05/10 01:16:03 [19892] sent 18 bytes received 12 bytes 60.00 bytes/sec
2018/05/10 01:16:03 [19892] total size is 0 speedup is 0.00
2018/05/10 01:16:03 [19892] rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1183) [sender=3.1.0]
2018/05/10 01:16:29 [20595] building file list
2018/05/10 01:16:29 [20595] rsync: change_dir "/root//–files-from=/dev/fd" failed: No such file or directory (2)
2018/05/10 01:16:29 [20595] skipping directory .
2018/05/10 01:16:29 [20595] sent 18 bytes received 12 bytes 60.00 bytes/sec
2018/05/10 01:16:29 [20595] total size is 0 speedup is 0.00
2018/05/10 01:16:29 [20595] rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1183) [sender=3.1.0]
2018/05/10 01:28:56 [9207] building file list
2018/05/10 01:28:56 [9207] rsync: link_stat "/root/Desktop/disk1/Insttt Dedactics_RMWs.ods" failed: No such file or directory (2)
2018/05/10 01:28:56 [9207] rsync: link_stat "/root/Desktop/disk1/.~lock.Digitalizing RMWs progress.odt#" failed: No such file or directory (2)
2018/05/10 01:28:56 [9207] rsync: link_stat "/root/Desktop/disk1/.~lock.Insttt Dedactics_RMWs.ods#" failed: No such file or directory (2)
2018/05/10 01:28:56 [9207] rsync: link_stat "/root/Desktop/disk1/Insttt Dedactics_RMWs.ods" failed: No such file or directory (2)
2018/05/10 01:28:58 [9207] rsync: link_stat "/root/Desktop/disk1/?¬í#?ñm?.@3#" failed: No such file or directory (2)
2018/05/10 01:28:58 [9207] rsync: link_stat "/root/Desktop/disk1/?o??gc*?.???" failed: No such file or directory (2)
2018/05/10 01:28:58 [9207] rsync: link_stat "/root/Desktop/disk1/?#B?á#?\.##?" failed: No such file or directory (2)
2018/05/10 01:28:58 [9207] rsync: link_stat "/root/Desktop/disk1/±?kï<\ua.\?Æ" failed: No such file or directory (2)
2018/05/10 01:28:58 [9207] rsync: link_stat "/root/Desktop/disk1/T£·?±2Z°.Bcµ" failed: No such file or directory (2)
2018/05/10 01:28:58 [9207] rsync: link_stat "/root/Desktop/disk1/àu?`##iû.ª?e" failed: No such file or directory (2)
2018/05/10 01:28:58 [9207] rsync: link_stat "/root/Desktop/disk1/,å?Å jY?.?+?" failed: No such file or directory (2)
2018/05/10 01:28:58 [9207] rsync: link_stat "/root/Desktop/disk1/d#??¿·?n" failed: No such file or directory (2)
2018/05/10 01:28:58 [9207] rsync: link_stat "/root/Desktop/disk1/?åos?ôhò.x;?" failed: No such file or directory (2)
2018/05/10 01:28:58 [9207] rsync: link_stat "/root/Desktop/disk1/ä¢#?ì÷" failed: No such file or directory (2)
2018/05/10 01:28:58 [9207] rsync: link_stat "/root/Desktop/disk1/?.=_?" failed: No such file or directory (2)
2018/05/10 01:28:58 [9207] rsync: link_stat "/root/Desktop/disk1/?nâ«#A??.1??" failed: No such file or directory (2)
2018/05/10 01:28:58 [9207] rsync: link_stat "/root/Desktop/disk1/#xv({?k¿.?C1" failed: No such file or directory (2)
2018/05/10 01:28:58 [9207] rsync: link_stat "/root/Desktop/disk1/js?i #âñ. ?á" failed: No such file or directory (2)
2018/05/10 01:28:58 [9207] rsync: link_stat "/root/Desktop/disk1/x???¢?ç3.@??" failed: No such file or directory (2)
2018/05/10 01:28:58 [9207] rsync: link_stat "/root/Desktop/disk1/í?aç`v?#.3;¼" failed: No such file or directory (2)
2018/05/10 01:28:58 [9207] rsync: link_stat "/root/Desktop/disk1/º??ªÖ=y4.?(?" failed: No such file or directory (2)
2018/05/10 01:28:58 [9207] rsync: link_stat "/root/Desktop/disk1/[?±Fá?¡#.#éx" failed: No such file or directory (2)
2018/05/10 01:28:58 [9207] rsync: link_stat "/root/Desktop/disk1/???,Ä7F#.#?Æ" failed: No such file or directory (2)
2018/05/10 01:28:58 [9207] rsync: link_stat "/root/Desktop/disk1/&òy?b1 ?.rwë" failed: No such file or directory (2)
2018/05/10 01:28:58 [9207] rsync: link_stat "/root/Desktop/disk1/##í#Üö¡ .ª>?" failed: No such file or directory (2)
2018/05/10 01:28:58 [9207] rsync: link_stat "/root/Desktop/disk1/?ä.??ç" failed: No such file or directory (2)
2018/05/10 01:28:58 [9207] rsync: link_stat "/root/Desktop/disk1/?????g#ô. ?;" failed: No such file or directory (2)
2018/05/10 01:28:58 [9207] rsync: link_stat "/root/Desktop/disk1/?fb~????.?ö²" failed: No such file or directory (2)
2018/05/10 01:28:58 [9207] rsync: link_stat "/root/Desktop/disk1/xA#ëb.ü.?pd" failed: No such file or directory (2)
2018/05/10 01:28:58 [9207] rsync: link_stat "/root/Desktop/disk1/ºåéâä??#.l?¿" failed: No such file or directory (2)
I have tried using dosfck to check/repair the filesystem and it takes unusually too long and outputs full of unreadable characters similar to above.
I don't know what is the nature of the problem but when I used Testdisk to rebuild the filesystem of the truecrypt volume everything seemed flawless; hence I've only realized there's a problem after a couple of days using the volume when after I noticed packages were mostly corrupt e.g. sfs, iso, tar, exe packages' md5/sha checksums don't match.
I don't know whether the problem maybe incapability of the Testdisk program but another thing in the sequence of events is that just before using testdisk, I tried using fdisk to partition the volume when '...NTFS signature is missing' error but then I coudn't be able to mount it since it was showing as /dev/loop1/p1, */p1 or something. This paragraph is more understandable after reading the following.
Following is other information preceding Testdisk's use which is simple and precise:
Looking back further, what led me to come to event of rebuilding the FS with Testdisk is that I was messing around with my HDD's partition table e.g. reorganising partitions and restoring MBR backups severally. All the while my volume and data was still completely intact.
Then at one point, one day, I don't know whether it was my that MBR was faulty or a program called fdisk just was freaking out but following is exactly what I did and/or occurred:
Lets set a few things straight first:

1. All the times that I altered the HDD's PT like I've explained above, I always made sure the turecrypt partition was always primary and with the same number '1'(as it was initially the first one).
2. Apart from restoring the MBR and the method being the explicit bit by bit style, I at all times except one I only used the program Testdisk for partitioning.
I created an extended partition filling the entire HDD then made my volume the first partition there. This differed from the partition's initial configuration in partition number and type of 'logical' than 'primary'. Then I restored an MBR backup. After that, Fdisk started giving errors when trying to create a new 'dos' partition table, so that is when I then used Gparted to create a new ms-dos partition table and then after that mounting the volume in truecrypt would give me: “Error mounting...NTFS signature is missing.
Failed to mount '/dev/sda1': Invalid argument
The device '/dev/sda1' doesn't seem to have a valid NTFS.
Maybe the wrong device is used? Or the whole disk instead of a
partition (e.g. /dev/sda, not /dev/sda1)? Or the other way around?”

I don't know whether the problem maybe incapability of the Testdisk program but another thing in the sequence of events is that just before using testdisk, I tried using fdisk to partition the volume when '...NTFS signature is missing' error but then I coudn't be able to mount it since it was showing as /dev/loop1/p1, */p1 or something.

Right now at least I am able to use my Word documents, pictures, text files and a couple other data, though I'm not sure it's a good idea to mount it not as read-only.
I have so much valuable data stored on the volume not to mention newly added data hasn't been backup from about 18 weeks, and worst thing is that the data stored in the volume is needed for day to day use and the backup drive is broken so no mirror to work from. Thanks in advance for any help or advice.

Sponsored links

User avatar
cgrenier
Site Admin
Posts: 4510
Joined: 18 Feb 2012, 15:08
Location: Le Perreux Sur Marne, France
Contact:

Re: Help me fix a corrupt Fat32 filesystem resulted from Testdisk processes  Topic is solved

#2 Post by cgrenier » 12 May 2018, 08:47

There are probably bad sectors. You should clone the disk to a new empty one using ddrescue, see https://www.cgsecurity.org/testdisk.pdf
Once the copy is done, remove the original disk and try to repair the clone.

wert
Posts: 3
Joined: 12 May 2018, 04:27

Re: Help me fix a corrupt Fat32 filesystem resulted from Testdisk processes

#3 Post by wert » 18 Jun 2018, 01:44

Does you're solution entail that the physical drive is damaged or why shouldn't I repair the original instead of going through all the trouble of cloning? I ask this because I want to know what's the nature of the bad sectors i.e. Is it overwritten data such as MBR + bytes proceeding it?, since, incidentally I happen to have a various backups of the MBR + varied bytes proceeding it and/or from the partition offset. BTW I'm assuming by "repair" you mean "Dosfsck"? Are we on the same page?

wert
Posts: 3
Joined: 12 May 2018, 04:27

Re: Help me fix a corrupt Fat32 filesystem resulted from Testdisk processes

#4 Post by wert » 19 Jun 2018, 13:20

reviewing my question I think this oughta be in truecrypt forum. Thanks alot for quick help. Testdisk rocks.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests