Free space wiping in Linux?
I know about shred, but I'm looking for something that will overwrite free space on a Linux ext3 partition, not pre-existing files. Any suggestions?
|
How about doing this?
cat /dev/urandom > deleteme Then delete the resulting file, or shred it. That's just an idea... not sure if it is the best way. Regards, Mark. |
A problem with this method is that it will fill your harddisk temporarily. I'm not sure if this can cause problems, I guess you could lose some log messages. Is this good enough for your needs?
|
http://www.sysresccd.org/
This rescue cd contains a couple of utilities for wiping disks. |
There's a program called bcwipe for windows, of which there also exists a command line linux version.
|
It took me a bit to figure out what "cat /dev/urandom > deleteme" was doing (I'm still kind of a newb); it's a nifty idea.
But yes, I'm not keen on packing my drive tight with a gigantic garbage file if it can be avoided. |
Quote:
*EDIT* I got the Unix version. Looks like what I need. Thanks to all who replied. |
Quote:
|
Have you had success using it? I'm trying to wipe the free space on my hard drive. After the first pass, it consistently tells me that I'm out of free space. My command is: bcwipe -F -S -v -m 3 /
Any suggestions? |
One of the secure delete packages includes an sfill utility for just this purpose. Also you may want to consider temporarily disabling the journaling while you do this.
|
I'm not familiar with the sfill utility or journaling.
|
Journalling is a nice little feature that keeps track of changes in your file system. If you use a journaling filesystem like ext3 or reiser, then your system is making a nice little log of everything that it deletes.
|
Stickman
How does it matter that journaling keep a nice little log of everything it does? As long as the log does not contain the sensitive data that is needed to be deleted. Metadata is kept in the log, fine. Sensitive data, not fine. This command will set ext3 to journal metadata only: #mount –t ext3 –o data=writeback /dev/sda2 /jdisk Would this solve the journaling issue in secure delete? Any one! Regards, BunZ |
Yeah the Windows utilities more or less do the same thing as dd if=/dev/<datasource> of=/mountpoint/scratch ; rm /mountpoint/scratch
Its the only safe way short of some elaborate filesystem locking to avoid destroying data in actual files. Yes you will get a disk full warning, but the process is to delete the new empty file so its no longer full. Of course, it doesn't clear block-allocated file-free space (space within allocated blocks that is not used by the files with the allocation.) |
Here's what I have been running, it is fast and it has always worked properly:
Code:
dd bs=4M if=/dev/zero of=file; rm -f file |
All times are GMT -5. The time now is 05:26 PM. |