Linux Lite Forums

Software - Support => Installing Software => Topic started by: Peter B on July 07, 2014, 05:45:43 AM

Title: Secure Overwrite of Free Disk Space
Post by: Peter B on July 07, 2014, 05:45:43 AM
Is there a Linux Program that will overwrite free disk space in a secure manner?
Or maybe a Terminal equivalent to the Windows Cypher /w: command?
For instance, after installing Linux Lite over the top of Windows, can the remaining free space be securely wiped and encrypted to ensure any 'leftover' files or documents from previous installations are inaccessible?
Title: Re: Secure Overwrite of Free Disk Space
Post by: rijnsma on July 07, 2014, 08:35:54 AM
Maybe?:

Repository says:
Quote
Zerofree finds the unallocated blocks with non-zero value content in
an ext2, ext3 or ext4 file-system and fills them with zeroes
(zerofree can also work with another value than zero). This is mostly
useful if the device on which this file-system resides is a disk
image. In this case, depending on the type of disk image, a secondary
utility may be able to reduce the size of the disk image after
zerofree has been run. Zerofree requires the file-system to be
unmounted or mounted read-only.

The usual way to achieve the same result (zeroing the unused
blocks) is to run "dd" do create a file full of zeroes that takes up
the entire free space on the drive, and then delete this file. This
has many disadvantages, which zerofree alleviates:
 * it is slow;
 * it makes the disk image (temporarily) grow to its maximal extent;
 * it (temporarily) uses all free space on the disk, so other
   concurrent write actions may fail.

Zerofree has been written to be run from GNU/Linux systems installed
as guest OSes inside a virtual machine. If this is not your case, you
almost certainly don't need this package. (One other use case would
be to erase sensitive data a little bit more securely than with a
simple "rm").
Or?:
Quote
Gutmann method based tools for securely wiping data from files, free
disk space, swap and memory: srm, sfill, sswap and sdmem.
Title: Re: Secure Overwrite of Free Disk Space
Post by: Scott on July 07, 2014, 09:55:42 AM
Quote
Is there a Linux Program that will overwrite free disk space in a secure manner?
I use BleachBit occasionally (LL108/64) and have never had a problem. You can find it in Synaptic.
Title: Re: Secure Overwrite of Free Disk Space
Post by: Peter B on July 08, 2014, 07:02:55 AM
Scott

I installed BleachBit and ran the 'Wipe Free Space' routine - all seemed to go well until the progress message hung at 'Please wait. Wiping Free Space. about 0 minutes remaining.'
After leaving it for a further couple of hours, expecting perhaps a 'cleaning complete' message, still no change and then the Program wouldn't close down, I had to shutdown the computer to clear it.
Title: Re: Secure Overwrite of Free Disk Space
Post by: Scott on July 08, 2014, 01:08:31 PM
Have you tried the BleachBit website (bleachbit.sourceforge.net)? Looks pretty good. They also have forum. I only looked at it briefly but I see a forum post BleachBit not working on Ubuntu 14.04 LTS (assuming you're using LL2.0).
Title: Re: Secure Overwrite of Free Disk Space
Post by: Peter B on July 08, 2014, 07:02:16 PM
I'd checked the BleachBit forum previously and couldn't find a match to my particular problem.
However, there seems to be Version 1.2 now available on their site and there is mention of free disk space clean-up problems listed as bugs fixed in this latest release.
But Version 1.2 isn't showing as being available via Synaptics (it's showing the latest version as being 1.01) and I have no idea how I might download and install 1.2 independently.
Title: Re: Secure Overwrite of Free Disk Space
Post by: Scott on July 08, 2014, 07:23:17 PM
Hi Peter. Have you posted your problem in the BleachBit fourm? I wish I had more answers for you but I'm just not that familiar with the software.  :)
Title: Re: Secure Overwrite of Free Disk Space
Post by: Peter B on July 09, 2014, 02:37:37 AM
Hi Scott

I was planning to post in the BleachBit Forum later today, but because of their mention of bug fixes in Version 1.2 regarding Free Space wiping, I wondered if it was worth downloading it and installing it manually?

However, I've never installed a Program other than by using the standard update methods within Linux Lite, so I've no idea how to do it, or even if it's possible without risking damage.
Title: Re: Secure Overwrite of Free Disk Space
Post by: Peter B on July 09, 2014, 06:27:14 AM
Update...

I downloaded and installed Version 1.2 and that seems to work properly now.

Thank you for your assistance.
Title: Re: Secure Overwrite of Free Disk Space
Post by: elliott on July 09, 2014, 08:30:45 AM
secure-delete also seems to come with a feature to wipe free space. i used a sudo apt command to install bleachbit and it installed 1.0, i was curious if where you found the new version and if it does not crash when you run the "deep scan" features, this happens everytime for me. any luck? glad you figured it out, hoping i can figure out the same. i get a lot of "permission denied" errors even when i run bleachbit (as root), it will not allow me to wipe free space a long with other features that are locked....
Title: Re: Secure Overwrite of Free Disk Space
Post by: Peter B on July 09, 2014, 08:54:29 AM
Hi Elliott

I downloaded Version 1.2 from this page http://bleachbit.sourceforge.net/download/linux (http://bleachbit.sourceforge.net/download/linux) and chose the Ubuntu 14.04 LTS file.
I've only tested the 'Wipe Free Space' feature so far, as that was the only section with which I had problems on the earlier version - so I can't yet advise on the 'Deep Scan' facility.
Title: Re: Secure Overwrite of Free Disk Space
Post by: Scott on July 09, 2014, 10:22:46 AM
Hi Peter
You're welcome and happy to hear you got it working :). If you learn anything new while testing/troubleshooting try to come back and update this post. I'm sure others will benefit from your information.
~Scott
Title: Re: Secure Overwrite of Free Disk Space
Post by: elliott on July 09, 2014, 10:24:57 AM
cool im downloading now from the link thank you, i have the exact same problem with it freezing up on wiping disc space so thanks a lot. the other issues are less important, although i have been trying to get my thumbnails to disable for awhile without having to use software like this with no luck, thunar doesnt show thumbnails but everything you see still gets put in the .thumbnail folders doesnt seem to be able to disable the folder itself.
Title: Re: Secure Overwrite of Free Disk Space
Post by: Scott on July 09, 2014, 10:38:54 AM
Hi Elliott

How about exceptions?

On my system (LL108/64, Bleachbit 0.9.1) the software has two areas to limit scan locations:
BleachBit > Edit > Preferences > Drives Tab & Whitelist Tab

I'm thinking that maybe this feature can be used to narrow down the areas that are a problem and exclude them until they're fixed.

Also, have you posted any of your questions in the BleachBit forum?
Title: Re: Secure Overwrite of Free Disk Space
Post by: elliott on July 09, 2014, 10:59:13 AM
hi scott, i will try both those things thanks :) so far i reinstalled the version mentioned and an performing a wipe to see if it freezes at the end this time or not.

thanks i did not know they even had a forum.

update: so far downloading that version did allow me to perform an overwrite. good post.  ;D
Title: Re: Secure Overwrite of Free Disk Space
Post by: Peter B on July 09, 2014, 12:56:57 PM
Hi again Elliott

In Version 1.2 on my machine, everything is working except all the options within 'Deep Scan' which 'freeze'.

I saw this topic on the BleachBit Support Forum, it looks as though there is a problem.

http://bleachbit.sourceforge.net/forum/bleachbit-not-working-ubuntu-1404-lts (http://bleachbit.sourceforge.net/forum/bleachbit-not-working-ubuntu-1404-lts)