![](https://steemitimages.com/640x0/https://i.ytimg.com/vi/b1yZnWsClx8/hqdefault.jpg)
How to write over a harddisk with random data in Linux.
Commands used;
Generate Luks password with
dd if=/dev/urandom bs=1 count=32 | base64
cryptsetup luksFormat /dev/{Your Device Here}
Type YES in all caps
Enter LUKS passphrase: [Generated Password From Earlier]
cryptsetup luksOpen /dev/{Your Device Here} {Name to Map Drive}
dd if=/dev/zero of=/dev/mapper/{Name to Map Drive} bs=1M
when you see
dd: writing `/dev/mapper/...': No space left on device
disk is full
cryptsetup luksClose {Name to Map Drive}
cryptsetup luksDump /dev/{Your Device Here}
Look for payload or area "offload" number
Or just guess 2056 or 32768
dd if=/dev/urandom of=/dev/{Your Device Here} bs=512 count={Offset number}
You are done.
research link
https://www.linuxglobal.com/quickly-fill-a-disk-with-random-bits-without-dev-urandom/
▶️ DTube