(My experience is on NetBSD mostly, but I expect it's the same.)
When I have a disk with read errors, I do

  dd if=/dev/rwd0d of=/dev/null bs=32k

to find the bad blocks, and then use the # from /var/log/messages and:

  dd if=/dev/rwd0d of=/dev/null iseek=N count=1

and then

  dd of=/dev/rwd0d if=/dev/zero seek=N count=1

Be extra careful to always include the count=1!

This writes to the bad block, and then fsck can do whatever it can do.
It's been effective at getting machines back with fairly little damage.


The other thing you can do is to boot to single user, and then to just
mount the filesystem without fsck, and then ^D, and I think it will skip
the fsck.   For root of course "mount -u -o rw /".  Then you can edit
out fsck from the rc scripts if necessary.

Attachment: pgpjb26vJl64G.pgp
Description: PGP signature

_______________________________________________
Soekris-tech mailing list
[email protected]
http://lists.soekris.com/mailman/listinfo/soekris-tech

Reply via email to