I want to sell my old 4TB Hard Drive. Of course I want no one to steal my data.
Overwriting the whole drive with zeros with dd if=/dev/zero of=/dev/sda
would take about 18h.
But I cannot reboot my PC for 18 hours because I think dd always starts writing at sector 0 so it cannot continue and would start from the beginning again every time.
Of course, I could note down the amout of bytes written by dd before rebooting (monitoring it with status=progress
) but that seems a bit complicated.
I don't want to keep my PC on for 18h just to erase the disk because this wastes about 80 watts power per hour.
How about this:
I format the disk with ext4. Then I write the dd output to actual files on the mount disk while I actually use the PC. Then, the next time I boot the PC to use it, I write dd output to a different file. So the files stay there and occupy the disk space step by step.
Two questions:
with a formatted disk, will dd also write all sectors until the last one with zeros? Or will there be remaining some unused space at the end of the partition or behind the partition where old files could be reconstructed from the binary image?
I'm pretty sure that before the actual start of the partition, there will be remaining some disk space for the partition table etc. So in theory, in that area, also some files could be reconstructed because dd would not overwrite that disk area, right? Would a valid workaround be just overwriting the first 20GB or so of /dev/sda so that this area is cleared, too?