"Kevin Lombardo" <kevin.lombardo at gmail.com>  wrote:
> 1. Is there a way to tell which device drivers have been compiled in
> to a pre-built kernel?

The config file used to build the kernel is always found as
/boot/config-`uname -r`. (The `uname -r` replaces the output of your
current kernel release into the command line.  This is a form of input
substitution.)  Some kernels are compiled with the config being found
in the /proc filesystem (I believe it is /proc/sys/kernel/config, or
some such.)  I do not know if the Etch kernels do this or not.  In any
case, the only easy way of finding out what is compiled in, and what
isn't is by looking at that file.  You could do some detective work
and guess based on what you see in dmesg and what you don't see in
/lib/modules/`uname -r`.

> 2. I see a file called /etc/modules, and there are 4 entries in it:
> 
> ide-cd
> ide-disk
> ide-generic
> psmouse
> 
> Are these simply modular drivers? And are they in this file because
> the kernel *always* loads them, rather than relying on any kind of
> autodetect?

Yes, the kernel always loads the modules found in this file.  Some
auto-detection can happen, but some does not.  If you find a module
doesn't load when you need it, then it might be a good idea to stick
it in this file.

> 3. How does the kernel know which other drivers to load? Is it just
> autodetect or is there a configuration file?

In new kernels, udev and in older kernels, hotplug.  These event
watchers can notify scripts, which load drivers.

> 4. If I have a modular driver for an ide disk, and then try booting
> a kernel with an ide driver compiled with it, which driver will be
> used, the compiled in or the modular?

This is what the initrd stuff is all about, initial ram disk.  You
most likely have the package like yaird, initramfs-tools, and mkinitrd
installed.  These are usually called automatically by your kernel
package when it is installed to build a new initrd file in /boot.
This file contains a copy of all the scripts and modules you need in
order to boot your system and mount the root filesystem.  If you need
a modular kernel driver, then list it in /etc/modules and reconfigure
your kernel package or run the tools manually.  For example:

  # apt-get install --reinstall linux-image-`uname -r`

Have fun!
-- 
Chad Walstrom <chewie at wookimus.net>           http://www.wookimus.net/
           assert(expired(knowledge)); /* core dump */