Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Question on securely erasing old hd before dumping

If none of the specific sub-forums seem right for your thread, ask here.
Message
Author
satimis
Posts: 536
Joined: 2004-09-11 11:50
Location: Hong Kong

Question on securely erasing old hd before dumping

#1 Post by satimis »

Hi folks,

I have several 40G hard drives which I'm prepared to dump. Before giving them to my friends what will be the easy way to securely erase all data on them.

I'm prepared performing following steps.

1)
attach the hard drives to a PC

2)
boot up the PC with a USB drive

3)
run:
$ fdisk -l | grep '^Disk'
$ fsck -f -y /dev/hdx1

x is the device number of the hard drive, such as a,b,c etc.

Can above steps permanently erase all data on the hard drive?


Just found;
Use an Ubuntu Live CD to Securely Wipe Your PC’s Hard Drive
http://www.howtogeek.com/howto/15037/us ... ard-drive/

Can it work? TIA

B.R.
satimis

vbrummond
Posts: 4432
Joined: 2010-03-02 01:42

Re: Question on securely erasing old hd before dumping

#2 Post by vbrummond »

You can use wipe from a debian live cd as well. Personally I would just use dd. Note just "formatting" the drive does not wipe the data. You will need to overwrite every byte.

http://how-to.wikia.com/wiki/How_to_wip ... n_in_Linux

Use caution that you wipe the correct devices and not something you want to keep.
Always on Debian Testing

User avatar
4D696B65
Site admin
Site admin
Posts: 2696
Joined: 2009-06-28 06:09
Been thanked: 85 times

Re: Question on securely erasing old hd before dumping

#3 Post by 4D696B65 »

You can use dd as the link above shows or you can use shred.

Code: Select all

shred -v -n 1 /dev/sdx

User avatar
dasein
Posts: 7680
Joined: 2011-03-04 01:06
Location: Terra Incantationum

Re: Question on securely erasing old hd before dumping

#4 Post by dasein »

satimis wrote:Can above steps permanently erase all data on the hard drive?
No.

The dd method discussed in the link provided by vbrummond, however, is perfectly adequate to wipe the drive clean. And it's way quicker than shred.

satimis
Posts: 536
Joined: 2004-09-11 11:50
Location: Hong Kong

Re: Question on securely erasing old hd before dumping

#5 Post by satimis »

vbrummond wrote:You can use wipe from a debian live cd as well. Personally I would just use dd. Note just "formatting" the drive does not wipe the data. You will need to overwrite every byte.

http://how-to.wikia.com/wiki/How_to_wip ... n_in_Linux
Thanks for your advice.

I used dd command for sometimes. But the data erased can be recovered as mentioned in some articles, suggesting running a large size file to take up the newly formatted old hard drive.
Use caution that you wipe the correct devices and not something you want to keep.
I'll remove the running hard drive on the PC using a Live CD/USB to boot the PC.

satimis

User avatar
dasein
Posts: 7680
Joined: 2011-03-04 01:06
Location: Terra Incantationum

Re: Question on securely erasing old hd before dumping

#6 Post by dasein »

satimis wrote:But the data erased can be recovered as mentioned in some articles
Urban legend. It might be possible for someone with incredibly sophisticated hardware recovery tools to recover some portion of the drive, but you're not giving these drives to the NSA, you're giving them to your friends. Using dd is perfectly adequate.

Note: The mere fact that the legend is repeated often (far too often) doesn't make it true. The plural of "anecdote" is not "data."
Last edited by dasein on 2012-07-30 03:04, edited 1 time in total.

satimis
Posts: 536
Joined: 2004-09-11 11:50
Location: Hong Kong

Re: Question on securely erasing old hd before dumping

#7 Post by satimis »

Hi 4D696B65 and dasein,

Thanks for your advice.

Can "shred" permanent erase all data on the old HD, unable to recover/undelete? If YES, is following article relevant?

Howto Delete Files Permanently and Securely in Linux
http://techthrob.com/2009/03/02/howto-d ... -in-linux/

TIA

satimis

User avatar
dasein
Posts: 7680
Joined: 2011-03-04 01:06
Location: Terra Incantationum

Re: Question on securely erasing old hd before dumping

#8 Post by dasein »

If you want to use shred, there's certainly nothing wrong with it. But it is unnecessary, and I defy you to find a single independently verified instance of (keyboard) data recovery after a drive has been zeroed out with dd.

http://hardware.slashdot.org/story/08/0 ... unaccepted

EDIT Link to higher quality Web site ;)
Edit #2: Clarification of what "data recovery" was meant to convey
Last edited by dasein on 2012-07-30 03:26, edited 3 times in total.

User avatar
traveler
Posts: 942
Joined: 2010-06-09 22:07

Re: Question on securely erasing old hd before dumping

#9 Post by traveler »

Hmm, you're worried about your friends doing something nefarious like recovering your private data from a drive you gave them?
1) dd the drive.
2) Insert a 1/4" bit into your favorite drill and go to town on the platter.
3) Deposit mangled discs in nearest waste receptacle.
4) Consider finding new friends?
I wish for a conjugal visit and world peace. (Don't want to seem selfish.)

User avatar
dasein
Posts: 7680
Joined: 2011-03-04 01:06
Location: Terra Incantationum

Re: Question on securely erasing old hd before dumping

#10 Post by dasein »

traveler wrote:4) Consider finding new friends?
:lol: +1

vbrummond
Posts: 4432
Joined: 2010-03-02 01:42

Re: Question on securely erasing old hd before dumping

#11 Post by vbrummond »

Yeah, I know a fellow who opted to fry, smash, etc drives rather than let me dd them, prove the data is deleted, then let me have them (or even buy them, or hell he himself could reuse them). Thanks for the link dasein, I will have to pass that along to him. :P
Always on Debian Testing

User avatar
dasein
Posts: 7680
Joined: 2011-03-04 01:06
Location: Terra Incantationum

Re: Question on securely erasing old hd before dumping

#12 Post by dasein »

vbrummond wrote:Yeah, I know a fellow who opted to fry, smash, etc drives rather than let me dd them, prove the data is deleted, then let me have them (or even buy them, or hell he himself could reuse them).
Einstein was right about the infinity of stupidity.

Be sure to send him the updated/slashdot link. ;)

Edit: Found this, too. Nicely documented: http://www.anti-forensics.com/disk-wipi ... -is-enough

(Unless of course the OP's friends have an electron microscope handy.)

satimis
Posts: 536
Joined: 2004-09-11 11:50
Location: Hong Kong

Re: Question on securely erasing old hd before dumping

#13 Post by satimis »

Hi all,

A further question.

Running;
# dd if=/dev/zero of=/dev/sdx bs=1M

will take long time to complete.

# dd if=/dev/urandom of=/dev/sdx bs=1M
even takes longer time.

How to check its progress? Instead of only seeing the cursor blinking. TIA

satimis

User avatar
dasein
Posts: 7680
Joined: 2011-03-04 01:06
Location: Terra Incantationum

Re: Question on securely erasing old hd before dumping

#14 Post by dasein »

1) Using /dev/urandom (or shred, or making 25 passes, or whatever) isn't better, merely slower. I don't know how to make this point any clearer or more emphatically.

2) Google check dd progress

3) For dd, consider using a bs value equal to your HDD's hardware cache size. It probably won't make a huge speed difference, but there's no reason not to pump data to the drive as fast as the drive can handle it.

satimis
Posts: 536
Joined: 2004-09-11 11:50
Location: Hong Kong

Re: Question on securely erasing old hd before dumping

#15 Post by satimis »

dasein wrote: - snip -
3) For dd, consider using a bs value equal to your HDD's hardware cache size. It probably won't make a huge speed difference, but there's no reason not to pump data to the drive as fast as the drive can handle it.
$ sudo hdparm -I /dev/sda | grep -i speed
[sudo] password for satimis:

Code: Select all

	   *	Gen1 signaling speed (1.5Gb/s)
	   *	Gen2 signaling speed (3.0Gb/s)
What speed shall I use?

Code: Select all

# dd if=/dev/zero of=/dev/sda bs=? count=?
Other advice noted. Thanks

B.R.
satimis

cynwulf

Re: Question on securely erasing old hd before dumping

#16 Post by cynwulf »

Another +1 for dd...

Once a drive has been 0 filled, you cannot recover data, there are no tools in existence which can recover something which is simply not there. The idea that some intelligence agency can still recover data is complete bollocks put out by unscrupulous developers of 3rd party security software for wintards...

User avatar
kiyop
Posts: 3983
Joined: 2011-05-05 15:16
Location: Where persons without desire to improve themselves fear to tread, in Japan
Been thanked: 3 times

Re: Question on securely erasing old hd before dumping

#17 Post by kiyop »

I vote for "shred -n 1 -v".

EDIT at Fri Aug 3 07:18:22 JST 2012:
4D696B65 wrote:
dasein wrote: The dd method discussed in the link provided by vbrummond, however, is perfectly adequate to wipe the drive clean. And it's way quicker than shred.
Shred is slower because it does multiple writes while dd does only one.
The purpose of shred is to shred, dd is a copy command
.
I guess it has much to do with your level of paranoia.
I see. Thanks. :)
I have thought that "shred -n 1 -v" is faster than "dd if=/dev/urandom of=".
Last edited by kiyop on 2012-08-02 22:12, edited 3 times in total.
Openbox, JWM: Jessie, Sid, Arch / Win XP (on VirtualBox), 10
http://kiyoandkei.bbs.fc2.com/

User avatar
4D696B65
Site admin
Site admin
Posts: 2696
Joined: 2009-06-28 06:09
Been thanked: 85 times

Re: Question on securely erasing old hd before dumping

#18 Post by 4D696B65 »

kiyop wrote:I vote for "shred -n 1 -v".
So do I.
dasein wrote: The dd method discussed in the link provided by vbrummond, however, is perfectly adequate to wipe the drive clean. And it's way quicker than shred.
Shred is slower because it does multiple writes while dd does only one.
The purpose of shred is to shred, dd is a copy command
.
I guess it has much to do with your level of paranoia.

cynwulf

Re: Question on securely erasing old hd before dumping

#19 Post by cynwulf »

4D696B65 wrote:I guess it has much to do with your level of paranoia.
I learned to stop worrying about extra dimensional beings stealing my data.

If in doubt though, the best approach is a star head (torx) screwdriver (I think it's a "T8") and just dismantle the drives and wreck the platters...

User avatar
4D696B65
Site admin
Site admin
Posts: 2696
Joined: 2009-06-28 06:09
Been thanked: 85 times

Re: Question on securely erasing old hd before dumping

#20 Post by 4D696B65 »

cynwulf wrote:
4D696B65 wrote:I guess it has much to do with your level of paranoia.
I learned to stop worrying about extra dimensional beings stealing my data.

If in doubt though, the best approach is a star head (torx) screwdriver (I think it's a "T8") and just dismantle the drives and wreck the platters...
I just hammer a few nails in an old drive so a garbage man with my curiosity will give up.

Post Reply