I've recently started to encrypt my hard drive (whole system encryption), and I've realized that before doing that I didn't dd the whole drive with /dev/urandom, but with /dev/zero. I know that writing my whole hard drive with random numbers might be overkill, but I would like to know how to do it.
After some research, I came across this paragraph from the Arch wiki that says that I can create a file spanning the empty space of a partition, then fill it with random numbers (by creating a dm-crypt partition, then writing it with /dev/zero which will be encrypted by the block device encryption of dm-crypt, but that's beside the point).
Here's the exact quote that got me interested: "The same effect can be achieved if a file is created on an encrypted partition that fills the free space of the partition completely after the system is installed, booted and filesystems mounted".
And the link to the article: https://wiki.archlinux.org/index.php/Dm-crypt/Drive_Preparation
Any ideas how I can create the said file? Another idea that came to me was to resize the partition, create another partition from the empty, remaining space, dd that, delete it, then add it to the original partition. Any suggestions?