In a nutshell: I have a broken directory that I believe is now inaccessible because of disconnecting during the middle of a file transfer and I want to rescue files from said folder.
So here's the story. I have a microSD card that has a single partition, formatted in FAT32. I was moving some files from it to my Linux system (the card was in a USB card reader), when suddenly the drive disconnected. This happens from time to time for whatever reason- and kinda got in my ways of recovering(trying to recover, at least) files. So I kinda persisted and plugged the drive in and out whenever it disconnected- as expected, each time it would be disconnected throughout the copying process.
So I gave it up for the time being. Later when I plugged the card in to my PC again- the files weren't there. The directory that the files were in, however, was. Now what I tried so far:
I have tried to make a copy of the partition using dd/ddrescue, but to no avail. Like I said, drive seems to just... disconnect, completely disappear during read operations. I have tried different USB ports, it almost seemed like it worked, until it didn't. No- it's not a loose connection. The card reader's light also seems to be lit up the entire time.
I have tried both testdisk and photorec. Again, drive sometimes disconnects with no issue or error whatsoever relating to the disconnect from what I see, so I could barely finish the "Free" search option in photorec to search "free" blocks on the drive. Testdisk... well, when I try to access the directory I mentioned, it just says "No file found, filesystem may be damaged.", this also happens when I try to cd into the directory in a shell- just gives me an I/O error. So I can't get anything out of this directory at all as it is now with testdisk. Photorec.. It found a bunch of files, but they seem to be incomplete? I can't really open them- and also I need their names to be intact as well.
Now I tried fsck.fat, but haven't written any changes from it as of yet. Here is what fsck wants to do (at least ones that catch my attention):
- Tons of clusters are out of range, and what it does about it is "Setting to EOF".
- The very directory that the files inside are lost in shows up in fsck's messages. It says "Checking /path/to/dir. Contains a free cluster (number). Assuming EOF." A bunch of other folders show up like this- but those were empty(I believe) to begin with.
- Some files are truncated because their file size is bigger than the cluster chain length apparently- but they are unrelated to the files I'm trying to recover.
So, what should I do? Please guide me- I have tried my best to find anything on the internet that could help me, but couldn't really find much- at least nothing that really helped or was really related to this. I have tried all methods I have found all of which I more or less already knew.
Things that are possibly worth mentioning:
I believe I accidentally plugged this card into a similar but wrong slot and plugged in the reader. Nothing really happened- and nothing seemed to be bad after I plugged it out and put it in the right slot. The card just didn't get read for that duration- and all my files were still there I believe. I think it all happened after this recent "disconnect during file transfer" incident.
I haven't put this card back into my smart phone yet.
It seems that if I connect my phone to my pc and use MTP(done this before- not after this incident), the SD Card shows up as a folder and the phone itself doesn't randomly disconnect. I don't know if this would be useful as it doesn't appear as a partition but as a mere directory next to "Internal Storage" on the PC- I just couldn't make any use of it myself.
I haven't tried writing anything because... well... thought I might end up overwriting the needed files.
I can't pay for any software sadly.
It does not show up as read-only. I'm just trying to recover some files from a certain directory.