LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 07-29-2012, 09:21 PM   #1
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,695

Rep: Reputation: 56
How to securely erase the old hard disc before dumping?


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...cs-hard-drive/

Can it work? TIA

B.R.
satimis
 
Old 07-29-2012, 09:36 PM   #2
albinard
Member
 
Registered: Jan 2011
Location: New Mexico
Distribution: Xubuntu Core
Posts: 185

Rep: Reputation: 59
Yes, it can. In fact, a really fast and easy way is to use a PartedMagic CD, which has a clone of DBAN (Darik's Boot and Nuke) on it. I suggest the clone rather than the original because I've had some problems with DBAN confusing USB ports with actual devices. PartedMagic runs in memory, and it will wipe the 40GB drive of an old machine in well under an hour.
 
Old 07-30-2012, 12:09 AM   #3
Valery Reznic
ELF Statifier author
 
Registered: Oct 2007
Posts: 676

Rep: Reputation: 137Reputation: 137
fsck just chek/restore filesystem, it's not erase any data.

Already suggested DBAN should be just fine.
 
Old 07-30-2012, 05:45 AM   #4
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
Assuming that your friends don't work for the NSA/CIA it is enough to simply overwrite the whole disk with zeroes.
Code:
dd if=/dev/zero of=/dev/sdX bs=16M
will do the job.
 
Old 07-30-2012, 05:53 AM   #5
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
I have just enough paranoia to believe that---in principle--data can be recovered after just writing all zeros. If you have the same paranoia, use dd to first write random data, then all zeros.
 
Old 07-30-2012, 10:54 AM   #6
earthnet
Member
 
Registered: Jul 2012
Distribution: OpenSUSE
Posts: 36

Rep: Reputation: Disabled
It depends on your paranoia level. If you really want to be sure that no one can recover anything look into the shred program. The basic command is:
Code:
shred /dev/sdX
By default it will write random data over the entire surface of the drive 3x.
 
Old 07-30-2012, 04:30 PM   #7
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,982

Rep: Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626
Be sure to remove power cables to any internal drives that you want to keep data on just in case.

A live cd or live usb is fine. Any of the tools that write to each bit a few times is the normal way to be secure. dd works if you do it a few times one's and zero's.

Dban is a common tool and used by many people.

Last edited by jefro; 07-30-2012 at 09:07 PM.
 
Old 07-30-2012, 04:38 PM   #8
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
I'm not convinced more than just covering with zeros is really needed, are there really programs out there capable of reading data overwritten with zeros?
If somebody who can do anything more exotic than run a few recovery programs on your drive gets hold of it then they're likely either too sophisticated to care about your data or they're already bugging you.
 
Old 07-30-2012, 04:46 PM   #9
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
There are ways to recover data that is overwritten once with zeroes. If you have confidential data that a government will take the time and costs to recover them than you should use a hammer and one of the big magnets from a junk yard.
But the OP is stating that he wants to give the disks to friends, so anything more than a simple run of dd is overkill and pure paranoia (and may be to much self-esteem, if it was a normal desktop system no one wants your data).
 
Old 07-30-2012, 04:52 PM   #10
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
"pure paranoia"-----yup, none of that watered-down stuff for me......

seriously--you are right. For most things, the simplest solution is fine.

If the disk has my personal identity data on it, then it does not matter who's getting the disk---it's going to get the full paranoia treatment.

so....the correct answer is "it depends"
 
Old 07-30-2012, 05:06 PM   #11
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
Quote:
Originally Posted by pixellany View Post
If the disk has my personal identity data on it, then it does not matter who's getting the disk---it's going to get the full paranoia treatment.
If the personal info on your PC makes it worth while for a criminal to pay a data recovery company to get it back then you're rich enough to shred the drives and buy new ones for friends, family or whoever.
It's hard to phrase this but I would be surprised if anyone who has time to post here has data on their personal drive a criminal sophisticated enough to recover zero-overwritten would care about. Unless your name is Gates, Ellison or, possibly, Assange then zero-overwrite will be enough.
 
Old 07-30-2012, 05:38 PM   #12
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Again---you are right.

Think of it this way: I can do 2 passes with dd (one random, and the 2nd all zeros) faster than I can type an average post on LQ. Thus, an overkill of 5000% costs me nothing.......

Anticipating the likely nitpick, I'm talking about the time to enter the commands. I'll be sleeping while they run, so that does not count.
 
Old 07-30-2012, 05:40 PM   #13
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
Quote:
Originally Posted by pixellany View Post
Again---you are right.

Think of it this way: I can do 2 passes with dd (one random, and the 2nd all zeros) faster than I can type an average post on LQ. Thus, an overkill of 5000% costs me nothing.......

Anticipating the likely nitpick, I'm talking about the time to enter the commands. I'll be sleeping while they run, so that does not count.
Fair enough, if you have the time then being careful isn't a bad thing.

Last edited by 273; 07-30-2012 at 05:42 PM.
 
Old 07-30-2012, 07:19 PM   #14
SharpyWarpy
Member
 
Registered: Feb 2003
Location: Florida
Distribution: Fedora 18
Posts: 862

Rep: Reputation: 91
Take the cover off the hard drive. Remove the hard drive disks. Put on a pair of safety glasses. Using two pairs of pliers hold a disc on both sides with pliers in each hand. Break the disc(s) using a back and forth motion. Guaraneteed NOBODY is gonna be able to do anything with that. And you can save the high powered neodimium magnets with which to do neat things.
 
Old 07-30-2012, 09:00 PM   #15
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,324
Blog Entries: 28

Rep: Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142
A hammer.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to Securely Delete Data from Hard Drives! onebuck Linux - General 31 05-29-2012 11:34 AM
LXer: How To Securely Destroy/Wipe Data On Hard Drives With shred LXer Syndicated Linux News 0 02-22-2012 10:10 AM
Linux Distro that will securely clean hard drive? alime Linux - Distributions 7 02-01-2012 06:43 PM
Tips for securely wiping hard disks irlandes Linux - Security 4 09-23-2009 09:52 AM
Question re: dumping to new hard drive nyle Linux - Newbie 9 02-08-2008 09:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:27 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration