Written by James McDonald

July 24, 2009

Use shred to wipe your old computers hard drive before putting it in a dumpster

Boot from a Knoppix CD and then:

# get root
su -

# Find out what hard disks are installed by using fdisk minus L
fdisk -l

Disk /dev/sda: 200.0 GB, 200049647616 bytes
255 heads, 63 sectors/track, 24321 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x0002730b


   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1       24321   195358401   83  Linux

# in the above output the hardisk is /dev/sda. 
# This can change depending on what type of harddisk is installed
# On older PC's it's usually /dev/hdY (where why can be a, b, c etc)

# to wipe a partition use /dev/sdaX (where X is the partition number)
# or the whole disk /dev/sda
shred -n 1 -z /dev/sda


You can also just zero fill a partition using dd thusly:

dd if=/dev/zero of=/dev/sdaX
# where X is the partition you wan't to blat

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

The reCAPTCHA verification period has expired. Please reload the page.

You May Also Like…

List local disks

GET-CimInstance -query "SELECT * from Win32_DiskDrive" DeviceID Caption Partitions Size Model -------- -------...

Create ISO using Powershell

Usage New-IsoFile -NewIsoFilePath C:\tmp\Hyper-V.iso-sources -ImageName Hyper-V -SourceFilePath 'C:\tmp\Hyper-V'...