On Wed, Jun 30, 2010 at 11:23 PM, David Leeming
<david at leeming-consulting.com> wrote:
> I can see a lot of occurrences of "bad owner name" and "zone rejected" in
> the messages log which may be related.
>> My aim is only to recover the server back to default condition. Is it
> possible to copy over the config files (with appropriate changes if needed)
> from another server installation that is running in the default state? If so
> which ones?
Yes...
There are a couple different ways. Copy from a reference machine
that was recently installed is the easy way.
rpm packages also let you do this. There are two (or more)
ways and depending on the package structure one
may prove better than another.
After copying flies from a reference machine the
next easy to understand way to extract files is
to use an alternate root. Something like:
$ cd /tmp
$ mkdir tinkerroot
# rpm --nodeps -Uvh --root /tmp/tinkerroot/ firefox-3.0.2-1.fc9.i386.rpm
warning: firefox-3.0.2-1.fc9.i386.rpm: Header V3 DSA/SHA1 Signature,
key ID 6df2196f: NOKEY
Preparing... ########################################### [100%]
1:firefox ########################################### [100%]
Then look in /tmp/tinkerroot for the file. Ther is a full
set of the files and necessary directories.
As for packages you can mount the iso image.
The Packages dir is full of rpms.
# pwd
/tmp/A/Packages
# history | grep mount | tail -2
1018 mount -o loop OLPC_XS_LATEST.iso /tmp/A
1027 history | grep mount | tail -2
=====
To find out what file belongs to what package you
can use rpm. We are looking at "config" files for a reason...
$ rpm -qf /etc/host.conf
setup-2.8.20-1.fc13.noarch
The -c flag lets you see the config files known to rpm.
$ rpm -q -c setup-2.8.20-1.fc13.noarch | grep host
/etc/host.conf
/etc/hosts
/etc/hosts.allow
/etc/hosts.deny
The verify flag lets you see which config (c) files have been changed...
$ rpm -qV setup-2.8.20-1.fc13.noarch
S.5....T. c /etc/aliases
.M....... c /etc/gshadow
S.5....T. c /etc/hosts.deny
..?...... c /etc/securetty
.M....... c /etc/shadow
Config files are important because when a package
is removed, upgraded or reinstalled a config file is not lost
it is saved can show up with a .rpmnew or .rpmsave suffix.
Two examples might be.
named.conf.rpmnew
named.conf.rpmsave
This can set the stage for a lot of important transitions
as XS packages are updated...
Another good to learn tool is yum.
a "yum reinstall" can clean up some
things quick and easy... look for the .rpmnew and .rpmsave
files.
--
T o m M i t c h e l l
mitch-at-niftyegg-dot-com