TESTED ON COL 2.2/3
"How to Fix Damaged or Missing Files"
1) Boot into single user mode at the LILO prompt with:
2) Rebuild the rpm database with:
> rpm --rebuilddb This may take a minute or two.
3) Verify the status of all RPM based packages on the system, and send its output to a file with:
> rpm -Va --root / > rpmout.txt
This will take several minutes (possibly 10 or more on a slow system). Also bear in mind that all of the output will be directed to the file rpmout.txt in this case, which will exist in whichever working directory you run the command from. The name of the file is irrelevant, and the file does NOT have to exist prior to running this command.
4) Open up rpmout.txt in your text editor of choice. There will most likely be anywhere from several hundred to several thousand lines, each representing the status of a file on your system. The key files are the ones that have "missing" in the left most column. Those are the files that are not on your system, even though the RPM package that held the file is currently installed. To track down which RPM is needed to get that file installed back on the system issue this command:
>rpm -qf /full/path/to/file/here
This will return the RPM package name and version for the missing file.
5) To reinstall that file, you will need to perform a forced, no dependencies, installation of the RPM that contains the file. Do this with:
> rpm -ivh --force --nodeps full.package.file.name.here.i386.rpm
If the command finishes without any errors, then the missing file should now be reinstalled on the system.
Repeat steps 2 through 5 in order, over and over, until
there are no more files listed in rpmout.txt with a
status of "missing".