[K12OSN] xserver error

Eric Harrison eharrison at mail.mesd.k12.or.us
Tue Dec 7 06:18:59 UTC 2004


On Mon, 6 Dec 2004 bear2bar at netscape.net wrote:

> The odd part was that it worked the first time I started the server 
> and booted the WSs, then when the WS were restarted this message came
> on. Also the stations that booted the first time are still working,
> only the ones that were restarted ????
> Should that fail can the "Xserver " be reloaded, rebuilt ?
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Here's a thirty-second introduction to RPM package management ;-)

When an RPM package is installed, a whole bunch of information
about it is stored in a database. You can later query the rpm
database to learn what has changes since the packages were 
installed.

If you want to verify ALL the files on the server, you can run
this command (it'll take a while to run):

 	rpm -Va > /root/rpm-verify

Once it is done, take a look at /root/rpm-verify, it will tell
you every single file that has been changed, and the general
nature of that change (i.e. the permissions are different, the
time stamp has changes, the file has been modified in some fashion,
the file is *missing*, etc).

You can verify specificy packages by running "rpm -V package_name"
This is useful for narrowing it down to just LTSP packages, for
example (here's a neat trick:  rpm -V `rpm -qa | grep -i ltsp` )

The output will contain a line for every file that has changed,
for example:

 	S.5....T  c /etc/aliases

See the rpm manpage for the full details, but here is the key
to the flags that preceed the file name:

        S file Size differs
        M Mode differs (includes permissions and file type)
        5 MD5 sum differs
        D Device major/minor number mismatch
        L readLink(2) path mismatch
        U User ownership differs
        G Group ownership differs
        T mTime differs

So this file is a different size (S), the MD5 differs (5), and 
the modify time differs (T).

The "c" means it is a configuration file, so it is not suprising
that it has been changed. There is also a "d" flag which means
it is a documentation file.


Once you have found a file that may be corrupt, a config file
that should not have been changed, etc, you can find what package
it belongs to by running "rpm -qf <filename>". Using the example
above:

 	$ rpm -qf /etc/aliases
 	setup-2.5.36-1

So I now know that file is in the setup RPM. I could grab a
pristine copy of the RPM file off my CD or a mirror and 
reinstall it (after backing up all the files in that package
that had been changed, of course!) using rpm:

 	rpm -Uhv --oldpackage packagename.rpm

The "--oldpackage" switch will tell RPM to install the package,
even if it is already installed, overwritting the old one.
It will tell you if a config file was replaced (the old one
will be named filename.rpmsave) or if a config file was
retained (the new one will be named filename.rpmnew). You can
copy "filename.rpmsave" back to "filename" to use the old
file, or copy "filename.rpmnew" to "filename" to use the new.
Either way, you have a backup of the originals, right? ;-)

Okay, that took more than thirty-seconds to type!  But it 
covers the basics of figuring out has changed, which will
hopefully give you a hint at what needs to be fixed. If 
you can't figure out how to fix it, at least you can get it
back to the original state by re-installing the package.

-Eric




More information about the K12OSN mailing list