I'm trying to write random data over a partition on my local hard disk. I'm booted into a recovery live CD (Clonezilla) and have tried the following:
$ dd if=/dev/urandom bs=1024 count=4 | base64 | \ sudo cryptsetup plainOpen --key-file - /dev/sda5 rando $ dd if=/dev/zero | pv -ptra | sudo dd of=/dev/mapper/rando
In laymans terms:
/dev/sda5as a plain encrypted disk with a random passphrase. (ie: initialize an AES cipher with a random key)
- Fill the virtual disk with zeroes, meaning that the underlying media is filled with random data, effectively filling the disk with random data for reasons™.
This fails at around 250GiB, and the partition is around 512GiB in size.
I've also tried the good old:
$ sudo dd if=/dev/urandom of=/dev/sda5 bs=4096
and it also fails at about 250GiB. I've tried resuming the overwriting later on with
seek, but it also fails again.
I'm thinking this is a disk issue, but I have no way of validating this. Is there a tool that will confirm my suspicions and figure out which sectors are failing?