Linux - KernelThis forum is for all discussion relating to the Linux kernel.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have a project at work where I am building nfs.ko, nfs_acl.ko, sunrpc.ko and lockd.ko to insert into a pre existing kernel.
It is for a pxelinux kernel and initrd. I have 3 options, add modules to this kernel, install cli PHP on the pxe initrd that comes with the Altiris Deployment server, or start from scratch.
It was decided that adding the nfs kernel modules and deps to the pre existing kernel would be the easiest option, but I am beginning to have doubts.
doing uname -m at the console when the pxelinux image is booted yields 2.6.20.7, PREEMPT and i686, so I've downloaded that kernel, and in menuconfig, I've set smp off, preemptible kernel (low latency desktop) on, and processor family to Pentium-Pro
When my modules are compiled and I run modinfo on them, the vermagic line reads "2.6.20.7 preempt mod_unload 686", which is the same as the pre existing modules.
Now, when I do depmod -a, followed by modprobe sunrpc, (I do that first as it doesn't appear to have any deps) I get a ton of;
I am not sure I understand the situation 100% here, but it sounds like you are trying to build modules for this kernel from another source tree; which simply won't work.
Even though they are the same kernel version, the kernel won't load modules that were not built against itself. You need to build your kernel modules from the exact same kernel source as the running kernel was. If this is not possible (I.E. you only have access to a binary kernel, and not the source it was built from) then the entire kernel needs to be rebuilt and replaced. Hopefully there is a .config file for the current kernel stored along with it, to make the process a little less painful.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.