Bad sectors on harddisk (question)

William Park opengeometry-FFYn/CNdgSA at public.gmane.org
Fri Oct 17 22:35:07 UTC 2003


On Fri, Oct 17, 2003 at 06:15:27PM -0400, James Knott wrote:
> >How do you recover a file which contains a bad sector?
> >
> >I haven't been doing backups as frequently as I used to.  And, there is
> >a file that has 1 month of new data. :-/  I can un-delete a file using
> >'debugfs'.  But, I haven't come across any utility which will go to work
> >on a file with a bad sector.  Even partial recovery would be fine.
> >
> 
> I guess you missed that TLUG meeting a couple of months back, about the 
> data recovery service.  One point they made, was that they make an image 
> of the drive and work with that, so they won't risk damaging it.

I've missed that one.  In any case, as last resort, I did
    badblock -b 4096 -o bad -n /dev/hdb1
    e2fsck -b 4096000 -l bad -cv /dev/hdb1
where 4096000 is the last superblock of partition.

The file seems to be recovered.  It diff's correctly with the old backed
up file, and it has correct number of lines since last backup.  I have
no idea why using different superblock would make difference.

-- 
William Park, Open Geometry Consulting, <opengeometry-FFYn/CNdgSA at public.gmane.org>
Linux solution for data management and processing. 
--
The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml





More information about the Legacy mailing list