I know that with
dd if=/dev/urandom of=/dev/sdX bs=1M count=hdd_size_in_MB
you can wipe a whole disk with random data. But urandom is very slow. So I wonder if it would be possible to just create only like 100MB-1000MB of random data store it in the RAM and write it multiple times over the whole disk instead of creating TBs of random data which is very CPU heavy?
How would I do that?
cryptsetupshould be faster (if your CPU supports AES acceleration), and makes verification possible, so just encrypt zeroes. That said,/dev/urandomshould no longer be unbearably slow in recent kernels. – frostschutz Apr 15 '23 at 18:00