This guide is when a system needs to be prepared to transfer to another individual and all previous information should be wiped completely. It will include creating a bootable USB drive, and then using that drive to wipe the harddrives.
From KB1000, the instructions to create a bootable drive are:
First, we need the operating system to install to the USB drive. These are typically .iso images, though occasionally can be .img with subtle differences. For instance, this guide will not work for Windows OS images because how they package the operating system.
For Ubuntu, go to https://ubuntu.com/download and download the operating system you want. Once it is downloaded, run the following command to write the image to the USB drive. BE VERY VERY CAREFUL ABOUT WHICH DRIVE YOU SELECT AS THIS CAN DESTROY THE COMPUTER YOU ARE USING
dd bs=4M if=./ubuntu.iso of=<THE DRIVE LOCATION> ; sync <THE DRIVE LOCATION> will be something like /dev/sda.Once that command has finished, you will have a possible working USB Drive. If the installation fails, just rerun the above command and try again.
You can double check that the thumbdrive was created properly by:
cmp -n `stat -c '%s' ubuntu.iso` ubuntu_iso. /dev/sdX
Boot from the thumbdrive you have just created. Might take a few attempts and unfortunately there is not a surefire way to write a guide to do so.
shred commandOnce booted, open a terminal. You should be able to do a lsblk to see what devices are recognized. Take note of what devices should be wiped.
For each device, the following command should work:
sudo shred -vfz -n 3 /dev/<YOUR DEVICE>
This will take some time to complete as it is writing random data 3 times over the whole drive, and then will zero it out. But this significantly reduces the chances that anyone would recover the data from the drives. If this needs to be completed faster, the lowest I would "comfortable" go is -n 2 and remove the -z flag like:
sudo shred -vf -n 2 /dev/<YOUR DRIVE>