ddrescue - what are bad sectors look like in the final?

2

I've read tons of docs on ddrescue, but still can't get sure on such a thung: how the bad sectors look in the output image file(or disk) at the end of the ddrescue's work? Manual says it skips bad sectors and doesnt't write anything to the output.. Does this mean the bad sectors contain random data in the final image??

Space

Posted 2014-03-30T11:19:51.117

Reputation: 21

Answers

2

This means that it depends on the mechanism storing the output. If you ddrescue to another drive, damaged sectors are not written to the destination drive, so when reading the sectors back later, you will read the sectors that were there before ddrescue was executed.

If you write to an image file, it depends on the filesystem. Most modern filesystems will null away blocks not written, to prevent disclosure of removed information.

So most probably you will end up with damaged blocks written as blocks with only 0's in them.

You can try for yourself what happens when blocks don't get written by executing: dd if=/dev/zero of=test seek=1024 count=1, which will write a 512K file where only the last 512 bytes are nulled, the rest is determined by the filesystem.

jornane

Posted 2014-03-30T11:19:51.117

Reputation: 977