Tiny Core Linux

Tiny Core Extensions => TCE Talk => Topic started by: mfrederickson on May 21, 2010, 03:16:09 PM

Title: request for extension: shred (wiping hard drive)
Post by: mfrederickson on May 21, 2010, 03: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.
Title: Re: request for extension: shred (wiping hard drive)
Post by: Jason W on May 21, 2010, 05:01:41 PM
Shred is part of coreutils.tcz.
Title: Re: request for extension: shred (wiping hard drive)
Post by: lucky13 on May 21, 2010, 05: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.
Title: Re: request for extension: shred (wiping hard drive)
Post by: Jason W on May 21, 2010, 08: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.


Title: Re: request for extension: shred (wiping hard drive)
Post by: gerald_clark on May 21, 2010, 08:29:26 PM
The first example will fill the drive with a file containing random data.
It will not just randomize the file.
Title: Re: request for extension: shred (wiping hard drive)
Post by: lucky13 on May 22, 2010, 05: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).
Title: Re: request for extension: shred (wiping hard drive)
Post by: Jason W on May 22, 2010, 06: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.
Title: Re: request for extension: shred (wiping hard drive)
Post by: robc on May 27, 2010, 06:35:11 AM
wipe could also be used, it is in the repo
Title: Re: request for extension: shred (wiping hard drive)
Post by: Juanito on May 11, 2012, 04: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...
Title: Re: request for extension: shred (wiping hard drive)
Post by: coreplayer2 on May 11, 2012, 10:05:01 AM
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