Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
how do i swipe a entire HD so the data cannot be recovered?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Duplicate Threads
View previous topic :: View next topic  
Author Message
ratch3t.x
n00b
n00b


Joined: 19 Dec 2006
Posts: 60

PostPosted: Wed Jul 04, 2007 6:19 pm    Post subject: how do i swipe a entire HD so the data cannot be recovered? Reply with quote

title says it all, i don't know of any software that whipes an entire drive or securely deletes (other than secure-delete ebuild) but im unsure about deleting an entire hd - thanks
Back to top
View user's profile Send private message
gerard82
Advocate
Advocate


Joined: 04 Jan 2004
Posts: 2249
Location: Netherlands

PostPosted: Wed Jul 04, 2007 6:24 pm    Post subject: Reply with quote

emerge bcwipe.
Back to top
View user's profile Send private message
Lupin_the_3rd
Apprentice
Apprentice


Joined: 03 Apr 2005
Posts: 168

PostPosted: Wed Jul 04, 2007 7:02 pm    Post subject: Reply with quote

dd if=/dev/zero of=/dev/sde bs=128k

Assuming /dev/sde is the disk you want to wipe of course.

Overwrites the entire block device with zeros. The boot sector, partition table, everything. absolutely every byte on the disk is overwritten.

Use with caution!!!! :!: This is for wiping an entire hard drive!! :!: Not just single files, folders, or partitions, but your entire drive. :!: Very useful if you sending your computer to recycling, or selling the drive on ebay or something like this.

Note that this method is quite effective, but does not meet various government "secure delete" standards that call for 3x or 7x overwriting. Although I guess you could just re-run it 3x or 7x to achieve the same thing.
_________________
Compaq XP1000 Alpha EV67 667Mhz w/ 2GB ECC
32bit PCI: ATI Radeon 9100 (DRI works!)
32bit PCI: Generic Firewire 400 card
64bit PCI: BCM5703 Gig-E (Compaq NC7771)
64bit PCI: Sil3124 SATA w/ mdadm RAID1 (pair of WD VelociRaptors)
Back to top
View user's profile Send private message
John R. Graham
Administrator
Administrator


Joined: 08 Mar 2005
Posts: 8481
Location: Somewhere over Atlanta, Georgia

PostPosted: Wed Jul 04, 2007 7:46 pm    Post subject: Reply with quote

I think /dev/urandom would probably be a better source for the if= argument. And, I concur about the multiple passes requirements. I've read that the bits are still recoverable by sufficiently determined (and well-financed) organizations because of "fringe" information between the tracks. Recording (pseudo) random data multiple times scrambles the fringe.

- John
Back to top
View user's profile Send private message
Lupin_the_3rd
Apprentice
Apprentice


Joined: 03 Apr 2005
Posts: 168

PostPosted: Wed Jul 04, 2007 7:50 pm    Post subject: Reply with quote

john_r_graham wrote:
I think /dev/urandom would probably be a better source for the if= argument. And, I concur about the multiple passes requirements. I've read that the bits are still recoverable by sufficiently determined (and well-financed) organizations because of "fringe" information between the tracks. Recording (pseudo) random data multiple times scrambles the fringe.

- John


/dev/urandom will give a 'better' overwrite for the reasons you mention, but depending on the system CPU type (and whether or not it has a hardware RNG) it could be very slow. For very secret research or government purposes, it's probably ideal.

For grandma who does want the ebay bidder to read her emails and get ahold of her family recipes, /dev/zero should be more than sufficient (and faster). :wink:
_________________
Compaq XP1000 Alpha EV67 667Mhz w/ 2GB ECC
32bit PCI: ATI Radeon 9100 (DRI works!)
32bit PCI: Generic Firewire 400 card
64bit PCI: BCM5703 Gig-E (Compaq NC7771)
64bit PCI: Sil3124 SATA w/ mdadm RAID1 (pair of WD VelociRaptors)
Back to top
View user's profile Send private message
jlh
Tux's lil' helper
Tux's lil' helper


Joined: 06 May 2007
Posts: 145
Location: Switzerland::Zürich

PostPosted: Wed Jul 04, 2007 7:52 pm    Post subject: Reply with quote

Overwriting with zeroes (as Lupin_the_3rd says) is probably good enough for most people. There will be no way to ever recover the data via software. However, if someone really really wants to recover the data, he will be able to, provided he has enough money. There are companies that are specialized in that and a hard drive that has been zeroed that way shouldn't be difficult at all to recover. But hardly anyone will ever do that unless he knows the data is very valuable. (Overwriting with zeroes repeatedly is no better than overwriting once, AFAIK.) Overwriting with random data is better and is even better when done repeatedly (but probably a lot slower too).

More advanced tools (bcwipe might be one of those, I don't know) will overwrite the data repeatedly with varying patterns, some carefully choosen predefined ones, some random, making any recovery a lot more difficult if not impossible.

If you want to sell your drive, use one of the methods above. If the drive contained very very very sensitive data and you're very paranoid, then destroy the drive physically. Shred it. Shred again until it's just dust left, then eat the dust. Oh you're not that paranoid? Then never mind. :)
Back to top
View user's profile Send private message
John R. Graham
Administrator
Administrator


Joined: 08 Mar 2005
Posts: 8481
Location: Somewhere over Atlanta, Georgia

PostPosted: Wed Jul 04, 2007 8:09 pm    Post subject: Reply with quote

Lupin_the_3rd wrote:
/dev/urandom will give a 'better' overwrite for the reasons you mention, but depending on the system CPU type (and whether or not it has a hardware RNG) it could be very slow.
Well, that turns out not to be the case. /dev/urandom is very fast, is a pseudo-random number generator that is periodically seeded from the system's primary entropy pool, and requires no hardware random number generator support to maintain its performance. Performance on my very modest 600MHz AMD K7 is about a megabyte per second:
Code:
mercury jgraham # dd if=/dev/urandom of=/dev/null bs=128k count=8
8+0 records in
8+0 records out
1048576 bytes (1.0 MB) copied, 1.07657 s, 974 kB/s

For more details, you might be interested in an Analysis of the Linux Random Number Generator.

- John


Last edited by John R. Graham on Wed Jul 04, 2007 8:18 pm; edited 1 time in total
Back to top
View user's profile Send private message
Cyker
Veteran
Veteran


Joined: 15 Jun 2006
Posts: 1542

PostPosted: Wed Jul 04, 2007 8:17 pm    Post subject: Reply with quote

There's a nifty boot disk called DBAN - Darik's Boot and Nuke. ;)

That works pretty well. :twisted:

Just don't nuke the wrong HD! :shock:

For true unrecoverability however, I recommend taking it apart and/or dropping it in some lava! :mrgreen:
Back to top
View user's profile Send private message
cyrillic
Watchman
Watchman


Joined: 19 Feb 2003
Posts: 7301
Location: Groton, Massachusetts USA

PostPosted: Wed Jul 04, 2007 9:03 pm    Post subject: Reply with quote

Cyker wrote:
For true unrecoverability however, I recommend taking it apart and/or dropping it in some lava! :mrgreen:

Good one !

... although you won't get as much for the drive on Ebay if you do that. :wink:
Back to top
View user's profile Send private message
Mad Merlin
Veteran
Veteran


Joined: 09 May 2005
Posts: 1143

PostPosted: Thu Jul 05, 2007 4:57 am    Post subject: Reply with quote

The
Code:
shred
tool is meant for this task, simply
Code:
shred /dev/hda
and wait (potentially quite awhile, if it's a large drive). You'll want to make sure that /dev/hda is the drive you want to erase, though.
_________________
Game! - Where the stick is mightier than the sword!
Back to top
View user's profile Send private message
ketjap
Tux's lil' helper
Tux's lil' helper


Joined: 03 Nov 2005
Posts: 75
Location: The Netherlands

PostPosted: Thu Jul 05, 2007 5:43 am    Post subject: Reply with quote

Cyker wrote:
There's a nifty boot disk called DBAN - Darik's Boot and Nuke. ;)

That works pretty well. :twisted:

Just don't nuke the wrong HD! :shock:

For true unrecoverability however, I recommend taking it apart and/or dropping it in some lava! :mrgreen:


The nice thing of this program is that you can download a live cd of it.
Back to top
View user's profile Send private message
Cyker
Veteran
Veteran


Joined: 15 Jun 2006
Posts: 1542

PostPosted: Thu Jul 05, 2007 6:53 am    Post subject: Reply with quote

cyrillic wrote:
Cyker wrote:
For true unrecoverability however, I recommend taking it apart and/or dropping it in some lava! :mrgreen:

Good one !

... although you won't get as much for the drive on Ebay if you do that. :wink:


Aye... but if you fish out the melted twisted mess, you could sell it as a piece of premiere modern art and sell it to a gallery! :mrgreen:
Back to top
View user's profile Send private message
Akkara
Administrator
Administrator


Joined: 28 Mar 2006
Posts: 5573
Location: &akkara

PostPosted: Thu Jul 05, 2007 6:53 am    Post subject: Reply with quote

Quote:
Just don't nuke the wrong HD!


When I was trying out different filesystems I had chown'ed the test drive I was using and typing the commands as a normal user to get a bit of extra insurance against errors.

Maybe do similar for wiping. chown, then mount | grep for the just-chown'ed drive, just to be super extra very sure :)
Back to top
View user's profile Send private message
John R. Graham
Administrator
Administrator


Joined: 08 Mar 2005
Posts: 8481
Location: Somewhere over Atlanta, Georgia

PostPosted: Thu Jul 05, 2007 11:24 am    Post subject: Reply with quote

Mad Merlin wrote:
The
Code:
shred
tool is meant for this task...
I love these forums! :D

- John
Back to top
View user's profile Send private message
Nordog
Apprentice
Apprentice


Joined: 08 Jul 2005
Posts: 151
Location: Reykjavík, Iceland

PostPosted: Mon Oct 08, 2007 10:57 pm    Post subject: Reply with quote

john_r_graham wrote:
Mad Merlin wrote:
The
Code:
shred
tool is meant for this task...
I love these forums! :D

- John


Just make sure you read the man file :) Turns out that shred doesn't work for journalled filesystems, which I guess most of us use.
_________________
Gentoo 2007.0 on a Dell Inspiron e1505/6400 notebook
Intel core 2 duo 2.0 GHz with 2 GB ram
Ati Mobility Radeon x1400
Back to top
View user's profile Send private message
Hu
Watchman
Watchman


Joined: 06 Mar 2007
Posts: 9393

PostPosted: Tue Oct 09, 2007 2:33 am    Post subject: Reply with quote

That is not entirely accurate. According to the man page, shred cannot guarantee the destruction of a file on a journaled filesystem under certain conditions. For instance:

Code:
       In the case of ext3 file systems, the  above  disclaimer  applies  (and
       shred  is  thus  of  limited  effectiveness) only in data=journal mode,
       which journals file data in addition to just  metadata.   In  both  the
       data=ordered  (default) and data=writeback modes, shred works as usual.


However, when shredding an entire disk, as discussed in this topic, the filesystem present on the disk is irrelevant. In that mode, shred accesses the block device without regard for what filesystem, if any, was present beforehand. Thus, shred should be equally effective against swap, journaled filesystems, non-journaled filesystems, and even damaged or corrupt filesystems.

If the drive has suffered physical damage and reacted by remapping sectors, there may exist sectors which cannot be accessed by software. Such sectors would be immune to shred, but could still be vulnerable to access by advanced forensic techniques.
Back to top
View user's profile Send private message
JeliJami
Veteran
Veteran


Joined: 17 Jan 2006
Posts: 1086
Location: Belgium

PostPosted: Tue Oct 09, 2007 1:01 pm    Post subject: Reply with quote

To be found on these forums:

erasing HD or partitions:
dd: /dev/zero or /dev/random ?
Destroying a hardrive
[howto] Really Secure erase of hd or partition
[RESOLVED] destory data on a harddrive
Is there any way to...
Are there any ways to securely erase a HD?
Low Level Format.
howto wipe/shred empty partition?
Secure deleting program
securely cleansing a hard drive/partition [answered]
Linux privacy/cleaning tools, what to use?
Write random data to disk / securely erase current data

erasing files and directories:
shreding on an ext3 filesystem
dd and secure deletion
safe erasing files, overwrite free disc space
Shread and journaling file systems
Folder deleting/wiping utility
What do you use to wipe a file off (w/o pgp -w)?
destroying files so they are not recoverable

Hope I didn't miss any :)
_________________
Unanswered Post Initiative | Search | FAQ
Former username: davjel
Back to top
View user's profile Send private message
amne
Bodhisattva
Bodhisattva


Joined: 17 Nov 2002
Posts: 6377
Location: Graz / EU

PostPosted: Tue Oct 09, 2007 4:49 pm    Post subject: Reply with quote

Moved from Kernel & Hardware to Duplicate Threads.
Thanks davjel for this compilation of threads. :D
_________________
Dinosaur week! (Ok, this thread is so last week)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Duplicate Threads All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum