[Techtalk] Cooking Kernels--?s Lead to Answers and More ?s

Conor Daly conor.daly at oceanfree.net
Sun Sep 22 17:51:22 EST 2002


On Sun, Sep 22, 2002 at 12:07:18PM -0400 or so it is rumoured hereabouts, 
Beth Johnson thought:
> So, what is being said is that when one installs a system from a disk,
> say the Red Hat 7.3 disks, then the kernel that is installed is a very
> generic kernel (which is why you can just update with the stock distro
> releases) and that any config* file that I find in my /boot directory is
> something I can use to roll my own.  How does this configuration differ
> from what would come up if I just do a "make xconfig"?  Or doesn't it
> until I actually do my first custom kernel?  I feel I'm teetering here
> on the brink of enlightenment.  How does the new kernel I update with
> when I download one from Red Hat know that I need X driver for my
> network card or Y for my sound, since it obviously doesn't take the
> "shotgun" approach and have everything compiled as modules)?  Do I sound
> like a kid asking science questions yet?  %-}  Does it all work for me
> because I happen to have fairly standard hardware and everything I need
> is either compiled into the kernel or as modules by default?  %-}
 
Two little somethings I came up with while looking around my fs:

1. /lib/modules/2.4.7-10     is 23.0Mb  # Stock RH kernel
   /lib/modules/2.4.7-10-amd is  1.9Mb  # My custom kernel

The stock RH kernels _appear_ to come with all[0] the modules so it works
with most hardware.  The entries in /etc/modules.conf are what decide
which modules actually get loaded.  That allows you to have loads of
unused modules sitting on your disk without using resources and allows
generic kernels to be distributed that Just Work(tm).

2.  /usr/src/linux-2.4.7-10 contains:

config-2.4.7-10-valkerie        kernel-2.4.7-i586.config
kernel-2.4.7-athlon.config      kernel-2.4.7-i586-smp.config
kernel-2.4.7-athlon-smp.config  kernel-2.4.7-i686.config
kernel-2.4.7-i386-BOOT.config   kernel-2.4.7-i686-debug.config
kernel-2.4.7-i386.config        kernel-2.4.7-i686-enterprise.config
kernel-2.4.7-i386-smp.config    kernel-2.4.7-i686-smp.config

of these, I think only config-2.4.7-10-valkerie is one of my own.  the
rest (Omigod, you wouldn't *believe* how hard it is to type when your
2-year old is grabbing your hand to place it on the mouse and yelling
"Click Around!"") appear to have come with the kernel sources (rpm)
install.  On that basis, a "uname -a" will tell you which config file to
use.  Copy that to /usr/src/linux-<version>/.config and do the make
xconfig

> Also, what was unsaid, that I really do need to know a lot about what I
> am doing or I could leave out important stuff (but that's not likely if
> I don't uncheck anything) or have too much stuff that I'm never going to
> use (which is more likely).
 
The "help" buttons you'll see for nearly every choice can be pretty
informative.  They mostly have an "if you are unsure choose..." entry to
help you along.  And, of course, keep a working kernel in /boot just in
case...

> So I copy config-2.4.18-10 to .config in the source directory.
> If I'm using xconfig does the option to Load Configuration From File do
> the same as "make oldconfig" as Malcolm mentioned?

I reckon so...
 
Conor
-- 
Conor Daly <conor.daly at oceanfree.net>

Domestic Sysadmin :-)
---------------------
Faenor.cod.ie
  5:26pm  up 22 days, 21:54,  0 users,  load average: 0.08, 0.07, 0.03
Hobbiton.cod.ie
  5:23pm  up 22 days, 21:32,  2 users,  load average: 0.13, 0.14, 0.05



More information about the Techtalk mailing list