NTFS cloning
Sometimes drives just go bad. Surprise. One recent fresh install of Windows XP had started having real stability problems. On running a chkdsk and looking at the event viewer, it was fairly clear that 16KB of bad sectors and the disk problems had likely been the problem (lots of disk and atapi errors in the system log. Mostly disk error during paging operation (swap filing)) So…. I looked at cloning the drive using dd_rescue. All went well and the new system booted up on the new identically sized drive. In fact EVERYTHING was fine except chkdsk still reported 16KB of bat sectors….
You see that’s the drawback of a cloning of a disk (or any bit by bit image) you copy the drives information about what’s bad along with the good data. It appears that there is no way withing Windows XP to get chkdsk to re-evaluate an ntfs for bad sectors – once it declares one bad – you’re stuck. However, there are some linux based tools that might help with that.
I found a good guide on ntfsresize for this purpose at bodden.de. It walked through patching the source code of ntfsresize and using that to reset the bad sector count in ntfs – unfortunately, in my case that didn’t work exactly as described and the system STILL counted 16KB of bad sectors. I tried other disc scanning tools just to make sure (spinrite 6 – which doesn’t care what OS is on the disc.) All looked healthy.
So, next I tried cloning the ntfs partition another way…. ntfsclone. I thought MAYBE that would reset the bad sector count. it didn’t nor did the subsequent ntfsresize operation. In fact, in this case I didn’t find a way to re-set the list of bad sectors, so they’ll remain unused. It’s really a superficial issue, but might lead someone to draw the wrong conclusion about the drive.
I also should note that I found a good forum thread suggesting that ntfsclone should be tried first on a failing drive because dd_rescue is too hard on the drive and might push it over the brink.