[NTLUG:Discuss] filling empty partition space with zeros

Kenneth Loafman kenneth at loafman.com
Thu Feb 19 07:54:18 CST 2009


FYI - Tools are available in Ubuntu universe in module secure-delete.

The ext3 file system is a journaling file system, so to securely wipe
space, you'll need to turn off the journal for this operation.

However, he did want just to zero the space for compression purposes,
not to securely wipe it, so we're back to the original 'dd...' command.

...Ken

Alvin Goats wrote:
> Check out the secure delete series of srm, sfill, smem and sswap. sfill 
> will do empty space only
> 
> sfill v3.1 (c) 1997-2003 by van Hauser / THC <vh at thc.org>
> 
> Syntax: sfill [-fiIlvz] directory
> 
> Options:
>         -f  fast (and insecure mode): no /dev/urandom, no synchronize mode.
>         -i  wipe only inodes in the directory specified
>         -I  just wipe space, not inodes
>         -l  lessens the security (use twice for total insecure mode).
>         -v  is verbose mode.
>         -z  last wipe writes zeros, not random data.
> 
> sfill does a secure overwrite of the free space on the partition the 
> specified
> directory resides and all free inodes of the directory specified.
> Default is secure mode (38 writes).
> You can find updates at http://www.thc.org
> 
> So, sfill -llz should be just about what you want.
> 
> Alvin
> 
> Patrick R. Michaud wrote:
>>  
>> On Wed, Feb 18, 2009 at 09:03:12AM -0600, terry wrote:
>>   
>>> On Tue, Feb 17, 2009 at 9:45 AM, Ed Leach <ntlug at levelofdetail.com> wrote:
>>>     
>>>> I'd like to fill the empty space of an ext3 partition with zeros in
>>>> order to make it compress better. [...]
>>>> I see this suggestion:
>>>>
>>>>    dd if=/dev/zero of=/path/to/partition/zerofill.tmp & rm
>>>> /path/to/partition/zerofill.tmp
>>>>       
>>> Write zeros to the partition, not the mount point.
>>> (Probably shouldn't be mounted either, but I know know if it matters,
>>> someone else should comment on whether it should be mounted or not...
>>> but...)
>>> [...]
>>>    dd if=/dev/zero of=/dev/hda2
>>>     
>> Note that the original request was to "fill the empty space with zeroes",
>> not "wipe the entire partition".  There's a significant difference.  :-)
>>
>> In particular, filling the empty space with zeroes doesn't wipe out
>> any existing files on the partition.
>>
>> Pm
>>
>> _______________________________________________
>> http://www.ntlug.org/mailman/listinfo/discuss
>>
>>   
> 
> _______________________________________________
> http://www.ntlug.org/mailman/listinfo/discuss
> 




More information about the Discuss mailing list