recoverdm
recoverdm recovers files or complete devices from disks with damaged sectors by writing empty sectors for unreadable ones and continuing. It supports RAW mode reading for CDs/DVDs and includes mergebad to combine multiple images.
Description
recoverdm is designed to recover data from disks with bad sectors, useful in forensics investigations. It can recover individual files or entire devices, replacing unrecoverable sectors with empty ones to continue the process without stopping. For CDs and DVDs, if normal reading fails, it attempts RAW mode reading without error-checking.
The toolkit includes mergebad, a utility to merge multiple images from damaged sources into one correct image, using mapfiles generated by recoverdm that list checksums and bad sectors. This is particularly valuable when multiple copies of a damaged disk are available, allowing reconstruction of a complete image.
Use cases include data recovery from scratched optical media or failing hard drives in forensic contexts, where preserving as much data as possible is critical.
How It Works
recoverdm reads the input device or file sector-by-sector, retrying failed reads a specified number of times (default 6). For unrecoverable sectors, it outputs empty sectors and logs them if -l is used, generating a mapfile with checksums and bad sector lists. For CD/DVD, it falls back to RAW mode reads (default 6 retries, advised min 3). mergebad uses mapfiles to align and merge multiple images, resolving bad blocks by selecting good data from available sources, with options to list common bad blocks or adjust output size.
Installation
sudo apt install recoverdmFlags
Examples
recoverdm -t FILE -i input.img -o output.imgrecoverdm -t CDROM_IDE -i /dev/sr0 -o cd_image.img -l badsectors.map -n 1recoverdm -t DISK_SCSI -i /dev/sdb -o disk_image.img -r 3 -s 1recoverdm -t DVD_IDE -i /dev/sr0 -o dvd.img -l mapfile -p 5recoverdm -t FLOPPY_IDE -i /dev/fd0 -o floppy.img -b 1024mergebad -i badsectors.map damaged.img -o merged.imgmergebad -i mapfile.img -o final.img -l common_bad.map -vmergebad -i mapfile.img -o resized.img -s 1G