First up, I needed kernel-devel and kernel-headers packages to compile kernel modules, which I (think I) chose while installing Fedora Core 8 on my machine.
I downloaded the source-code of the kernel module and tried to make it.
Error: /lib/modules/2.6.23.1-42.fc8/build -- no such file or directory.Turns out that build is a soft link to one of the directories that came while installing kernel-devel pacakge: /usr/src/kernels/2.6.23.1-42.fc8-i586. But, as a result of FC8 installation, my /usr/src/kernels/ directory had fc8-i686. So I guessed that build is pointing to the wrong place and promptly soft-linked it to the i686 directory. make and make install went on fine but then when I tried to insmod the module, I got the "Invalid module format" error.
In the end, the solution lied in realizing that build was pointing to the correct place and I had the wrong kernel-devel installed to begin with. Was this a problem with FC8 installation? I don't know. The following worked for me:
yum remove kernel-develSomewhere in the process I had removed my kernel-headers, which had removed gcc as well. Fixing that was simple:
yum install kernel-devel.i586
yum install kernel-headersThis summarizes three days of head-scratching.
yum install gcc

