in reply to Cleaning up your hard disk

Wouldn't you have to run this from a bootable cdrom with Perl on it? If you are wiping your whole hard drive, your OS will be deleted half way thru, and I guess it would hang? Maybe I'm missing something? Can the OS in memory keep running if it's disk files are wiped?

Replies are listed 'Best First'.
Re: Re: Cleaning up your hard disk
by rcaputo (Chaplain) on Jan 27, 2004 at 06:20 UTC

    Darik's Boot And Nuke looks like just the thing. Plus it deals with filesystem caching.

    Darik's Boot and Nuke ("DBAN") is a self-contained boot floppy that securely wipes the hard disks of most computers. DBAN will automatically and completely delete the contents of any hard disk that it can detect, which makes it an appropriate utility for bulk or emergency data destruction.

    It's also avaliable as a bootable cdrom image. However you save it, be sure to label it very clearly. :)

    -- Rocco Caputo - rcaputo@pobox.com - poe.perl.org

Re: Re: Cleaning up your hard disk
by flyingmoose (Priest) on Jan 26, 2004 at 23:57 UTC
    The kernel will already be loaded into memory (RAM), and this should work for the most part.

    Though unconfirmed, I have heard tails of Windows (yes, Windows!) being formatted while it is still running. Windows is usually more obstinate about such things.

    Of all the approaches posted here, DD is by far the best. It's fast, it's clean, and it's error-proof. The above script is dangerous as it won't get everything, plus it's going to be terribly slow in comparision to dd.

    The suggestion of using something like Knoppix for the dd operation, though, is definitely best. This way you can get in the habit of doing this even on machines that do not have Perl available.

Re: Re: Cleaning up your hard disk
by elwarren (Priest) on Jan 27, 2004 at 18:02 UTC
    He's not wiping the whole disk, he's just cleaning up the empty space so they cannot do an undelete on his files. For that simple purpose, the script works well.

    I might shrink my pagefile as small as possible so to squeeze out any paged data. Delete the hibernation file as well. Run his program and maybe defrag the disk in between runs so that nothing is left in the empty sectors. Lots of wasted space like that on modern 10-80gb drives. All this stuff is amateur forensics. Anyone that's ever used the grep or strings command knows you can find tasty little nuggets without much work.

    That's why openbsd has encrypted swap. Insane, but relevant in this discussion :-)