building a kernel from src.rpm

mccrack

Expert Member
Joined
Apr 8, 2005
Messages
2,485
Hi fellow forumites,

I havent come across this issue before, but am hoping some of the more experienced nix admins might be able to advise further.

I have a centos 5.4 server connected to a DSL line. Unfortunately the current kernel (2.6.18) suffers from a PPP bug that causes the server to lock up, this was fixed in kernel 2.6.24 however Centos is locked at 2.6.18-194.

I've been told that I can use a a kernel from Fedora as they're both based on Redhat.
More specifically, i've been requested to install from src.rpm and not build a vanilla kernel from source (kernel.org) (which i am far more comfortable with).

I've found the Fedora src.rpm kernel here: http://download.fedora.redhat.com/pub/fedora/linux/releases/12/Everything/source/SRPMS/ but I am unsure of how to install it from a src.rpm? Any advice? the online guides I have found have not been too clear.

tx
 

koffiejunkie

Executive Member
Joined
Aug 23, 2004
Messages
9,588
I have not tried to rebuild a fedora kernel on RHEL or CentOS before, but the usual routine is to install the src.rpm:

Code:
rpm -ivh kernel-blah.src.rpm

and then build it (I'm guestimating the paths/names, since I don't have an RHEL box handy):

Code:
cd /usr/src/redhat/SPECS
rpmbuild -bb kernel.spec

That will most likely fail with a long list of dependencies. Install what's missing, and repeat the above. If you encounter dependencies that isn't in CentOS repositories, it may be that they're named differently, or simply that the spec file specifically mentiones newer versions - read through it and modify if necessary.
 

mccrack

Expert Member
Joined
Apr 8, 2005
Messages
2,485
Thanks koffiejunkie!

Works a treat so far ... testing it in a VM and the dependancies via yum over a 384K line is gonna take a while still. I'll read up further in the mean time @ which point to copy the existing kernel's .config file.
 
Top