Hi,

I'm deleting a harddrive with 4 partitions. I created mapfiles of partition 3 and 4 with partclone -D respectively and used something like ddrescue -yD bigfilewithzeros /dev/sdb3 part3.mapfile to overwrite only the used parts.

Then I remembered, freed areas will not be overwritten and, thus some deleted files might still be recoverable. So I do need to overwrite the whole disk, but want to save me the time to overwrite those sectors I already overwrote.

I know ddrescuelog can be used to transform and merge mapfiles.
So I first shifted the partition-based mapfiles to represent the whole-disk addresses: ddrescuelog --shift -b 4096 -o 58983168s part3.mapfile >hdd-section-of-part3.mapfile ddrescuelog --shift -b 4096 -o 117902336s part4.mapfile >hdd-section-of-part4.mapfile

Now I want to merge the finished sections of these mapfiles, and this fails:
ddrescuelog -z hdd-section-of-part4.mapfile hdd-section-of-part3.mapfile >merged

diff -u hdd-section-of-part3.mapfile merged # practically no difference
diff -u hdd-section-of-part4.mapfile merged # practically no lines in common

I expected the finished areas from partition4 to be marked as finished in 'merged', but instead it contains just a copy of hdd-section-of-part3.mapfile.

What am I doing wrong?

Martin Castillo
# Mapfile. Created by GNU ddrescuelog version 1.29.1
# Command line: ddrescuelog --shift -b 4096 -o 58983168s audio-pc.part3.mapfile
# Start time:   2026-01-08 00:02:40
# current_pos  current_status  current_pass
0x38308FF000     ?               1
#      pos        size  status
0x00000000  0x3840300000  ?
0x3840300000  0x015AA000  +
0x38418AA000  0x00001000  ?
0x38418AB000  0xFA44B000  +
0x393BCF6000  0x0C68A000  ?
0x3948380000  0x18EFC1000  +
0x3AD7341000  0x00001000  ?
0x3AD7342000  0x00EA7000  +
0x3AD81E9000  0x00001000  ?
0x3AD81EA000  0x03673000  +
0x3ADB85D000  0x00001000  ?
0x3ADB85E000  0x04714000  +
0x3ADFF72000  0x00001000  ?
0x3ADFF73000  0x01927000  +
0x3AE189A000  0x00001000  ?
0x3AE189B000  0x00029000  +
0x3AE18C4000  0x00001000  ?
0x3AE18C5000  0x00006000  +
0x3AE18CB000  0x358F334000  ?
# Mapfile. Created by GNU ddrescuelog version 1.29.1
# Command line: ddrescuelog --shift -b 4096 -o 117902336s audio-pc.part4.mapfile
# Start time:   2026-01-08 00:02:59
# current_pos  current_status  current_pass
0x3FFFFF000     ?               1
#      pos        size  status
0x00000000  0x7070C00000  ?
0x7070C00000  0x04AB0000  +
0x70756B0000  0x005C0000  ?
0x7075C70000  0x0017D000  +
0x7075DED000  0x00083000  ?
0x7075E70000  0x00521000  +
0x7076391000  0x5AA5B000  ?
0x70D0DEC000  0x54909000  +
0x71256F5000  0x00306000  ?
0x71259FB000  0x026AA000  +
0x71280A5000  0x00AD9000  ?
0x7128B7E000  0x04000000  +
0x712CB7E000  0x04000000  ?
0x7130B7E000  0x00081000  +
0x7130BFF000  0x00001000  ?
0x7130C00000  0x00080000  +
0x7130C80000  0x0C7A0000  ?
0x713D420000  0x3337DF000  +
# Mapfile. Created by GNU ddrescuelog version 1.29.1
# Command line: ddrescuelog -z hdd-section-of-part4.mapfile 
hdd-section-of-part3.mapfile
# Start time:   2026-01-08 00:16:28
# current_pos  current_status  current_pass
0x38308FF000     ?               1
#      pos        size  status
0x00000000  0x3840300000  ?
0x3840300000  0x015AA000  +
0x38418AA000  0x00001000  ?
0x38418AB000  0xFA44B000  +
0x393BCF6000  0x0C68A000  ?
0x3948380000  0x18EFC1000  +
0x3AD7341000  0x00001000  ?
0x3AD7342000  0x00EA7000  +
0x3AD81E9000  0x00001000  ?
0x3AD81EA000  0x03673000  +
0x3ADB85D000  0x00001000  ?
0x3ADB85E000  0x04714000  +
0x3ADFF72000  0x00001000  ?
0x3ADFF73000  0x01927000  +
0x3AE189A000  0x00001000  ?
0x3AE189B000  0x00029000  +
0x3AE18C4000  0x00001000  ?
0x3AE18C5000  0x00006000  +
0x3AE18CB000  0x358F334000  ?

Reply via email to