Re: how to fix a nackered system by fixing every installed rpm ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Mikkel L. Ellertson wrote:
David Timms wrote:
...
You are probably better off backing up your good config and data
files, wiping the drive, and doing a fresh install. Treat the system
the same way you would a cracked system. With file corruption as bad
as you indicate, you are better off assuming that all files are
damaged until you check them. Running rpm -Va is not going to catch
everything. It can only check the files in the RPM database. Any
custom configuration files will fail the test. User files, and
generated files like menu's and passwords are not checked.
Yeah, it's more of a OK, if this happened on my main machine - would / could it be recovered in a reasonable time ?/? I do expect to have to do a full format/reinstall.

You may want to look at using kickstart to make the install easier -
you can generate the kickstart file on the machine you coppied the
RPM database from.
Yeah, the other machine left a ks.cfg that I could use - thanks for the idea. Actually I think I saved a rpm -qa|sort recently. haven't found it amongst the lost+found yet.

On another note, I am not sure what you were trying to do with the
--rebuild option, but I suspect that it does not do what you think
it does. It will not fix the RPM database or the installed files.
The --rebuilddb will sometimes repair a corrupted RPM database, but
also does not fix the installed files.
Attempted rpm commands where having an error with one of the files /var/lib/rpm -this suggested a corrupted file. I understood the command {as corrected by yourself} would attempt to repair the rpmdb. I'll read more about that when I get a moment.

If you are are going to try and fix it instead of doing a new
install, you may want to try running something like: (NOT tested!)

for i in $(rpm -qa) ; do
  echo Trying to fix $i.
  rpm -i --quiet --oldpackage $i >> /tmp/fix.log
done

If you run this in the directory with all the RPMs in it, it will
attempt to re-install all the installed RPMs. But it will generate
an error if there is a newer package installed then is in the
directory,
So if I change it to -Uvh, then I think it wont try to install a second parallel version, but rather change the version to the one in the folder. Also, where the package is already installed according to the rpmdb {broken} wouldn't --force {--oldpackage --replacefiles} be better ?

or if the package is not in the directory. It will
probably generate some .rpmnew and/or .rpmsave files where you have
change the config files.
I can get the machine to do the work for me. I'll find them with updatedb folowed by locate *.rpmnew and locate *.rpmsave

Thanks for your tips, I'll give that a try {I'll limit it {eg: rpm -qa a\*} to test}.

DaveT.


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux