photorec "finds" a .sxw file that's as large as the entire rest of the drive, making successful recovery impossible

Using PhotoRec to recover lost data
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
Locked
Message
Author
nukla
Posts: 1
Joined: 28 Feb 2020, 00:33

photorec "finds" a .sxw file that's as large as the entire rest of the drive, making successful recovery impossible

#1 Post by nukla »

Hello,
first and foremost a huge thanks for creating this software! I have used it fairly often over the past years and have helped many friends and relatives with it!

Now to my problem, I'm looking for a specific .ods (OpenDocument Spreadsheet) file on a NTFS partition. I've had no luck with testdisk and other tools (r-studio) also failed, so it seems like I have to resort to file carving with photorec. From what I have found online, to search for ods files in photorec I have to enable zip in the file options and nothing else. When I start the search photorec finds 8 files (some zips and some OpenDocument files which are unfortunately not the ones I need) within a few seconds, but afterwards nothing else for the entire scan (30 minutes). When looking at the recovered files while photorec is still scanning, I can see a .sxw file that keeps continuously growing as the scan proceeds, until I eventually run out of space (the image file I'm scanning is 117GiB while I only have about 108GiB of free space left).

When looking at that .sxw file in a hex editor the typical "PK" can be seen at the beginning of the file, but it quickly becomes apparent that it should have been only a few kilobytes in size, as by scrolling down one can quickly find a lot of other data like raw zips, pngs and exe files. I'm not experienced enough to fix/understand that bug on my own, so I'm asking for help here.

Some other info:
I'm using photorec 7.1 on Arch Linux from the official repositories. The image I'm scanning was created by testdisk 7.2 wip on Windows (it imaged the system drive while the system was running, not sure how bad that is). When I enable other file types (in my example bmp files) the problem seems to fix itself (the "found" .sxw file grows to a few hundred megabytes and then disappears as other file types are being discovered or something). I'm currently using that as a workaround for my problem.

It seems like I can't attach files here, so here's a hexdump of the first 100kiB of the .sxw file generated by xxd. I don't know how much that helps
User avatar
cgrenier
Site Admin
Posts: 5441
Joined: 18 Feb 2012, 15:08
Location: Le Perreux Sur Marne, France
Contact:

Re: photorec "finds" a .sxw file that's as large as the entire rest of the drive, making successful recovery impossible

#2 Post by cgrenier »

As you have notice, you must not disable the other file types in FileOpts to avoid an overlarge file.
If you don't get better results with photorec 7.2-WIP, you can enable Keep Corrupted Files in Options and try to fix the zip/sxw/ods file.
Locked