I ultimately would like to know which files in images generated by (g)ddrescue are affected by damage.
ddrescue) is a tool for recovering data from damaged media.
When specifying the
output.file, a logfile or mapfile can be specified as well, which is highly recommended.
Such a logfile or mapfile some relevant information for being able to resume the recovery process at any time after interruption, which includes a list of damaged areas on the data storage device.
If I have a gddrescue mapfile/logfile, how do I generate a plain list of unreadable LBA's from it?
The mapfile / logfile contains a list of which bytes (hexadecimal numbers) of the source drive is damaged.
It may look like this:
# pos size status 0x00000000 0x00001000 + 0x00001000 0x00002000 - 0x00003000 0x0000A000 +
0x00001000 bytes are 2048 bytes.
In this example, LBA 2 and 3 are unreadable. LBA 1, 4, 5,6,7,8,9,10,11,12,13 and 14 are readable.
'?' copying non-tried blocks
'*' trimming non-trimmed blocks
'/' scraping non-scraped blocks
'-' retrying bad sectors
'F' filling specified blocks
'G' generating approximate mapfile
How can the information in that logfile be used to generate a list of unreadable LBA's?
The badblocks command finds 0 bad blocks from a loop device created from that image file. http://unix.stackexchange.com/questions/459154/list-bad-blocks-and-affected-files
It would be good as well if the loop device could simulate unreadability in areas on the HDD listed in the mapfile/logfile generated by gddrescue.