On 08/10/2017 11:06 AM, Chris Murphy wrote: > On Thu, Aug 10, 2017, 6:48 AM Robert Moskowitz <rgm at htt-consult.com> wrote: > >> >> >> On 08/09/2017 10:46 AM, Chris Murphy wrote: >>> If it's a bad sector problem, you'd write to sector 17066160 and see if >> the >>> drive complies or spits back a write error. It looks like a bad sector in >>> that the same LBA is reported each time but I've only ever seen this with >>> both a read error and a UNC error. So I'm not sure it's a bad sector. >>> >>> What is DID_BAD_TARGET? >> >> I have no experience on how to force a write to a specific sector and >> not cause other problems. I suspect that this sector is in the / >> partition: >> >> Disk /dev/sda: 240.1 GB, 240057409536 bytes, 468862128 sectors >> Units = sectors of 1 * 512 = 512 bytes >> Sector size (logical/physical): 512 bytes / 512 bytes >> I/O size (minimum/optimal): 512 bytes / 512 bytes >> Disk label type: dos >> Disk identifier: 0x0000c89d >> >> Device Boot Start End Blocks Id System >> /dev/sda1 2048 2099199 1048576 83 Linux >> /dev/sda2 2099200 4196351 1048576 82 Linux swap / >> Solaris >> /dev/sda3 4196352 468862127 232332888 83 Linux >> > > LBA 17066160 would be on sda3. > > dd if=/dev/sda skip=17066160 count=1 2>/dev/null | hexdump -C > > That'll read that sector and display hex and ascii. If you recognize the > contents, it's probably user data. Otherwise, it's file system metadata or > a system binary. > > If you get nothing but an I/O error, then it's lost so it doesn't matter > what it is, you can definitely overwrite it. > > dd if=/dev/zero of=/dev/sda seek=17066160 count=1 You really don't want to do that without first finding out what file is using that block. You will convert a detected I/O error into silent corruption of that file, and that is a much worse situation. -- Bob Nichols "NOSPAM" is really part of my email address. Do NOT delete it.