Solved Weird disk errors in /usr/bin causes system to be unusable.

This is a really weird problem that I have never seen before. It first started this morning when I turned the system on. Then I found that I could not log in. I was getting this error:
Code:
/usr/bin/login: Permission Denied

So I tried logging into the console as root, same error. I rebooted the machine to single user mode and ran fsck with the journal and no problems found. I ran fsck again without the journal on my /usr partition and it found a whole bunch of errors. It all seemed to be centered on corrupted i-nodes. When it went into the file tree, everything was centered on /usr/bin. When all was said and done, a number of programs from /usr/bin went missing. I was able to copy a number of programs from the make buildworld obj directory so that I could get make installworld to run to restore the system.

Some of the errors that fsck encountered were:

partially allocated inode
invalid link count
unexpected soft-updates inconsistency

After the run, it told me that the filesystem was marked dirty and to run fsck again. I have never seen that before either.

The system is running fine now, but I am wondering what caused the problem in the first place and how to prevent it in the future?
 
Sounds like a consistent corruption of the filesystem; I' ve experienced the need to re-run fsck only on dirty shutdown while there were writing operations pending. Regarding the soft-update inconsistency, some time ago I experienced it too, and was unable to solve it. Since then I didnt use soft-update anymore; I'll investigate gjournal as Wozzeck.Live suggested. Until then, my partitions will be mounted syncronously. ;)
 
After much work and fiddling, I have discovered that the cause of the problem is hardware related. Specifically the cable between the motherboard and the harddisk. When I ran the surface scan, I kept getting timeout errors on the commands. I took the covers of the machine off and reseated the cable...multiple times to clear the oxidation off the metal. It's working fine now. After manually replacing some of the missing files in /usr/bin, I was able to do a make installworld to restore the system.
 
Back
Top