From: Adam P. <ad...@pr...> - 2014-07-21 14:38:57
|
On 21/07/2014 15:00, Rich wrote: > I'd be curious to see said method - I was considering scripting this > for both Windows and Linux (and possibly Solaris), because <s>I hate > myself</s> I find myself needing to do this on occasion... Might be easier to collaborate on IRC. I'm _aD on irc://irc.freenode.net/#smartmontools http://proactiveservices.co.uk/contib/Hard_disk_bad_sector_to_file_mapping.ods secinspect.exe: http://www.microsoft.com/en-gb/download/details.aspx?id=19470 DiskView: http://technet.microsoft.com/en-gb/sysinternals/bb896650.aspx You will need to find out the partition offset. One method is using Microsoft's free secinspect.exe Find the correct physical drive from the output, and then look for the StartingLBA number listed under the table for the Partition Table Entry. This is the "partition start offset byte" for the spreadsheet. The data here is a bit confusing but if you read through it carefully you should get an idea of which partitions are system ones and which has your data on it. Your disk may have a sector size of 512 or 4096 bytes, this should also be listed in secinspect's output as "BytesPerSector". For "file system block size" this is usually 4096 bytes by default for NTFS, but must be verified. chkdsk On the spreadsheet, "Bad LBA start" and "Number of bad LBAs" are where you enter data about the faulty sector and how many there are (sometimes disks have a block of them), you'll be then given the first and last file system block. Look for this using Sysinternals' free DiskView program. This requires some time and patience as you have to zoom in and out and use trial and error to find the correct file. This entire method is laborious and has to be followed carefully, but in my experience it has proven accurate. It has also, in every time I've used it, found that some useless file is affected :-D I have only had a chance to use this on pretty simple partition layouts etc. so it may have design flaws that I haven't uncovered. Please don't rely on it! I suppose now is as good a time as any to make this method fully scripted, easy to use, and more importantly, accurate. -- Adam Piggott, Proprietor Proactive Services (Computing) |