Mar 15, 2011
Before setting up dm-crypt, one is supposed to overwrite the hard disk with random data. As it turns out, this is harder to do than initially expected. Using
/dev/urandom as a data source to overwrite the disk will take ages (multiple days) for a hard disk drive of typical size. The same applies to using the
Fortunately, there is an alternative available by means of the
badblocks -c 10240 -s -w -v -t random /dev/<device>
This takes approximately four hours per terabyte of data (YMMV).