Jump to content











Photo
- - - - -

Zero-out utility with specified offset?


  • Please log in to reply
17 replies to this topic

#1 Uneitohr

Uneitohr

    Frequent Member

  • Advanced user
  • 218 posts

Posted 15 July 2014 - 05:15 PM

I have an HDD drive that I'd like to zero-out. The drive itself started to have random freezes, benchmarks reported slow performance and overall the disk semms very slow.

 

What I'd like to do is to use a formatting utility that allows a specified offset to be supplied. Say today I erase 0 - 102400 (100GB), tomorrow another set and so on and so forth.

I need to this like so because I cannot leave the PC running overnight. A full zero-out will take about 50 hours (says in WD DLG) and it is just impossible.

 

Can someone point me in the right direction?



#2 erwan.l

erwan.l

    Platinum Member

  • Developer
  • 2838 posts
  • Location:Nantes - France
  •  
    France

Posted 15 July 2014 - 08:03 PM

Do you really need to zero it all out?

Usually the first sectors (0-64, or 0-2048) is enough? A full format then should be enough?

 

Clonedisk can start wiping out a disk (physical or logical) and you can cancel it as few secs or mns.

 

Just my 2 cents...



#3 florin91

florin91

    Frequent Member

  • Team Reboot
  • 197 posts
  •  
    European Union

Posted 16 July 2014 - 06:13 AM

If by zero out you mean writting junk data or 0x00s, then dd tool from linux might be able to write to selected sectors. Watch out at sectors numbers and the calculation ...

#4 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 15186 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 20 July 2014 - 01:22 PM

Under Windows, what I would do would be to create a sparse file on a NTFS volume (on another disk) with this tool makesparsefile:

http://jerome.hode.free.fr/opensource/

and the then use dsfok's dsfi to directly write it to the \\physicaldriven at a given offset (it will be expanded to full size on destination).

http://members.ozema...eezip/freeware/

 

Or you could use a dd port with a "zero" device like pldd:

http://reboot.pro/to...uest-for-ddexe/

http://home.comcast....csi/tools/pldd/

 

:duff:

Wonko



#5 steve6375

steve6375

    Platinum Member

  • Developer
  • 7188 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films,guitars, www.easy2boot.com
  •  
    United Kingdom

Posted 20 July 2014 - 03:58 PM

Why not use HDDErase which is MUCH faster?

 

You can even erase the whole hard disk by booting it to Windows first - see here



#6 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 15186 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 20 July 2014 - 04:55 PM

Why not use HDDErase which is MUCH faster?

 

You can even erase the whole hard disk by booting it to Windows first - see here

Yep, but how BIG is the disk?

Assuming that WD DLG has more or less the same speed as DBAN, and you have 82 minutes as opposed to 3.5 hours (i.e. 210 minutes) the thingy pre-calculated 50 hours (i.e. 3000 minutes) :

82:210=x:3000

x=1,171.4285... i.e. roughly 19.50 hours :ph34r:.

 

Another method (creating a partition and then formatting it under Windows VIsta and later) was hinted here:

http://reboot.pro/to...-use-in-win7pe/

http://reboot.pro/to...in7pe/?p=153778

the same approach may be extended making several (FAT32) partitions, formatting them without the /q switch and then overwriting the appropriate amount of sectors holding the reserved sectors and the FAT tables, but the dd method would be easier.

 

 

:duff:

Wonko



#7 steve6375

steve6375

    Platinum Member

  • Developer
  • 7188 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films,guitars, www.easy2boot.com
  •  
    United Kingdom

Posted 20 July 2014 - 05:15 PM

I was assuming that a lot of the time is taken up by Windows drivers/OS doing loads of retries and reseeks due to bad reads and writes. Using HDDErase would circumvent this as it uses the drive firmware - it may also tidy up the bad sectors whilst it is doing it and he would end up with a 'clean' drive with no bad sectors.



#8 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 15186 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 20 July 2014 - 05:36 PM

Yes, there is no doubt that the internal ATA commands are faster than *anything else*, but still they may not be "fast enough" to wipe a (large) disk within (say) the 8 hours the PC (for whatever reasons) is allowed to remain powered on.

 

THIS is what the OP asked, how to do partial wipes in several sessions, and my previous posts are related to answer the asked question (and not the "Which is the fastest way to wipe a hard disk?" which was NOT asked, but to which you replied).

 

I believe that the command is "entirely internal" so it is well possible - in theory :dubbio: - to use an external power supply for the hard disk, and switch the PC off at the end of the day leaving only the disk powered on (but I know nothing about anyone experimenting with this approach).

 

For the record, if the idea is to wipe a disk, good, if the idea is that writing 00's to a disk will "revive it", allow me to doubt that the idea:

1) makes any sense

2) will be in any way effective

 

There is a known tool (Commercial) called HDD regenerator:

http://www.dposoft.net/hdd.html

that claims to be able - at least in some cases - to fix bad sectors (through a particular writing/rewriting pattern).

I never had an occasion to try it, and was not able to find reliable reports of it's effects, but surely by just writing 00's bad sectors won't become good by sheer magic.

 

:duff:

Wonko 



#9 steve6375

steve6375

    Platinum Member

  • Developer
  • 7188 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films,guitars, www.easy2boot.com
  •  
    United Kingdom

Posted 20 July 2014 - 05:51 PM

The OP complained that his HDD was very slow and 'freezes' which indicated to me that it had many bad sectors.

 

e.g.

 

My car won't steer properly and I keeps going into the kerb.

Q. How can I change the steering wheel?

Wonko's answer: Take off the cap in the centre of the steering wheel and use a spanner to undo the large nut(s)

My answer: change the near-side front tyre (tire)

 

HDD Regenerator works by forcing the HDD controller to mark the sector(s) as bad if writes or multiple reads fail and relocate it to a good spare sector (as I am sure you know).

if you force a HDD to read a bunch of sectors 20 times and a few times it gets a read error, the HDD firmware will automatically relocate the dodgy sector(s) to another part of the disk. This process is VERY SLOW as it does multiple reads and writes of the same sectors.

 

Similarly, the WD DLG probably (?) does multiple writes to ensure the FBI\CIA\Homeland Security guys cannot possibly read the data,  which is why it is taking so long (as well as having disk errors)!

In the OP's case, a single pass of writes (even using dd) would probably be quicker than WD DLG.



#10 erwan.l

erwan.l

    Platinum Member

  • Developer
  • 2838 posts
  • Location:Nantes - France
  •  
    France

Posted 20 July 2014 - 06:03 PM

A physical drive with bad sectors should be put to trash if you ask me.

I have been struggling with WD disks way too much and wont waste my time any more trying to fix/compensate these.

 

Now, may be the OP could define what he means by slow or freezes.

Issue could be elsewhere (lack of cpu, mem, virus, high defrag, bad drivers, etc) in which case wiping some or all sectors could be innapropriate.

 

/Erwan



#11 steve6375

steve6375

    Platinum Member

  • Developer
  • 7188 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films,guitars, www.easy2boot.com
  •  
    United Kingdom

Posted 20 July 2014 - 06:07 PM

I agree about putting it in the trash :thumbup:

SMART should tell the OP if the drive is really the problem or not (e.g. HDTune or similar s/w).

Of course WD's own drive diagnostic (DOS or linux based) for that drive would be best.



#12 Uneitohr

Uneitohr

    Frequent Member

  • Advanced user
  • 218 posts

Posted 21 July 2014 - 09:24 AM

I agree about putting it in the trash :thumbup:

 

I'm not using it to store important data. It just holds the operating system, which can be easily reinstalled if the drive suddenly dies.

I don't have money to buy a new one so I'm happy if it can be fixed.

 

Now, may be the OP could define what he means by slow or freezes.

 

Symptopms:

  • copying large ammounts of data to the drive freezes all my opened applications and causes huge delays to other programs that are trying to open
  • when booting, start-up programs (startup folder, registry run as) start at least after 5 minutes. Initially this was instantaneously.
  • HDTune benchmark speed varies from 1.8MB to 97MB. Massive drop downs all over the chart.

 

Issue could be elsewhere (lack of cpu, mem, virus, high defrag, bad drivers, etc) in which case wiping some or all sectors could be innapropriate.

 

I was thinking about fragmentation but as I said, I already formatted the drive and it still performs the same.

 

There is a known tool (Commercial) called HDD regenerator

 

I haven't tried HDD Regenrator but I did scan it with MHDD for bad sectors and it came out clean. No issues.

I will try your suggestion tough.

 

For the record, if the idea is to wipe a disk, good, if the idea is that writing 00's to a disk will "revive it", allow me to doubt that the idea

 

From what I know, the HDD may be magnetized. And some sectors, because of this, become unstable, ie. the reding/writing done on them are executed very very slowly. A zero-out (low level in popular terms) may help against this. I overcome this before and it worked.

Pergaps you may be able to shed some light on this problem.

 

Thanks for all your help guys.

 

Here is the benchmark taken from HDTune

http://h.dropcanvas....91/Untitled.jpg


Edited by Alexander Ceed, 21 July 2014 - 09:25 AM.


#13 erwan.l

erwan.l

    Platinum Member

  • Developer
  • 2838 posts
  • Location:Nantes - France
  •  
    France

Posted 21 July 2014 - 10:04 AM

What does the health tab say? Any bad sectors?

 

Coming back to your initial requests, zero-fill starting at different offset, the solution given by wonko here would do.

post #4 and post #6 (create 4 * 125GB partitions on your HD and zero-fill them out one after the other).



#14 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 15186 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 21 July 2014 - 10:53 AM

To clarify:
I am NOT in any way recommending the use of HDD regenerator. (simply I have never had an occasion to use it, and cannot say if what it claims - which BTW is NOT what Steve6375 thinks it does - corresponds to reality).

Any "recent" hard disk (manufactured in - say - the last 12 years or so) has internal firmware routines to mark bad sectors and remap them to spare sectors, the issue may be with slow sectors, that not necessarily are bad sectors

 

Testing with HDtune makes no sense, it is simply a benchmarking application.

 

What I would do would be:

  1. test the disk with the Original Manufacturer tools
  2. test the disk with Victoria or MHDD (or both)
  3. depending on the results, either trying to regenerate it (Victoria has also some suitable provisions) AND THEN throw it in the dustbin anyway OR throw it in the dustbin directly.

@Steve6375

You suck :w00t: :ph34r: at automotive comparisons.

 

Here is a carpenter's one ;).

Q. I am going to do the wood paneling of the living room in my new, under construction house. I cannot work more than two hours a day because I have no electricity yet and I have to do this work after my normal job and before the sunset. Can I do it little by little, in parts? And how should I proceed?

Wonko's Answer: Sure, you can do it. If I were you, I would go for horizontal courses, all around the room, starting from the bottom up, making sure to have a proper carpenter's hammer (between 250 and 300 g head, long handle) and suitable nails

Steve6375's Answer: Using an air compressor and a pneumatic nailer would be faster.

Wonko's follow up: Sure :), but will it be fast enough to do it all at once and within two hours time? :dubbio:

 

:duff:

Wonko



#15 Uneitohr

Uneitohr

    Frequent Member

  • Advanced user
  • 218 posts

Posted 21 July 2014 - 03:35 PM

test the disk with the Original Manufacturer tools

 

I did. No errors detected. But the drive is still slow, regardless of what manufacturer tools say.

 

test the disk with Victoria or MHDD (or both)

 

Did the test with MHDD and came out clean.



#16 steve6375

steve6375

    Platinum Member

  • Developer
  • 7188 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films,guitars, www.easy2boot.com
  •  
    United Kingdom

Posted 21 July 2014 - 03:38 PM

Cam you post the SMART data as returned by HDTune or some other app? This sounds very odd. If no error is reported but it is very slow, the drive must be doing multiple retries - this should show up in the SMART data.



#17 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 15186 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 21 July 2014 - 04:14 PM

Victoria (for Windows) has a feature to scan a disk and mark visually sectors in different colours based on their access times, see (example):

http://price-altai.r...21749d7c6b9.png

 

and of course it can read SMART data fine, other example:

http://s49.radikal.r...2d82341d3ba.gif

 

Now, actually interpreting SMART data is an altogether different thing, 

http://en.wikipedia.org/wiki/S.M.A.R.T.

http://en.wikipedia...._interpretation

http://knowledge.sea...US/FAQ/203971en

http://jonrosensyste...om-hard-drives/

(in practice it's a mess :frusty:)

 

:duff:

Wonko



#18 steve6375

steve6375

    Platinum Member

  • Developer
  • 7188 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films,guitars, www.easy2boot.com
  •  
    United Kingdom

Posted 21 July 2014 - 05:09 PM

FWIW: The Disk Doctor in RMPrepUSB (CTRL+D) also detects excessive access times (i.e. retries). It also reports all SMART Errors before and after the scan and Windows Event Log errors that occurred during the scan. Displaying Event Log errors is useful for detecting OS retries and determining what types of errors are being found (if any). For instance, if there is a DMA CRC error detected at the host (PC) end, then only the Windows driver will know about it (not the drive) and this is often reported in the Windows Event Log (depending on the driver and how it was coded).

 

To run it, run RMPrepUSB and type CTRL+D. Then select the hard disk drive number - it will automatically set the start sector as 0 and the end sector as the last sector. Then just hit the Green Sequential Read button. The default transfer threshold delay time between accesses is set to 10ms - you can change this to a different value or set as AUTO and it will calculate the average access time and set a threshold slightly above that.

 

The transfer time is the time between sending the Read command to the drive and receiving the data back from the drive.

 

Take care not to use the Red buttons as these write to the drive!






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users