My partition table is toast, but the actual area where files exist has not been touched.
I tried testdisk but it says the superblock is corrupted so I was unable to recover the partition and see the files.
I tried photorec and it brought back every file except my binary files that have no extension and lack magic numbers.
But I really, really, really need these binary files.
Is there a way to configure/hack/trick PhotoRec to get everything by not requiring extensions or magic numbers?
If not, can someone show me the source code where this requirement is made and suggest a patch so it just recovers all possible files irregardless of missing extensions and magic numbers?
Configure PhotoRec To Recover All Inodes And Zone 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
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
- cgrenier
- Site Admin
- Posts: 5432
- Joined: 18 Feb 2012, 15:08
- Location: Le Perreux Sur Marne, France
- Contact:
Re: Configure PhotoRec To Recover All Inodes And Zone Data
What was the filesystem type of your partition ? ext2/3/4, xfs ?
PhotoRec only works with magic bytes.
PhotoRec only works with magic bytes.
Re: Configure PhotoRec To Recover All Inodes And Zone Data
It was ext4.
I'm a bit confused after reading up on ext4 inodes https://en.wikipedia.org/wiki/Inode In order to find the data associated with the magic bytes of a specific file it must read the inode block where the magic number is found.
So does test disk only look for a string of magic numbers and secondly confirm the inode block it is within, then use the inode block to get the pointers to the data? vs....
Searching for inodes, then checking the inodes fields for extensions and magic numbers, then reading those inode pointers to get data?
-
- Posts: 2729
- Joined: 04 Jan 2019, 09:48
- Location: Hannover, Deutschland (Germany, Allemagne)
Re: Configure PhotoRec To Recover All Inodes And Zone Data
In this case you have to contact a professional recovery service.
No.Is there a way to configure/hack/trick PhotoRec to get everything by not requiring extensions or magic numbers?
You don't need PhotoRec for that.If not, can someone show me the source code where this requirement is made and suggest a patch so it just recovers all possible files irregardless of missing extensions and magic numbers?
You just produce files as combinations of all available clusters. Unfortunately that number of files is already bigger than the numbers of atoms in the universe.
Re: Configure PhotoRec To Recover All Inodes And Zone Data
That sounds intimidating. I'm under the assumption that a programmer would just need to create a disk image. Open the disk image and seek block by block. When encountering a block just check if it fits the bit structure of an inode. Then use the inode checksum to make sure of it's integrity. It it passes that test, then use the pointers to the zone data of the file. Write that file to a recovery disk. Then move to the next block to read. It would seem that magic numbers and ext are an unnecessary factor in recovery and instead it's whether or not the inode and it's corresponding zones are intact.recuperation wrote: ↑28 Feb 2020, 16:03 You don't need PhotoRec for that.
You just produce files as combinations of all available clusters. Unfortunately that number of files is already bigger than the numbers of atoms in the universe.
Is there something wrong with my logic?
-
- Posts: 2729
- Joined: 04 Jan 2019, 09:48
- Location: Hannover, Deutschland (Germany, Allemagne)
Re: Configure PhotoRec To Recover All Inodes And Zone Data
Yes.
Fingerprinting, ("magic numbers") is a fantastic generalized concept that enables recovery in cases of extreme destruction where metadata (p.e. inodes) is lost. It can be easily extended to new formats.
Beside PhotoRec which appears to me as the most powerful one according to independent third party tests - despite being a free and open source program.
There are commercial programs that use the same approach.
Other approaches are possible.
Re: Configure PhotoRec To Recover All Inodes And Zone Data
So PhotoRec doesn't rely on identifying ext4 inode blocks to link to a corresponding extent where the file data is stored? And goes directly after the extent block of a file, where upon reading the extent data a magic number is found at the beginning or not?recuperation wrote: ↑28 Feb 2020, 17:01 Fingerprinting, ("magic numbers") is a fantastic generalized concept that enables recovery in cases of extreme destruction where metadata (p.e. inodes) is lost. It can be easily extended to new formats.
Beside PhotoRec which appears to me as the most powerful one according to independent third party tests - despite being a free and open source program.
There are commercial programs that use the same approach.
Other approaches are possible.
-
- Posts: 2729
- Joined: 04 Jan 2019, 09:48
- Location: Hannover, Deutschland (Germany, Allemagne)
Re: Configure PhotoRec To Recover All Inodes And Zone Data
No. That's why defragmentation determines the recovery success.
Re: Configure PhotoRec To Recover All Inodes And Zone Data
So if a file's data is written in non contiguous blocks it is not recoverable by this the magic number method?recuperation wrote: ↑28 Feb 2020, 18:12 No. That's why defragmentation determines the recovery success.
-
- Posts: 2729
- Joined: 04 Jan 2019, 09:48
- Location: Hannover, Deutschland (Germany, Allemagne)