You are not logged in.

#1 2009-10-31 19:21:35

Cuddles McKitten
Member
Registered: 2009-09-29
Posts: 7

[SOLVED] Utilities to securely wipe free HD space?

I used to use secure-delete's "sfill" on another distro, but there doesn't seem to be any 64 bit version in the AUR.  I tried compiling it myself, but it told me that I was missing about fifty .h files.  I have no idea where to look to find them -- especially since I got the complete base-devel package.

I was wondering if anyone knew of anything in the repos/AUR that could wipe free space on my hard drive?  Alternately, if there's any way to get shred to be the default way my GNOME trash bin empties, that would be acceptable.

Last edited by Cuddles McKitten (2009-10-31 21:15:38)

Offline

#2 2009-10-31 19:24:30

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,092

Re: [SOLVED] Utilities to securely wipe free HD space?

Depending on your filesysyem, many of such tools are not reliable at all. If you really care about it, you encrypt your partions in the first place.


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#3 2009-10-31 20:51:44

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,595
Website

Re: [SOLVED] Utilities to securely wipe free HD space?

As I understand it, journaling files systems such as ext3/4 make securely deleting freespace/files tough.  From the shred manpage:

       CAUTION: Note that shred relies on a very important assumption: that the file system overwrites
       data  in  place.  This is the traditional way to do things, but many modern file system designs
       do not satisfy this assumption.  The following are examples of file systems on which  shred  is
       not effective, or is not guaranteed to be effective in all file system modes:

       *  log-structured  or  journaled file systems, such as those supplied with AIX and Solaris (and
       JFS, ReiserFS, XFS, Ext3, etc.)

       * file systems that write redundant data and carry  on  even  if  some  writes  fail,  such  as
       RAID-based file systems

       * file systems that make snapshots, such as Network Appliance's NFS server

       * file systems that cache in temporary locations, such as NFS version 3 clients

       * compressed file systems

       In  the  case  of ext3 file systems, the above disclaimer applies (and shred is thus of limited
       effectiveness) only in data=journal mode, which journals file data in addition  to  just  meta‐
       data.  In both the data=ordered (default) and data=writeback modes, shred works as usual.  Ext3
       journaling modes can be changed by adding the data=something option to the mount options for  a
       particular file system in the /etc/fstab file, as documented in the mount man page (man mount).

       In  addition, file system backups and remote mirrors may contain copies of the file that cannot
       be removed, and that will allow a shredded file to be recovered later.

CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#4 2009-10-31 21:15:25

Cuddles McKitten
Member
Registered: 2009-09-29
Posts: 7

Re: [SOLVED] Utilities to securely wipe free HD space?

I shouldn't have included "secure" in my original post, since I only meant "slightly more secure."  I think you guys were assuming I want my hard drive to hold up to being probed by KGB operatives.

I'll just write my own quick program.  Nevermind.

Last edited by Cuddles McKitten (2009-10-31 21:16:04)

Offline

#5 2009-11-02 03:20:53

Daenyth
Forum Fellow
From: Boston, MA
Registered: 2008-02-24
Posts: 1,244

Re: [SOLVED] Utilities to securely wipe free HD space?

dd if=/dev/zero of=hugefile; sync; rm hugefile; sync

This may need some work if you hit the maximum filesize, but otherwise it will make a 0-filled file on every block, then remove it.

Offline

#6 2009-11-13 09:17:42

Gen2ly
Member
From: Sevierville, TN
Registered: 2009-03-06
Posts: 1,529
Website

Re: [SOLVED] Utilities to securely wipe free HD space?

Daenyth wrote:
dd if=/dev/zero of=hugefile; sync; rm hugefile; sync

This may need some work if you hit the maximum filesize, but otherwise it will make a 0-filled file on every block, then remove it.

Absolutely brilliant.

Wanted to dd | gzip a drive and reduced the compressed file quite a bit.


Setting Up a Scripting Environment | Proud donor to wikipedia - link

Offline

#7 2009-11-20 02:44:20

IgnorantGuru
Member
Registered: 2009-11-09
Posts: 640
Website

Re: [SOLVED] Utilities to securely wipe free HD space?

Very disappointing that Arch doesn't have Secure Delete available in the supported archives, or even in the AUR.  It's a very well-developed program.  ("The wipe algorythm is based on the paper "Secure Deletion of Data from Magnetic and Solid-State Memory" presented at the 6th Usenix Security Symposium by Peter Gutmann, one of the leading civilian cryptographers.")  The 'srm' package in Arch is not as good, nor is shred.  But this is one of the very few things I've been disappointed with since moving to Arch recently - mostly it has been an excellent experience!

I just copied the Secure Delete files from my old Ubuntu partition (srm, smem, sfill, and sswap) into /usr/bin - they seem to work fine.  And I copied the man pages for them from /usr/share/man/man1  So if you can somehow unpack the "secure-delete" ubuntu package, the binaries will probably work.

Homepage for Secure Delete is here with a tarball...
http://freeworld.thc.org/releases.php?s=4&o=1

Last edited by IgnorantGuru (2009-11-20 02:46:02)

Offline

#8 2009-11-20 14:47:48

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,092

Re: [SOLVED] Utilities to securely wipe free HD space?

IgnorantGuru wrote:

Very disappointing that Arch doesn't have Secure Delete available in the supported archives, or even in the AUR.  It's a very well-developed program.  ("The wipe algorythm is based on the paper "Secure Deletion of Data from Magnetic and Solid-State Memory" presented at the 6th Usenix Security Symposium by Peter Gutmann, one of the leading civilian cryptographers.")  The 'srm' package in Arch is not as good, nor is shred.  But this is one of the very few things I've been disappointed with since moving to Arch recently - mostly it has been an excellent experience!

I just copied the Secure Delete files from my old Ubuntu partition (srm, smem, sfill, and sswap) into /usr/bin - they seem to work fine.  And I copied the man pages for them from /usr/share/man/man1  So if you can somehow unpack the "secure-delete" ubuntu package, the binaries will probably work.

Homepage for Secure Delete is here with a tarball...
http://freeworld.thc.org/releases.php?s=4&o=1

You are free to write a PKGBUILD for it and put it in aur (if the lisence allows it)


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#9 2009-11-20 15:04:37

IgnorantGuru
Member
Registered: 2009-11-09
Posts: 640
Website

Re: [SOLVED] Utilities to securely wipe free HD space?

Mr.Elendig wrote:

You are free to write a PKGBUILD for it and put it in aur (if the lisence allows it)

Thanks - I did read some about that and I will look into it once things settle down.  I'm still getting used to Arch and have more pressing things to address first.  I did manage to use one AUR PKGBUILD thus far.

When licenses don't allow, I wonder if it's possible to write PKGBUILD so that users can download the official source and install it.  But in this case the program is GPL so I don't think it will be an issue.

Offline

Board footer

Powered by FluxBB