cgsecurity / testdisk

TestDisk & PhotoRec
https://www.cgsecurity.org/
GNU General Public License v2.0
1.52k stars 189 forks source link

Tell testdisk from which sector to start #140

Closed killuadk closed 4 months ago

killuadk commented 10 months ago

I using Testdisk 7.0 to recover 2 partition From what i test i can only find the 2 partition when i select "None partition table" I can even list my files &folder But After hours of scanning when i press continue it tell me that i can't write partition that i found because i did select No e in the first place so there is no partition table to write in it I did take photo for the start & end sector now i need to repeat scan but is there way to tell testdisk to start from X sector so it will find my partition faster

Artoria2e5 commented 10 months ago

Same issue here -- telling testdisk to skip ahead in the "deeper scan" would be very helpful.

If you know the start and end sectors for both partitions though, you may be able to just create these partitions in a normal partition editor.

cgsecurity commented 10 months ago

It's better to use TestDisk 7.1 or 7.2-WIP than 7.0.

You can choose Stop in Quick Search and next choose Deeper Search. If you know where the partition is, after Quick Search or Deeper Search (Choose Stop to avor the partition search if you want), you can use 'a' to manually add the partition.

In Deeper Search, you can use 'F' (Uppercase) to continue the scan after the end of the first partition ending after the current location. Usually it's a good idea only if you know that the partition already found by TestDisk is correct.

Artoria2e5 commented 6 months ago

Huh… I really wish I could just enter a range to look in. In my particular case, a malfunctioning hard drive enclosure decided to wipe some head part of my disk, but there seems to be some data at the tail end. I know the disk is a default macOS format: 200 MB(without i) EFI part followed by the rest being just HFS+, but the head superblock is clearly gone. If only I could tell testdisk to only look for the backup one somewhere near the end of the disk…


Silly me! Of course with the tail GPT gone, it's stupid to expect the tail superblock to also be there. And it's all encrypted backup, so photorec probably won't do much. Guess I will live with it.

cgsecurity commented 6 months ago

I have uploaded a new 7.2-WIP version (code not yet committed on github). Can you try it ? When searching for a partition, press the key "+" each time you want to skip 5% of the disk.