What is the fastest way to mark bad sectors *without data recovery*?

10

9

I have an out of warranty laptop that has an hdd with bad sectors. I say that because chkdsk /r got stuck for over 24 hours at certain %. I also left GRC's SpinRite running for 4 days. It is my understanding that these programs get stuck at certain places because they try to recover as much data as possible. I'm not interested in that. All important data have already been backed up. I'm looking for a solution where I can continue using this hdd and avoid buying a new one. I take full consequences of using a failing drive.

I'm looking for some tool that preferably non-destructively(to preserve current Windows/apps installs) would do something along the lines of:

if it can't read/write to a sector 3 times, mark it bad and move on.

I don't need programs to grind for hours/days at a time to recover as much data as possible. I'm looking for something to specifically quickly mark bad sectors.

Mxx

Posted 2013-12-29T08:13:07.373

Reputation: 2 659

Note that running SpinRite on Level 1 will not mark bad sectors. Level 1 just does a passive scan and makes NO changes to the drive. If you want to have SpinRite mark bad sectors, run it on level 2 or above. The reason Level 1 is faster is because it simply just does a read and nothing else. – None – 2014-07-25T15:18:12.187

@TechJKL running it at Level 2 would make SpinRite try to recover data/repair drive. That is something I didn't want to do. And if it got stuck for 4+ days on Level 1, Level 2+ would've taken even longer. – Mxx – 2014-07-25T18:09:53.333

If a Level 1 SpinRite scan does less than what you're asking for by only detecting bad sectors but not attempting any recovery or marking them bad, then it's very likely that doing that plus marking it bad will take at least as long. It seems like all or a good portion of your drive is shot past whatever percentage it gets to. I was in a similar boat once and my temporary fix until I was able to get a new drive was to repartition and full format the drive about up to the point where the failures started, leaving the rest unallocated, then installing the OS. I hope this helps someone. – Starson Hochschild – 2014-09-25T01:09:30.810

@StarsonHochschild your assumption that the rest of the drive was bad is incorrect. There were only 2 specific bad spots on the drive. the rest was fine. – Mxx – 2014-09-25T05:03:39.487

You can partition around the bad spots. It's not ideal, but should work giving you two or three usable partitions. – Starson Hochschild – 2014-09-25T05:10:17.837

@StarsonHochschild That's not what my question was about. – Mxx – 2014-09-25T13:11:08.233

1That's why I didn't post those as answers ;) – Starson Hochschild – 2014-09-25T13:26:35.997

I suggest you assess your power supply to make sure that it is providing clean and good power. I had a laptop that was giving me problems about the hard disk until I replaced the power supply brick. – Richard Chambers – 2017-10-04T20:54:04.213

Have you tried hiren boot cd. It has many options that can help you. – Ankur140290 – 2014-01-09T11:03:07.763

@Ankur140290 yup, it is my go-to platform. Alas it doesn't have tools for this specific task. – Mxx – 2014-01-09T15:43:19.423

When you ran SpinRite did you do it at level 1? – Scott Chamberlain – 2014-01-09T22:08:21.537

@ScottChamberlain yes, I ran it at lvl1 – Mxx – 2014-01-09T22:10:43.803

Much of this behavior is in the "smart" drive itself, and not the CPU-side software. Hence only a drive-specific utility will have any effect. – Daniel R Hicks – 2014-01-10T12:20:20.750

Answers

10

After some deep digging, Easeus Partition Manager Home Edition has a feature called Disk Surface Test, which apparently reads the blocks off a drive and spots and marks the bad sectors, and based on what I've found so far, it makes no attempt to recover those blocks. More information on this page about the software's disk surface test: http://www.partition-tool.com/easeus-partition-manager/disk-surface-test.htm and here for download link: http://www.partition-tool.com/landing/home-download.htm (big green button at bottom of page).

Specifically, it says on the disk surface test page:

When it finds bad sectors, it will mark those sectors as bad with red color so that the system knows not to use them. It may allow them to be read, in case the data stored on the bad sector is still accessible, but they cannot be written to.

so I think this may just be what you're looking for.

Caleb Xu

Posted 2013-12-29T08:13:07.373

Reputation: 1 523

This looks promising. I'll give one a try and let you know. – Mxx – 2014-01-09T05:08:22.080

3Didn't know that bad sectors can have different colors... – Thomas Weller – 2014-01-10T11:52:56.397

1Digitally speaking, colors are just bits and bytes too... – Caleb Xu – 2014-01-10T15:56:24.453

1So I finally got around to trying this app and so far results are not much different. At about the same % its scan speed also slowed down to a crawl. I left it running overnight, but in the morning I couldn't get screen to turn on, so I had to powercycle it..Don't know what state it was in at that point. – Mxx – 2014-01-15T23:06:47.207

Oh well. Good luck with your drive though! – Caleb Xu – 2014-01-16T01:08:05.860

7

Linux includes a utility to do this for these bad blocks.

/sbin/badblocks -sn -b512 /dev/sda

For maximum speed, make sure the number after -b matches your disk sector size. 512 is a safe default.

-sn means a progress meter will be displayed and a non destructive read-write test will be performed.

As every block on the disk will be read and then written to, the drive's firmware will make note of any errors and will reallocate bad sectors accordingly.

Noishe

Posted 2013-12-29T08:13:07.373

Reputation: 209

1Will it work if I point it to NTFS drive? – Mxx – 2014-01-15T23:08:56.993

1Yes, it takes advantage of the drive's firmware, and does not depend on the file system. – Noishe – 2014-01-16T23:16:13.093

4

If chkdsk /r hung for hours, then your drive is likely severely damaged.

Assuming all of your data is backed up off the drive, perform a full zero/format of the drive. This will write to every sector of the drive, thereby reallocating any already-detected bad sectors. However, I would anticipate that the zeroing operation will hang as well, as there are likely hundreds/thousands of bad sectors already, and that number will rapidly increase. Your drive is dying, and it will likely be completely dead soon. You aren't going to get much further use out of it.

Bigbio2002

Posted 2013-12-29T08:13:07.373

Reputation: 3 804

1I appreciate your attempt, but it does not answer the question at hand. – Mxx – 2014-01-09T05:04:17.207

3There's really no way to do what you're asking. A sector is marked as bad if a read attempt fails. It is reallocated when a write attempt is performed which also fails (during this process, the drive attempts to recover the data on that sector, which may cause the drive to hang. This is done at the firmware level of the drive). Assuming there was a way to force the drive to completely skip sectors after a failed read, there would be "holes" in your data, the filesystem structure would become unstable, and as I said in my answer, my money is on sudden, imminent, total failure of the drive. – Bigbio2002 – 2014-01-09T05:46:38.690

3

I'm looking for some tool that preferably non-destructively(to preserve current Windows/apps installs)

The problem is that some portion of your current Windows installation may be on those damaged sectors.

If Windows is forcing you to run CHKDSK on this during each boot, you can override that by clearing the "dirty" bit. This isn't supported by Windows (fsutil can set it but not clear it), so you will have to take the hard drive to another system and perform the steps here.

However your installation or some programs within will probably not be useable if CHKDSK /f found things to fix.

I dropped an old IDE 1GByte hard drive once. What happened after I reformatted it (not quick formatted) was that there was a big block of bad sectors in the middle of it. The space before and after was useable. So I partitioned accordingly, and was able to use the drive at a reduced capacity.

Since you backed up your important data anyway, if your first bad sector is somewhere in the middle of the drive, it may be best to reinstall Windows, and when formatting, make sure you partition just below that bad sector.

LawrenceC

Posted 2013-12-29T08:13:07.373

Reputation: 63 487

Windows is not prompting to run chkdsk on each boot and chkdsk /f finds no issues. Even if some Windows files will become damaged, as long as all bad sectors are marked, I can repair those files with install cd. – Mxx – 2014-01-09T05:05:43.133

1I know it's not what you want to hear, but in my many years of IT experience, I've learned that when sectors are starting to go, it's usually only a matter of time before the hard-drive fails entirely. I'd recommend saving yourself the annoyance of sudden failure. Get yourself a new drive A.S.A.P. and don't look back. – oKtosiTe – 2014-01-14T13:53:54.150

2

Here are some more well-known disk-repair products that you could try :

HD Tune
HDDScan
PassMark DiskCheckup

I also advice you to have a look at the SMART data of the disk, if that old disk does support it.

You are getting these errors because the disk firmware has run out of spare sectors to replace the failing ones. Each disk has normally many thousands of such spare sectors, which means that your disk is really in a very sad state.

I strongly suggest that you replace the disk. If you wish to preserve your Windows installation and applications, I suggest the following :

  1. Take an image of the disk using a disk imaging program. Put the resulting image om another disk, internal or external.
  2. Replace the failing disk with a new one (save the old one).
  3. Replace no other components than the disk, or you might have a problem with Windows activation
  4. Boot the disk imaging program and restore the image from backup.

The disk imaging product should:

  • Be able to backup only used sectors
  • Be able to ignore bad sectors
  • Be able to restore an image to a disk with a different size than the original (if this is the case)
  • Have a boot CD

Windows Backup is not recommended.

harrymc

Posted 2013-12-29T08:13:07.373

Reputation: 306 093

1I tried HDDScan. Strangely enough it does not mark bad sectors, only scans for them. – Mxx – 2014-01-09T13:53:36.557

See also this article.

– harrymc – 2014-01-09T14:29:08.353

I'm aware of and already tried DTIData Windows Surface Scanner, but again, it only scans for bad sectors, not mark them. As for the other part of the article, I'm not interested in fixing bad sectors. As I mentioned in OQ I already ran SpinRite. – Mxx – 2014-01-09T15:40:07.707

Have you run the fast or deep scan of SpinRite? – harrymc – 2014-01-09T16:29:02.423

I ran it at "level 1" which is supposed to be the fastest. – Mxx – 2014-01-09T20:20:44.977

If none of the suggested products can do what you ask, I have added above a procedure for replacing the disk which might, with a bit of chance, preserve the Windows installation and applications. Let me know if you need more info. – harrymc – 2014-01-09T20:59:37.423

I just tried Norton/Symantec Ghost. When it got to the 1st bad block I told it to skip/ignore it and all the following up ones. Unfortunately, a bit further in it errored-out completely saying can not read the drive. – Mxx – 2014-01-15T23:10:50.597

I still think that a new disk is the only way to save the installation, if the current disk is not too far gone. – harrymc – 2014-01-16T06:46:26.073

1

As someone pointed out, the HDD firmware will relocate sectors that go bad to a section of the cyclinder or sector especially left unused for this purpose. Once that sector is used up, it will go to the next, and so on. By the time you get to the point where any OS can detect a problem, a lot of sectors have been relocated. This may also have the side-effect of making defragmation nearly impossible. The drive is not only having to try to read the bad sectors, but then follow the chain of relocations. I can't imagine this being anything but slooooow. Not only are you risking immanent demise of the overworked disk, you are making the slowest part of your system even slower.

Engineer

Posted 2013-12-29T08:13:07.373

Reputation: 221

0

I choose a developer's way. I coded a little console utility which fills available space with files and then reads them. If the file was read successfully then we can delete it. And if not... we hit the bad block, just leave that file in the bad block placeholders folder forever. Cons: it'll test free space only.

The source code is available at github

sibvic

Posted 2013-12-29T08:13:07.373

Reputation: 101

0

An alternative to marking clusters as bad is marking entire ranges of sectors as bad, by partitioning the disk. I have found a program that is specifically made for that purpose: Repartition Bad Drive (from Abstradrome), http://www.dposoft.net/rbd.html.

This program is scanning a defective hard disk in a few hours (much faster than the Easeus Partition Manager's Disk Surface Test, which can take days or even weeks to scan a defective drive). If you get too many partitions (I got 33), you can adjust the minimum size of the partition (at the cost of using less of the disk capacity).

Razvan Socol

Posted 2013-12-29T08:13:07.373

Reputation: 101