Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
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 need to build and load certain network hardware modules/drivers into a linux kernel. I have an amd_x86_64 machine running 2.4.21-141smp kernel on a Suse 9.0 dist. The problem is that the kernel patches for the network modules were written for a 2.4.21-256 kernel tree.
I attempted to download a 2.4.19-256 kernel source tree rpm from SuSE, but the rpm complained about the other installed kernel source. I finally forced it, but several directories appeared not to install correctly.
So perhaps there are kernel hackers that know immediately why I am having trouble. If so, your advise is much appreciated.
Oh yes, I have downloaded the correct x86_amd64 (opteron) kernel source from the SuSE ftp site.
My questions are: Can you have several kernel source trees installed at the same time? What exactly is the /usr/src/linux directory for (as opposed to the full source tree /usr/src/linux-2.4.19)?
Ok, I have had three kernels installed on a machine at one time, a standard and two custom, I would imagine that you could have up to 4 or 5, so yes is the answer. The "/usr/src/linux" directory is usually a link to the source directory "/usr/src/linux-2.4.x". On a machine with more that 2 kernel sources the link "/usr/src/linux" usually points to the primary kernel, easy to access. Some distro's like Red Hat, make the kernel source available in a binary rpm file, during the execution of the rpm, installation scripts create the source directory and link it to "/usr/src/linux-2.4" rather than "/usr/src/linux".
The new source tree is not installing correctly from the rpm. I wish there was simply a tarball of the source tree. When I issue the following command:
rpm -ivh source-2.4.19.rpm
...it complains that there is a newer version already installed (and in fact, there is... 2.4.21). So I issue the following:
rpm -ivh source-2.4.19.rpm --force
Now it "almost" installs but fails with an error about /usr/src/linux/asm being a directory. (this occurs during what appears to be an archive unpack). There are missing direcoties now and empty directories where source should be located.
Ok, you could alternativley get the source from kernel.org, manually unpack the archive and configure it. I will take you trough the steps if you want. Try to avoid using the force options with rpm, I once killed a server with it, it took my whole lunch break to sort it out!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.