Wipe Free Space
This is a program which will securely wipe (clean, shred, fill, overwrite)
the free space on an ext2, ext3, ext4, NTFS, XFS,
ReiserFSv3, ReiserFSv4, FAT12, FAT16, FAT32, MinixFSv1, MinixFSv2, JFS, HFS+ and OCFS
partition or drive, just like the shred program securely wipes files.
WipeFreeSpace wipes the following things (when supported by the backing library):
- free space (space in unused blocks/clusters)
- free space in partially used blocks (also called the "slack space")
- deleted files' names and other data that can be used to undelete a file (like the journal)
WipeFreeSpace does NOT decrease the amount of available free space when
working.
Requirements for compiling the full version:
- a non-root account. Please, NEVER compile or 'make' anything as root.
- a working C compiler. XFS, ReiserFS and NTFS support require the 'long long'
data type.
- the 'make' program
- development package for the C library (like glibc-devel and glibc-headers).
XFS support reuires the following headers: unistd.h, fcntl.h, mntent.h
(but sys/wait.h, sched.h and paths.h can be useful, too) and the following
functions: fork(), execvp(), dup2(), close(), pipe() and one of waitpid(),
wait() or kill() (sleep() can be useful, too). Both ReiserFS require mntent.h to work
(but will compile without it).
- Ext2/3/4: development package for the ext2 file system library, libext2fs (usually
included in something like e2fsprogs-devel). If you don't have anything
like this installed or available (check twice), then go to
e2fsprogs.sf.net.
Then compile and install that package. Ext4 support requires new versions, like 1.41.
- NTFS: development package for the NTFS file system library, libntfs (usually
included in something like ntfsprogs-devel). If you don't have anything
like this installed or available (check twice), then go to
www.linux-ntfs.org.
Then compile and install that package. You can also use ntfs3g-ntfsprogs:
www.tuxera.com/community/ntfs-3g-download.
Remember to copy all the *.h files from the
include directory to the
destination "include" directory (like /usr/include/ntfs/).
- XFS: xfsprogs installed and in your PATH variable, if you want XFS support.
Get these at oss.sgi.com/projects/xfs/.
The following utilities
should be available: xfs_db, xfs_freeze, xfs_unfreeze. The xfs_db program
should support the following command-line options: -i, -c and the
following interactive mode commands: quit, freesp -d,
blockget -n, ncheck, sb 0, print.
Version 2.7.11 is enough, earlier versions will probably also work.
- ReiserFSv3: development package for reiserfsprogs (header files and compiled static *.a
libraries from the package). ReiserFS requires the fork() function
(unistd.h) and one of: waitpid(), wait() (sys/wait.h).
- Reiser4: development package for reiser4progs, libuuid (e2fsprogs or
e2fsprogs-libs) and libaal. Go to
www.kernel.org/pub/linux/utils/fs/reiser4/
and
e2fsprogs.sf.net
to get the libraries. After installing, libmisc.a needs to
be copied in the same place as libreiser4.a, but under a different name -
libreiser4misc.a:
cp libmisc/.libs/libmisc.a /usr/lib/libreiser4misc.a
Libmisc.a is in reiser4progs, of course. Nobody thought it would be
needed, but libreiser4.a is useless without it. Substitute the correct destination
path for your system in the above command.
- FAT12/16/32: tffs-lib, the Tiny FAT FS library. Go to
code.google.com/p/tffs-lib
to get the library. After compiling, install the library and ALL its
header files *.h (including the private ones, from the src directory).
- MinixFS: "mfstool", the MinixFS tool. Go to
mfstool.sf.net
to get this program. Before compiling, perform:
sed -i 's/opt_squash/0/g' `ls *.c | egrep -v main`
then compile the program (./configure && make), then perform
ar surf libminixfs.a `ls *.o | egrep -v main`
Then copy the files libminixfs.a, minix_fs.h and protos.h to a directory
where the C compiler can find them (or put the correct -I and -L options
in the compiler flags). You can use the provided patches to do this
instead of the sed command:
patch -F10 -p1 < /path/to/wipefreespace-XX/patches/mfstool-0.5.diff
- JFS: jfsutils and libuuid (the <uuid/uuid.h> header file). Go to
jfs.sf.net
to get jfsutils. Libuuid can be a part of "util-linux-ng", which can be
found on the kernel site:
ftp.kernel.org/pub/linux/utils/util-linux-ng
or as a part of e2fsprogs available at
e2fsprogs.sf.net.
Compile jfsutils, then copy all the jfs_*.h header files from the
"include" subdirectory and the libfs.a file to a directory where the
C compiler can find them (or put the correct -I and -L options in the
compiler flags).
- HFS+: the "hfsplus" package. Go to
launchpad.net/ubuntu/+archive/primary/+files/hfsplus_1.0.4.orig.tar.gz
to get it. Before compiling, apply the patch:
patch -F10 -p1 < /path/to/wipefreespace-XX/patches/hfsplus-1.0.4.diff
After compiling, install all the libraries and ALL the *.h header files
from the libhfsp/src/ directory where the C compiler can find them (or
put the correct -I and -L options in the compiler flags).
- OCFS: the "ocfs2-tools" series 1.6.x package (other versions also work, but
disable wiping undelete data in such case). Go to http://oss.oracle.com/projects/ocfs2-tools/
to get it. Then compile and install that package.
WARNING: If both ReiserFSv3 and ReiserFSv4 are enabled, the program may
refuse to link if the compiler doesn't support the command line option
"-Wl,-z -Wl,muldefs" that makes the linker accept multiple symbol definitions. If
you have this problem, disable the support for either of these filesystems
(you can compile two versions of the program).
Don't complain to me, complain to the guys that made reiserfsprogs and
reiser4progs.
You can fix either of these libraries yourself, by running
find . -type f -exec sed -i 's/misc_mntent/new_misc_mntent/g' '{}' \;
in the root directory of either reiserfsprogs or reiser4progs (but
NOT both, because this would bring back the same problem, but with a
different name). Type the command as above. The command must be run BEFORE compiling
the reiserfs programs. You can use the provided patches
to do this:
patch -F10 -p1 < /path/to/wipefreespace-XX/patches/reiser-3.6.XX.diff
patch -F10 -p1 < /path/to/wipefreespace-XX/patches/reiser4-1.0.7.diff
WARNING: If both ReiserFSv3 and MinixFS are enabled, the program
may refuse to link if the compiler doesn't support the command line option
"-Wl,-z -Wl,muldefs" that makes the linker accept multiple symbol
definitions. If you have this problem, disable the support for either
of these filesystems (you can compile two versions of the program).
You can fix either of these libraries yourself, by running
find . -type f -exec sed -i 's/die/new_die/g' '{}' \;
in the root directory of either reiserfsprogs or mfstool (but
NOT both, because this would bring back the same problem, but with a
different name). Type the command as above. The command must be run
BEFORE compiling reiserfs/mfstool. You can use the provided patches
to do this:
patch -F10 -p1 < /path/to/wipefreespace-XX/patches/mfstool-0.5.diff
patch -F10 -p1 < /path/to/wipefreespace-XX/patches/reiser-3.6.XX.diff
WARNING: If both ReiserFSv3 and JFS are enabled, you
MUST either disable
the support for either of these filesystems (you can compile two
versions of the program) or fix either of these libraries yourself,
by running
find . -type f -exec sed -i 's/bread/new_bread/g' '{}' \;
in the root directory of either reiserfsprogs or jfsutils (but
NOT both, because this would bring back the same problem, but with a
different name). Type the command as above. The command must be run
BEFORE compiling reiserfs/jfsutils. You can use the provided patches
to do this:
patch -F10 -p1 < /path/to/wipefreespace-XX/patches/jfsutils-1.1.11.diff
patch -F10 -p1 < /path/to/wipefreespace-XX/patches/reiser-3.6.XX.diff
Even if your linker/compiler accepts the "-Wl,-z -Wl,muldefs" option, it
won't help in this case.
The patches for ntfsprogs are optional. Whether or not they will be included
in the official release of ntfsprogs, wipefreespace still will compile.
Type './configure' to configure the program for your system. If you do not
wish support for a filesystem, give the '--enable-FS=no' option to ./configure
(FS=EXT234, NTFS, XFS, REISERFS, REISER4, FAT, MINIX, JFS, HFSP, OCFS).
Run './configure --help' for details.
Type 'make' to compile the program.
Documentation will be compiled, if you have the 'makeinfo' program
('texinfo' package).
Translations will be compiled, if you have the 'gettext' package.
Type 'make install' to install the program.
NOTE: 'make install' is NOT recommended. Create and
install an rpm package instead, if possible.
Type 'info wipefreespace' (after installation) or 'info doc/wipefreespace.info'
(before installation) to get help.
RPM dependencies:
- libc.so.6 (glibc >= 2.7)
- libcom_err.so.2 (usually from a "e2fsprogs" package)
- libext2fs.so.2 (usually from a "e2fsprogs" package)
- libcap.so.2
- libntfs.so.10 (ntfsprogs package)
- libuuid.so.1 (UUID_1.0) (e2fsprogs or e2fsprogs-libs)
- libaal-1.0.so.5 (libaal)
- libreiser4-1.0.so.7 (reiser4progs)
- xfsprogs
- rtld(GNU_HASH)
- libhfsp.so.0
Known issues:
- Wiping partially used blocks after wiping undelete data (or vice-versa) fails on FAT.
Run the program two times to pass this problem:
wipefreespace --nopart some_fat_fs, wipefreespace --nounrm some_fat_fs.
- Wiping partially used blocks on XFS may not work if xfsprogs translations are
installed and used (xfs_db displays messages in a language other than English). Use
non-translated xfsprogs (or remove all the translations), if possible, or try to set the
language for WipeFreeSpace:
LC_ALL=en_US wipefreespace some_xfs_fs.
- Wiping undelete data on a Reiser4 filesystem may not always work.
- WipeFreeSpace may fail to detect that it's wiping a loop device mounted in read+write mode.
WipeFreeSpace has been added to
Softpedia Linux.
WipeFreeSpace has been added to
GearDownload.com
and has been certified 100% FREE
Visit GearDownload.com
WipeFreeSpace has been added to
FamousWhy: WipeFreeSpace.
THE PROGRAM HAS BEEN TESTED, BUT IT MAY NOW OR LATER CONTAIN ERRORS, WHICH MAY LEAD TO DATA LOSS.
ALWAYS BACKUP YOUR DATA BEFORE USING THIS PROGRAM. READ THE LICENSE FOR A WARRANTY (THERE IS NONE).
A similar Free program (which also wipes files)
exists for Windows - Eraser.
Wipe Free Space GUI
Wipe Free Space now also has a simple GUI written in
Java, available for download together
with the program itself, at SourceForge.
WipeFreeSpaceGUI-java has been added to
Softpedia Mac,
Softpedia Linux
and
Softpedia File Management
and has been certified 100% FREE
WipeFreeSpaceGUI-java has been added to
Brothersoft.
WipeFreeSpaceGUI-java has been added to
GearDownload.com
and has been certified 100% FREE
Visit GearDownload.com
WipeFreeSpaceGUI-java has been added to
Softsea.com
and has been certified 100% CLEAN
WipeFreeSpaceGUI-java has been added to
FamousWhy: WipeFreeSpaceGUI
(alternative link).
Screenshots of Wipe Free Space
Available at SourceForge.
System compatibility
Wipe Free Space compiles on the following systems:
- Fedora Core 4 GNU/Linux (i686 CPU) (tested up to version 1.2)
- Fedora 12 GNU/Linux (i686 CPU) (tested from version 1.3 onwards)
- Mandriva 2008.1 GNU/Linux (i686 CPU)
- Mandriva 2011 GNU/Linux (i686 CPU) - from version 1.5 onwards (earlier not checked)
- OpenBSD 3.8 (only XFS support tested; x86 CPU; tested up to version 1.3)
- MyBook WorldEditionII GNU/Linux (only ext2/3/4 support tested; ARM CPU)
- Debian 5.0 GNU/Linux (x86 CPU) - versions from 1.4 (earlier not checked)
- CentOS 6.3 (version 1.7.2; ext2/3/4 and NTFS support tested)
Wipe Free Space GUI should compile and run on any system with
Java installed (compiling may require
NetBeans installed).
Download Wipe Free Space
Current version is 1.7.2.
Current GUI version is 0.5.
Download these at SourceForge.
Download for Windows: download a similar Free program (which also wipes files) -
Eraser.
My other software
Check out LibSecRm, IMYplay, LibHideIP and JYMAG on SourceForge.
See my other free software:
- KonqSec - a set of Konqueror security-related context menu entries
- LibNetBlock - a wrapper library for C library functions that prevents using the network
- SOAP Service Tester - a program for testing SOAP services
See also my assembly-related free software:
- AsmDoc - a HTML documentation generator for assembly language
- source converters between NASM, FASM and GAS
- C header to assembly header converters
- Kate/KWrite syntax highlighting for NASM/FASM
- some FASM macros
- Makefile generator for FASM
- Linux 2.6 kernel module helper for FASM
- A set of Autoconf macros
- Assembly converter for Doxygen
- Asm::X86 Perl module
My GPG/PGP key
GnuPG/PGP key used to sign the packages:
asc format
Number: 1C56DA1E, SHA1 fingerprint: E91E 699F 1026 D0EF 745E EC3B 353A D368 1C56 DA1E
Contact info
Contact me: bogdro AT users . sourceforge . net (English accepted, just say '[SOFT]' in the title).
GnuPG/PGP key the same as above.
Page info
This page is hosted at SourceForge.net.
This page is written using valid
HTML 4.01
,
, for all browsers:
This page uses a valid
CSS
This page doesn't use GIF images
and doesn't use JPG images.
This page is JavaScript-free, Java-free and Flash-free.