Sample Header Ad - 728x90

How to ignore write errors while zeroing a disk?

36 votes
5 answers
22990 views
Say you want to zero-out a failing hard disk. You want to overwrite as much as possible with zeros. What you don't want is: the process aborts on the first write-error. How to do that? AFAICS, plain dd only provides an option for ignoring read errors. Thus, something like dd if=/dev/zero of=/dev/disk/by-id/lousy-vendor-123 bs=128k is not enough. ddrescue seems to be better at ignoring errors - but what would be the optimal command line with it? My try with GNU ddrescue: ddrescue --verbose --force --no-split /dev/zero /dev/disk/by-id/lousy-vendor-123
Asked by maxschlepzig (59512 rep)
Sep 13, 2015, 10:08 AM
Last activity: Sep 11, 2022, 01:08 PM