How to destroy disks using Linux "dd" command.

Описание к видео How to destroy disks using Linux "dd" command.

How to destroy disks using Linux "dd" command.
Warning!
Do not take this lightly, the data on that disk is not recoverable.

For this demonstration the CLI is used because it requires fewer libraries, it's faster, and usually more reliable. There are some GUI versions if you prefer, but you will not really look like a true DevOps bad ass using GUI.

First thing is to find the disks, the lsblk command is used here. Disks /dev/sda and /dev/sdb appear and some partitions are available. We will not focus on partitions or file systems at this time.

Small 4GB disks are used for speed. Larger slower drives might take days or hours so please be prepared.

Let's destroy the disk /dev/sda with random data.
dd if=/dev/random of=/dev/sda bs=1M status=progress
We will use dd to verify random data.
dd if=/dev/sda status=progress | hexdump
The video shows lots of random data from a linux randomizer.

Now we will "zero" out the drive because it sounds more secure.
dd if=/dev/zero of=/dev/sda bs=1M status=progress
dd if=/dev/sda status=progress | hexdump
The video shows all zeroes.

The end of the video shows the lsblk command, look at /dev/sda. The partitions are gone.

Success!
You are now ready to summon your inner Thanos to destroy data without any absurd "Are you sure?" prompt.

Комментарии

Информация по комментариям в разработке