RecuperaBit icon indicating copy to clipboard operation
RecuperaBit copied to clipboard

Is there a way to manually set sector size? I think recuperabit is assuming my 4096 sector size disk has 512 sector size.

Open left1000 opened this issue 3 years ago • 5 comments

Is there a way to manually set sector size? I've got an image of a harddrive where the sector size is 4096 (because on modern harddrives that is what it is) but a lot of linux cli functions default to 512 sector size (and usually include an option flag to select an alternate sector size.)

Maybe I'm just wrong about how many sectors I have, but Recuperabit did find file/index records once every 8 sectors, which would fit with my theory. This also means recuperabit is going 8 times slower than it needs to on most modern harddrives?

left1000 avatar Jan 02 '22 08:01 left1000

Currently there is no option for this, but it's a useful request.

Lazza avatar Jan 02 '22 16:01 Lazza

I mean I might be wrong, if I'm wrong the feature is useless (recuperabit is already choosing the right sector size) but if I am right? reuperabit is almost always choosing the wrong sector size (at least on modern hdds). Of course the code for this idea is way over my head :)

left1000 avatar Jan 02 '22 21:01 left1000

To clarify, currently RecuperaBit is not "chosing" any size, it is set as a constant equal to 512. 😅

Lazza avatar Jan 21 '22 14:01 Lazza

Hm. I found this ticket and started wondering if it affects me. For the record, sector size can be easily seen by running fdisk. In my case, the output is:

Sector size (logical/physical): 512 bytes / 4096 bytes

I guess logical sector size is what we're looking for, right? And if that number was different, then simply editing constants.py should be enough, correct?

AlexDaniel avatar May 22 '22 16:05 AlexDaniel

What we are concerned with is the sector size used by the file system, not by the physical disk. If the logical size is 512, you should be OK.

Lazza avatar Jul 10 '22 20:07 Lazza