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 01-18-2014, 02:20 PM   #1
old salt
LQ Newbie
 
Registered: Feb 2010
Location: Manitoba, Canada
Distribution: Ubuntu 8.04 LTS, CrunchBang 9.04, Lucid Puppy 5.0.1
Posts: 10

Rep: Reputation: 0
How to PERMANENTLY remove files from a HDD


I tried searching for this question a couple of times and found nothing helpful.

I have an old PC with Win95 on it and I want to Permanently Erase everything from the Hard Drive before I take the computer to e-waste recycling.

I used Tomsrtbt to run "badblocks" with the read/write option. After this had completed I tried booting into Win95 and it showed "no operating system present".

1. Can I assume that All Files have been permanently removed from the hard drive?
2. Is there a way to check that there are no readable files left on the drive?
3. If I use Tomsrtbt to establish a new hard drive partition table and create an "ext2" file system,
will this further insure that none of the previous Dos files are salvageable?
 
Old 01-18-2014, 02:23 PM   #2
metaschima
Senior Member
 
Registered: Dec 2013
Distribution: Slackware
Posts: 1,982

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
Burn a UBCD disk and use one of the wipe utilities to wipe the disk:
http://www.ultimatebootcd.com/

One pass zero should be enough in most cases. If you are paranoid, you can do one pass random data. If you are really paranoid you can wipe it as many times as you want to relieve anxiety.
 
1 members found this post helpful.
Old 01-18-2014, 03:13 PM   #3
jamison20000e
Senior Member
 
Registered: Nov 2005
Location: ...uncanny valley... infinity\1975; (randomly born:) Milwaukee, WI, US( + travel,) Earth&Mars (I wish,) END BORDER$!◣◢┌∩┐ Fe26-E,e...
Distribution: any GPL that work on freest-HW; has been KDE, CLI, Novena-SBC but open.. http://goo.gl/NqgqJx &c ;-)
Posts: 4,888
Blog Entries: 2

Rep: Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567
Hi. Depends on how paranoid you want to be about forensics software and such, I'd say it's fine but others would say destroy the drive and recycle the rest? Best wishes and have fun.

Last edited by jamison20000e; 01-18-2014 at 07:13 PM.
 
1 members found this post helpful.
Old 01-18-2014, 04:10 PM   #4
Soderlund
Member
 
Registered: Aug 2012
Posts: 185

Rep: Reputation: 81
These quotes may be interesting:

Quote:
"But if he broke the platters, the likelyhood of data recovery is slim to none."
Quote:
On the other hand, Brian Cane, a consultant with ECO Data Recovery, said if Lanza overwrote the drive, the data would be lost.
Source

Some say that zero-filling once is enough. Others say that you need several passes of random data. I only know that writing with dd from /dev/zero is significantly faster than /dev/urandom. I did that on an old harddrive -- the random data fill would've taken several hours, but a zero-fill finished in about 20 minutes.
 
Old 01-18-2014, 04:32 PM   #5
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
Unless you keep the secret formula to Coca-Cola on your hard drive then just one pass of zeros is enough. To get back that data somebody would have to take apart the drive and use specialist equipment to recover the data so I doubt it's worth doing that on the off chance they can hijack your Amazon account through retained cookies.
 
Old 01-18-2014, 05:23 PM   #6
metaschima
Senior Member
 
Registered: Dec 2013
Distribution: Slackware
Posts: 1,982

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
Quote:
Originally Posted by Soderlund View Post
Some say that zero-filling once is enough. Others say that you need several passes of random data. I only know that writing with dd from /dev/zero is significantly faster than /dev/urandom. I did that on an old harddrive -- the random data fill would've taken several hours, but a zero-fill finished in about 20 minutes.
Try:
http://wipe.sourceforge.net/

Certainly, physically destroying the disk with a sledgehammer will NOT clear the data, it will just make it harder to piece together. If you wanted to physically wipe the disk, use a large and powerful magnet. Such a magnet can be found inside the HDD itself as part of the arm movement mechanism. Be careful with it tho, it can crush your fingers and hurts a lot when it does. The HDD writing heads are razor sharp and can easily cut you. How do I know ? From experience
 
Old 01-18-2014, 05:26 PM   #7
jamison20000e
Senior Member
 
Registered: Nov 2005
Location: ...uncanny valley... infinity\1975; (randomly born:) Milwaukee, WI, US( + travel,) Earth&Mars (I wish,) END BORDER$!◣◢┌∩┐ Fe26-E,e...
Distribution: any GPL that work on freest-HW; has been KDE, CLI, Novena-SBC but open.. http://goo.gl/NqgqJx &c ;-)
Posts: 4,888
Blog Entries: 2

Rep: Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567
. ... .). ,
... (', ( .
...) , )..;(
.^^^^^^^^^
Fire t!

Last edited by jamison20000e; 01-18-2014 at 07:35 PM. Reason: Weekend! :) Sick of violin practise...
 
Old 01-18-2014, 09:26 PM   #8
weirdwolf
Member
 
Registered: Jun 2007
Location: 1 AU from a G2V star
Distribution: PCLinuxOS LXDE / Android
Posts: 247

Rep: Reputation: 434Reputation: 434Reputation: 434Reputation: 434Reputation: 434
Quote:
Originally Posted by 273 View Post
Unless you keep the secret formula to Coca-Cola on your hard drive then just one pass of zeros is enough. To get back that data somebody would have to take apart the drive and use specialist equipment to recover the data so I doubt it's worth doing that on the off chance they can hijack your Amazon account through retained cookies.
IIRC, involves electron microscopes, a lot of time plus a big chunk of money.
 
Old 01-18-2014, 10:08 PM   #9
jamison20000e
Senior Member
 
Registered: Nov 2005
Location: ...uncanny valley... infinity\1975; (randomly born:) Milwaukee, WI, US( + travel,) Earth&Mars (I wish,) END BORDER$!◣◢┌∩┐ Fe26-E,e...
Distribution: any GPL that work on freest-HW; has been KDE, CLI, Novena-SBC but open.. http://goo.gl/NqgqJx &c ;-)
Posts: 4,888
Blog Entries: 2

Rep: Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567
You may be shocked at the data I've seen left on second hand PCs from thrift stores and wherever before I wipe to revamp and sell or give with Linux, not to mention some truth-or-dare on a $ony handy cam from a ritzy neighborhoods rummage once ouh là là. There are some* banking on data but (I imagine) only if it's worth their time and effort? http://www.bullguard.com/bullguard-s...martphone.aspx
 
Old 01-19-2014, 11:37 PM   #10
Beryllos
Member
 
Registered: Apr 2013
Location: Massachusetts
Distribution: Debian
Posts: 529

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
Quote:
Originally Posted by old salt View Post
I used Tomsrtbt to run "badblocks" with the read/write option...
Hey, that sounds like a great idea. I have always used dd with if=/dev/urandom to wipe old drives, but that is rather slow. Writing patterns with badblocks should be fast and should provide a thorough wipe much like dd. I will try it next time.

To answer your questions:
Quote:
1. Can I assume that All Files have been permanently removed from the hard drive?
With the right badblocks command line, that should be a safe assumption.

Quote:
2. Is there a way to check that there are no readable files left on the drive?
If you write zeroes on the last pass, you can use the following command line:
Code:
dd if=/dev/sda | hexdump -C
If the device contains nothing but zeroes, you will get a short output like the following:
Code:
00000000  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
16777216+0 records in
16777216+0 records out
8589934592 bytes (8.6 GB) copied, 108.452 s, 79.2 MB/s
200000000
(The above output was generated with a 8GB file, not a hard drive device, just to test the command line.)

Quote:
3. If I use Tomsrtbt to establish a new hard drive partition table and create an "ext2" file system,
will this further insure that none of the previous Dos files are salvageable?
Probably not. I think partitioning does not overwrite the file space. Any data still existing there would be readable.
 
Old 01-20-2014, 04:13 PM   #11
Addicted2linux
LQ Newbie
 
Registered: Jan 2014
Distribution: Slackware 13
Posts: 14

Rep: Reputation: Disabled
It is also a good idea to run cryptsetup after dding a hard drive for an extra layer of protection. Since you will not use the HDD anymore, use a long complex passphrase as possible.
 
1 members found this post helpful.
Old 01-20-2014, 04:41 PM   #12
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
To make it short: Neither using badblocks nor dd nor DBAN can by definition reliably delete or overwrite all existing data on the disk. If the disk has reallocated sectors it may be possible that those still contain readable data, but they are not affected at all by any of the mentioned methods for overwriting data. So theoretically there can still be readable data, though practically chances that the data is still readable (sectors get reallocated for a reason) and if so contains anything of value is really really small.
I myself prefer just a single overwrite with zeroes, good enough for me and unrecoverable without technical expertise, specialized equipment and a good bunch of money.
 
1 members found this post helpful.
Old 01-20-2014, 05:02 PM   #13
metaschima
Senior Member
 
Registered: Dec 2013
Distribution: Slackware
Posts: 1,982

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
Here's something to think about. Many disk wiping utilities use the Mersenne-Twister algorithm to wipe the disk (wipe, dban, and others). However, MT is NOT a cryptographic PRNG. This means that if you have the technology to undo writing to the HDD, then wiping with MT is no better than zeroing the drive. You can easily predict the state of the MT PRNG and know what bits were written, and then be able to undo them.

The only way to prevent this is to use a cryptographic PRNG. There is actually a crypto MT developed by the same authors:
https://en.wikipedia.org/wiki/CryptMT
 
1 members found this post helpful.
  


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
permanently remove network interface fachamix Linux - Networking 1 06-15-2010 10:00 AM
How do you permanently remove a module from the kernel? edomingox Linux - Server 14 06-15-2010 06:29 AM
how to remove a bridge permanently? yashwanth Linux - Networking 2 12-08-2008 12:09 AM
How to remove module permanently Maverick1182 Linux - Hardware 3 11-04-2006 02:08 PM
How to PERMANENTLY Remove a KLM? RWild Linux - General 7 08-31-2003 11:54 AM

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

All times are GMT -5. The time now is 06:18 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