![](https://seccdn.libravatar.org/avatar/dab02cae87abf46b209a43bbf8e733c0.jpg?s=120&d=mm&r=g)
I've come across a problem while helping out a customer. I'm trying to recover most of a vital email file from an IBM Travelstar that's broken. It's reporting "sector not found" just over 100Mb into the file. The plan was to read all the accessible sectors and write them out to a new disk. I have a C program that will do this, using lseek() and read() to get each block in turn, skipping the blocks that return an error. The trouble is, the kernel never returns when it hits the bad sector. The machine's not in front of me at present, but what I'm seeing in /var/log/messages is four or five times it logs the "sector not found", then it resets the drive, then it tries again. Because it's stuck in the kernel I can't kill the calling process even with -9. It's not just my program, because it does the same when using the cp command. 1. Is this a bug in ntfs support? 2. Whether it is or not, is there anything I can tweak to make the kernel return an error to the calling program instead of looping for ever when it hits the bad sector? Thanks in advance for any help. -- Peter Davey psvdavey.nospam@tiscali.co.uk (really)