LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 10-25-2004, 02:46 PM   #1
lamar_air
Member
 
Registered: Oct 2004
Posts: 37

Rep: Reputation: 15
How to zero-fill a hard drive??


I have a hard drive that crashed and I'd like to try zero-filling it to see if it will still work.
1 - Should I use Suse or knoppix Live to do this (I have Suse and it runs well on my notebook however if I can't do it with Suse then I will use Knoppix)?
2 - What are the commands that I use in the terminal to initiate the zero-fill process? (Please provide detail because i'm not too familiar with these commands).

Thanks!
 
Old 10-25-2004, 03:23 PM   #2
citro
LQ Newbie
 
Registered: Jul 2003
Posts: 17

Rep: Reputation: 1
you need to be DAMN careful, you know.
I will not be responsible for any damage you do to any other harddisks in your machine if you select the wrong one!

you need to be root, I guess.

then, the command is simple:

dd if=/dev/zero of=/dev/hda bs=1M

that will fill /dev/hda with zeroes. BE CAREFUL!! If you select the wrong drive, all your data will be lost!!!
(You know that /dev/hda refers to the first harddisk in your system? you know that /dev/hdb or /dev/hdc point to the other drives? if you don't, PLEASE do not do this. Really.)

citro
 
Old 10-25-2004, 03:32 PM   #3
lamar_air
Member
 
Registered: Oct 2004
Posts: 37

Original Poster
Rep: Reputation: 15
It's on a laptop so i will put that hard drive in and there won't be any others. Right now the drive isn't usable so I have nothing to lose on it.

Is this the command i type or are there any parameters in it that I need to change, for instance what's the 1M mean at the end?

"dd if=/dev/zero of=/dev/hda bs=1M"

Thanks again!
 
Old 10-25-2004, 03:38 PM   #4
vasudevadas
Member
 
Registered: Jul 2003
Location: Bedford, UK
Distribution: Slackware 11.0, LFS 6.1
Posts: 519

Rep: Reputation: 30
If you really want to zero your hard drive to start afresh then the best way would be to get a low-level format tool. You will be able to download one from your hard drive manufacturer's support site, that you will be able to copy to a floppy disc which you can boot from.

Your computer will be completely clean once you have done this. No trace of anything that was on it before. Use at your own peril!
 
Old 10-25-2004, 04:42 PM   #5
lamar_air
Member
 
Registered: Oct 2004
Posts: 37

Original Poster
Rep: Reputation: 15
low level format utility

I looked for one on the toshiba site but I can't find one. I need one for a toshiba drive, its a 2.5" 60gb 5400 but i'm not sure if anything but the manufacture matters. Know where I can get a utility for my HD?
 
Old 10-26-2004, 01:45 AM   #6
Lim45
Member
 
Registered: Apr 2003
Location: Northern England
Distribution: Debian Wheezy 64-bit
Posts: 128

Rep: Reputation: 15
Zero-wrting utility

I've been using the zero-writing tool in Seagate's DiscWizard Starter Edition for a couple of years, and it'll work fine on any make of drive. I always use the floppy version, but I see from Seagate's site that there's a bootable cd image as well:

http://www.seagate.com/support/disc/...s/discwiz.html

It's in the Utilities menu, and really couldn't be easier. Takes a while depending on the size of the drive, though.

Hope this helps,

Dave
 
Old 06-26-2006, 10:40 AM   #7
tnandy
Member
 
Registered: Oct 2003
Location: Tennessee
Distribution: Devuan 3.0 (Beowulf)
Posts: 217

Rep: Reputation: 18
Alas, I have been unable to find ANY hard drive utilities from Toshiba, where all my other (late model) brands of hard drives provide easily found utilities on their websites. I have used IBM/Hitachi utilities on Toshiba hard drives.

However, my favorite tool for wiping a hard drive is DBAN (Darik's Boot and Nuke). It allows single or multiple passes and comes on a bootable floppy or bootable CD. It's a free download at http://dban.sourceforge.net/ .
 
Old 06-26-2006, 11:10 AM   #8
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,691
Blog Entries: 4

Rep: Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947
Why not use the SMART on-board diagnostic capabilities that all IDE disk-drives have? (See smartctl, etc.)

See: http://smartmontools.sourceforge.net#references

You can order the drive to perform its own diagnostic self-tests, which it can do while being accessed. You can also see a log of all the errors which the on-board electronics within the drive has recorded.

If the drive is showing errors, my frank advice is get rid of the drive. Don't try to resuscitate it; don't try to continue using it. If it has really failed once, it will fail again soon.

And, drives aren't that expensive anyway... they're certainly cheaper than your data!
 
Old 06-26-2006, 11:24 AM   #9
nlinecomputers
Member
 
Registered: Aug 2005
Location: Midland, TX
Distribution: Ubuntu
Posts: 125

Rep: Reputation: 15
Zeroing out the drive is worthless. I have many tools Windows and Linux based that can recover data from that.

If you want a true purge of data so that it is unrecoverable I'd use this:
http://dban.sourceforge.net/
 
Old 06-26-2006, 11:56 AM   #10
Daws
Member
 
Registered: May 2006
Location: UK
Distribution: Debian
Posts: 447

Rep: Reputation: 39
Quote:
Zeroing out the drive is worthless.
Are you sure? I understand that a regular format merely marks the space as overwritable, so data recovery from that is certainly possible. But, overwriting the entire drive with zeroes... surely that makes it impossible to recover data.
 
Old 06-26-2006, 12:07 PM   #11
nlinecomputers
Member
 
Registered: Aug 2005
Location: Midland, TX
Distribution: Ubuntu
Posts: 125

Rep: Reputation: 15
Yes I'm sure. I've recovered data in that situation. The link I gave you is to a program that does MULITPLE passes with more then one kind of pattern to wipe data. And even THEN with the right equipment data can be recovered. But you need an oscilloscope and other tools to retrieve data at that point. A one pass zero write is very easy to recover data from it.

Here is a linux live cd with those kind of tools on it.
http://www.e-fense.com/helix/
 
Old 06-26-2006, 02:05 PM   #12
Daws
Member
 
Registered: May 2006
Location: UK
Distribution: Debian
Posts: 447

Rep: Reputation: 39
So if hypothetically I fill a 20 Gb drive to the brim with say linux distro cd images, and then do the same with different distros. If I can then recover bits and pieces of the first round of images, doesn't this mean that the drive contains more than 20 Gb worth of data?

This is what I have a hard time comprehending, but then again I'm not exactly a data storage specialist...
 
Old 06-26-2006, 03:34 PM   #13
nlinecomputers
Member
 
Registered: Aug 2005
Location: Midland, TX
Distribution: Ubuntu
Posts: 125

Rep: Reputation: 15
Yes in a since but that recovery isn't easy and it is time consuming. Also puting all zeros in the system creates an easy to mask pattern for data recovery software to look for. That is why good Data wipe software performs more then one pass with different data writes. One pass will be all zero, then all ones, then a checkerbox pattern and so forth.
 
Old 02-09-2009, 11:44 AM   #14
Halobec
LQ Newbie
 
Registered: Feb 2009
Posts: 2

Rep: Reputation: 0
Zero fill HDD - Recovery

Quote:
Originally Posted by nlinecomputers View Post
Zeroing out the drive is worthless. I have many tools Windows and Linux based that can recover data from that.
I need to recover data from a zero filled device. Can you post a link to one of these Linux recovery tools, that recovers data from a zero filled device, without using high tech equipment.

Thanks
 
Old 02-09-2009, 03:19 PM   #15
jiml8
Senior Member
 
Registered: Sep 2003
Posts: 3,171

Rep: Reputation: 116Reputation: 116
Quote:
Originally Posted by Halobec View Post
I need to recover data from a zero filled device. Can you post a link to one of these Linux recovery tools, that recovers data from a zero filled device, without using high tech equipment.

Thanks
There ain't no such critter. Once the drive is zero filled, all data is gone forever.

Rumor has it that the National Security Agency can recover data from drives that have been zero-written, if they've only been zero-written once or twice. I have always been a bit skeptical of that, but won't commit and say it can't be done.

So if you have a friend in the NSA who is willing to cooperate, go for it. Otherwise, you might as well forget it.
 
  


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
DISCUSSION: Clean Hard Drive (zero fill) Darin LinuxAnswers Discussion 31 05-06-2013 08:04 AM
Installing grub to external USB hard drive for later use as internal hard drive dhave Linux From Scratch 2 12-10-2005 08:48 AM
2 hard drive in system mirror 1st hard drive sburns76247 Linux - General 2 12-21-2004 01:47 AM
Grub to access new hard drive and old multi os hard drive ? gedi1 Linux - Hardware 0 06-03-2004 12:01 PM
STUCK--Trying to copy old Hard Drive to new Hard Drive. Please Help tsw Linux - Newbie 8 05-26-2004 02:47 AM

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

All times are GMT -5. The time now is 06:45 AM.

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