3 ms·
I've seen people try to use dd to clone a bad disk before tossing it or attempting recovery - while dd is not the right tool for the job, ddrescue [0] is. ddre
by ComputerGuru 10y ago
I've seen people try to use dd to clone a bad disk before tossing it or attempting recovery - while dd is not the right tool for the job, ddrescue [0] is.
ddrescue gives you options for error handling and will skip past bad blocks, it handles read errors much more gracefully.
[0]: https://www.gnu.org/software/ddrescue/ https://www.gnu.org/software/ddrescue/
- wa2flq 10y agoAgreed,using dd on media with flaws is not straight forward. See http://www.noah.org/wiki/Dd_-_Destroyer_of_Disks http://www.noah.org/wiki/Dd_-_Destroyer_of_Disks
- chillingeffect 10y agoBreaking your silence! Are you Mr. Spurrier? Ciao.
- beams_of_light 10y agoYou can specify options with dd to handle errors as well, such as padding unreadable blocks on the destination.
- wa2flq 10y agoIf you use block multiples on media with defects to speed things the good data fills the buffer first, then the remainder is zero padded for the blocks in error. This shifts good data relative to its original position and most likely further corrupts your attempts at recovery - BTDT. This page explains the challenge - https://wiki.archlinux.org/index.php/disk_cloning https://wiki.archlinux.org/index.php/disk_cloning
- eltoozero 10y agoddrescue and gddrescue also have restartable mode for failing drives, very very handy feature. I've recovered numerous otherwise unmountable Mac/Windows drives using ddrescue, mmls, sleuthkit, and foremost. Usually I'm able to lsblk to determine the block device, rip the data partition with ddrescue and mount it loopback with mount once I use mmls to confirm the partition type. For Mac volumes that dont mount, either fsck.hfsplus or get the file to a Mac to run diskwarrior (Alsoft has been repairing HFS volumes for a couple decades). If nothing else works once you've got the raw bits saved, foremost will usually scrape something worthwhile off your image file.
- NamTaf 10y agoThe other cool thing ddrescue does is will 'mine' away at the failing blocks by reading it from both forward and reverse and clawing out every last bit of data it can. That, coupled with the resumption capacity, logging feature and ability to specify the number of retries on bad blocks, makes it a very useful tool and I've used it to save both my drives and aquainteances' drives many times over the years. I can't sing the praises of ddrescue enough. NB: ddrescue and dd_rescue are not the same!