[lug] Determining Kernel Config
Jeff Schroeder
jeff at neobox.net
Wed Aug 25 13:18:02 MDT 2004
Fred wrote:
> I'm working with a Red Hat implementation, kernel version 2.4.21-15.
> I need to build another box that is identical to this one. Can I
> copy the running kernel to use in the new box I'm building?
In theory you could, but there's more than just the kernel itself
(probably in /boot). There are probably hundreds of modules
(/lib/modules) as well as hundreds of header files (/usr/include).
Better to install the kernel via RPM or some other package management
tool.
Alternately, you could build the kernel yourself to make sure it's got
the same settings. To see the actual configuration used to compile
your kernel, you can use
# gzip -c /proc/config.gz
Assuming your kernel was compiled with support for it. Dump that into
the .config file in the kernel source tree and build it.
> is there a way to know what packages/RPM's are installed so they may
> be installed when I build a new machine?
It's been a while since I used RPM, but I believe this will do it:
# rpm -qa
(-q is "query", and -a is "all")
> Can somebody give me some
> guidance on the best approach to "clone" the machine I'm working on
> to new newly built machine?
Unfortunately it's seldom as easy as it might seem. The biggest step is
installing the same packages, and it sounds like you're on that road
already. But there are configuration files peppered throughout the
system that you'll need to duplicate. Of course, if you haven't made a
lot of customization to the setup, it shouldn't be too bad. It's just
hard sometimes to find all the files.
A good place to start is /etc, which is where much of the system
configuration files live. Also look in /usr/local for the "etc" and
"share" directories. The /var directory tends to have stuff as well.
HTH,
Jeff
More information about the LUG
mailing list