Allow writing data successfully read with --read-sector.
Brought to you by:
ideguy
I have a dink with a failing sector, where reading via hdparm succeeds only every ~16th time, and dd somehow doesn’t get to the data (seek error no matter the seek= value). I want to read the sector with --read-sector, until it succeeds, and then write that data to the sector again, causing a reallocation in the process.
But --read-sector reads the data in a useless format. I found no format that I can convert to binary with e.g. xxd and then back to a hex dump with xxd -r -p to stilll get the same values.
Ideally --read-sector would return binary data, compatible with dd, and --write-sector would allow you to pipe that data back in.
Of course I meant disk.