WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: request for extension: shred (wiping hard drive)  (Read 6346 times)

Offline mfrederickson

  • Newbie
  • *
  • Posts: 9
request for extension: shred (wiping hard drive)
« on: May 21, 2010, 06:16:09 PM »
Could someone please make an extension for shred?  We need to wipe our old hard drives before we auction them off.  Thanks.

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: request for extension: shred (wiping hard drive)
« Reply #1 on: May 21, 2010, 08:01:41 PM »
Shred is part of coreutils.tcz.

Offline lucky13

  • Jr. Member
  • **
  • Posts: 76
    • my mostly linux-related blog
Re: request for extension: shred (wiping hard drive)
« Reply #2 on: May 21, 2010, 08:51:02 PM »
In addition to shred, you can use dd (in the base of both TinyCore and MicroCore) with /dev/urandom and/or /dev/zero.

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: request for extension: shred (wiping hard drive)
« Reply #3 on: May 21, 2010, 11:17:12 PM »
Never used dd to shred files, but I think the particular of Lucky's command would be like:

dd if=/dev/urandom of=/mnt/hda2/file

where /mnt/hda2/file is the file you want to shred.  

Or dd if=/dev/zero of=/dev/hda

to wipe the entire disk.

For those not familiar with dd.



Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: request for extension: shred (wiping hard drive)
« Reply #4 on: May 21, 2010, 11:29:26 PM »
The first example will fill the drive with a file containing random data.
It will not just randomize the file.

Offline lucky13

  • Jr. Member
  • **
  • Posts: 76
    • my mostly linux-related blog
Re: request for extension: shred (wiping hard drive)
« Reply #5 on: May 22, 2010, 08:44:44 AM »
...Or dd if=/dev/zero of=/dev/hda

to wipe the entire disk.

For those not familiar with dd.

Or you could combine using /dev/urandom and /dev/zero so that you first fill the disk with random bits (once or more times) and then zero it all out. You can repeat the process n-times, where n = your comfort level. Running this combination once is the equivalent of a single pass of shred with the -z (zero) flag (which zeroes out the file/partition/disk on its last pass).

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: request for extension: shred (wiping hard drive)
« Reply #6 on: May 22, 2010, 09:33:42 AM »
Oops, seems the first example would need to be more like this;

dd if=/dev/urandom of=/mnt/hda2/file bs=10485760 count=1 conv=notrunc

for a 10mb file. 

I guess I had a brain lapse.

Offline robc

  • Sr. Member
  • ****
  • Posts: 447
Re: request for extension: shred (wiping hard drive)
« Reply #7 on: May 27, 2010, 09:35:11 AM »
wipe could also be used, it is in the repo
"Never give up! Never surrender!" - Commander Peter Quincy Taggart

"Make it so." - Captain Picard

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14817
Re: request for extension: shred (wiping hard drive)
« Reply #8 on: May 11, 2012, 07:05:18 AM »
Just for info, the shred command takes the form:
Code: [Select]
$ sudo shred -vfz -n 10 /dev/sda1
Take great care before issuing this command...

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: request for extension: shred (wiping hard drive)
« Reply #9 on: May 11, 2012, 01:05:01 PM »
Secure erase, part of the ATA specification is already built in to the drive's firmware which requires only a command to initiate it.  secureerase.tcz will perform this and more which uses hdparm to send the signal.  An SSD will take only a second or two but a HDD may take several hours to completely securely erase a drive.

It's already in the repository