Sean's i/o Stream


Getting rid of some old crappy data...

  • January 26, 2010
  •   category: linux
  • tags: confidential-data, garbage, linux, recycle, shred

So I was thinking I have entirely too much garbage laying around my house, so I started with what’s near and dear to my heart, my tech.

First things first, what is worth selling and what is easier to just toss and be done with. First things first, what data do the computer drives actually have on them? So I grab my trusty live cd and boot one of the boxes that can still stand itself up, surely there is nothing of importance here and I have deleted all my personal stuff, well that is at least partly true. Do a bit of searching on the internets and you will find lots of crazy talk about how to securely delete your data, so whats the harm, I have dozens of hours to wait for drives to wipe whilst I work.

Cliff (Spark if you are one of those people) notes version, start terminal, launch command (lather, rinse, and repeat for each device):

$ sudo shred -vz -n <number of passes> /dev/<drive to shred>

Here is an example for one of the old school Iomega Zip drives I found in the closet and wanted to make sure were relatively clean before trying to sell.

sgw@sobek:~$ cd /media
sgw@sobek:/media$ ls
cdrom  cdrom0  floppy  floppy0  IOMEGATOOLS
sgw@sobek:/media$ mount
< ... Cut out ... >
/dev/sdd1 on /media/IOMEGATOOLS type vfat (rw,nosuid,nodev,uhelper=hal,shortname=mixed,uid=1000,utf8,umask=077,flush)
sgw@sobek:/media$ sudo umount /media/IOMEGATOOLS
[sudo] password for sgw:
sgw@sobek:/media$ sudo fdisk -l /dev/sdd1

Disk /dev/sdd1: 98 MB, 98671104 bytes
255 heads, 63 sectors/track, 11 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000

 Device Boot      Start         End      Blocks   Id  System
sgw@sobek:/media$ sudo time shred -vf -n 3 /dev/sdd
shred: /dev/sdd: pass 1/3 (random)...
shred: /dev/sdd: pass 3/3 (random)...96MiB/96MiB 100%
0.01user 71.08system 6:04.45elapsed 19%CPU (0avgtext+0avgdata 0maxresident)k
120inputs+589728outputs (1major+279minor)pagefaults 0swaps

So this gives me some time to start searching for the components online to see if I can or cannot get anything for them :)

This same procedure should apply to most types of magnetic drives, but as you will see online you are only going to be able to get rid of the data to a certain extent, so if this is really something you want to avoid ever seeing the light of day, you need to bite the bullet and destroy your media!!!

Back to Top