Installing and administering drivers under Linux is definitely a big obstacle for most beginners, especially if you are used to Windows's easy of installation. Installing network or graphic adapter drivers under Windows is really just a clickedi-click, very rarely do you have to configure drivers with the registry. Now forget all this when you deal with Linux, here we have a different concept.
Originally Unix had all its drivers embedded (included) in the Kernel. This can of course be quite inefficient and inflexible; you would need a new kernel every time you install a hardware device whose driver is not included in the kernel. This is why most Unix systems now support modules, drivers that are loaded on demand. So the driver is either contained in the kernel or as a module.
Let's look at a very simple example, a 3com 3c509 network card. You have two choices to support this NIC in your Linux installation: Either its driver is included in your kernel (usually not the case by default) or it is available as a module. What is the difference and what is better? If we look at the difference we will see why one is better than the other for a particular situation.
Obviously you need to compile the kernel add a kernel level driver. But that also means that this driver is pretty much always loaded, no matter if our NIC is present or not. If you exchange the NIC you will have to recompile the kernel again, to remove the old driver and add support for the new one. I personally use kernel drivers since I don't change hardware very often and since new kernels come out all the time anyway a change of hardware at least gives me an opportunity to compile a new kernel.
Modules. First you don't need to compile the complete kernel to add module support for the NIC. If the module is not already present (check
) you will only have to compile the module, which takes significantly less time than compiling the kernel a reboot is not required either. The good thing about modules is that they are only loaded when they are really required. If the system doesn't find a 3c509 then it won't load the module. The kernel stays small and the module is untouched.
So how do you compile a module? It's easier than you might think. When you configure your kernel with either "make menuconfig" or "make xconfig" then you have the option (for most drivers) to include it in the kernel or compile it as a module (M). Then you simply run
and the module(s) should be in their respective location.