Click to See Complete Forum and Search --> : Compiling Linux Kernel


LordMorlock
11-09-2000, 10:17 AM
When compiling the linux kernel (using RedHat 6.1), I get a whole lot of "unresolved symbol(s)" errors. This also occurs now that I have gone back to the original kernel. The following is an example:
/lib/modules/2.2.12-20/net/82596.o: unresolved symbol(s)
/lib/modules/2.2.12-20/ipv4/ipip.o: unresolved symbol(s)
/lib/modules/2.2.12-20/misc/ipx.o: unresolved symbol(s)
I get at LEAST 40 of these messages each time the computer boots into linux. The system works fine however (networking, shared internet etc.) and does not appear to be hindered by this. Could someone please explain to me the reason for this as I have no idea.

LordMorlock

furrycat
11-09-2000, 09:47 PM
Those are unresolved symbols in your modules. Every time you build a new kernel certain hooks are enabled to allow the modules that you chose to work. Now there's a handy tool called modprobe which "knows" which modules depend on which other modules and on which kernel hooks. modprobe allows you to say "modprobe ppp" instead of "insmod slhc; insmod ppp". And how does modprobe "know" about these dependencies? Through depmod. depmod works these dependencies out and is run at startup.
What's happening is that depmod is running and spotting a whole load of modules for which there are no hooks in the kernel. The reason for this is that when you installed Red Hat for the first time it copied its default kernel and virtually every module available on to your drive. It needs to do this because the installer doesn't know what hardware you've got so it has to try a whole load of modules.
When you built your new kernel you stripped out the modules you don't want but they're still lying around in the filesystem.

Soo, to fix this, do "rm -r /lib/modules/$(uname -r)" to remove the modules that you've already got and then run "make modules_install" in /usr/src/linux. Then run "depmod -a" yourself - it should work silently.