[lug] dumpdates

John Karns jkarns at csd.net
Sat Aug 12 20:43:13 MDT 2000

On 11 Aug 2000, Chris Riddoch was reputed to have said:

CR >Sean Reifschneider <jafo at tummy.com> writes:

CR >> >and suspect it *could* do something bad if you didn't do it right,
CR >> >make a copy of it.
CR >> 
CR >> In general good advice, except if you're on a redhat machine and you're
CR >> working in /etc/sysconfig/network-scripts on the "ifcfg-eth0" script,
CR >> rename it to "old.ifcfg-eth0".  The boot scripts look for any file
CR >> starting with ifcfg- and try to bring up the interface.  This can
CR >> cause lots of problems if you name the script "ifcfg-eth0.old".
CR >
CR >That's a really good point, I hadn't thought of that.  Debian does
CR >things a little differently, and I haven't run into that sort of
CR >problem yet.  A little CVS work would be a nice way to be able to back
CR >out of changes.  It could be useful in many cases, but it wouldn't be
CR >very practical to squeeze versioning systems onto the already packed
CR >rescue floppies, and wrapper scripts around vi might have problems of
CR >their own (temp files and such).
CR >
CR >Perhaps someone could suggest something simple that would make it a
CR >little easier for newbies to revert changes in /etc, if such a beast
CR >exists?  I mean, besides the obvious "Don't do that" or "Reinstall",
CR >which aren't very good answers to a two-line change in a config file.

Well, usually just making a copy of the file with a different name in the
same directory suffices.  But in a case as Sean mentions above, either use
a name that won't create problems as he suggests or create a subdir e.g.,
/etc/save, and copy the file(s) there.  Another alternative might be to
create a compressed tar of the directory; e.g.,

tar chf - dirToTar | gzip -f9 > dirToTar.tgz

Of course there are lots of variations to the choose from for the above
command line.  The one here is taken from the Midnight Commander, aka 'mc'
(which I tend to rely upon to do such tasks) user menu (F2) to create a
compressed tar of the current subdir.  

Aside:  Just my opinion, but I think mc is great tool especially for
newbies, in that it provides an easy way to navigate the filesystem and
provides a graphic (not to say GUI) representation of the filesystem
layout which helps to familiarize one - not to mention easy manipulation
of tar, rpm, compressed tar, and gzip'ed files.

One more point while I'm at it - as I believe was also mentioned here a
while back - a simple boot disk such as is written during installation of
a typical Linux distro such as Red Hat usually won't go too far to help
fix a hosed system configuration or filesystem, except in a case where
your problem is confined to the kernel residing in your hard disk.  For
other cases you should use a rescue boot disk.  This would have a
self-contained root file system so that you wouldn't rely on your
installed filesystem to successfully boot the system.  For this you could
create the floppy from an image (if provided) on the installation CD's,
search the 'net for a floppy-based mini-distro (can't seem to remember any
names at the moment, but there are at least two or three) or at least with
SuSE, boot directly from the 1st installation CD and choose "rescue
system" from the menu.

John Karns                                              jkarns at csd.net
Bogota, Colombia                                  Voice: 57-1-341-0300

More information about the LUG mailing list