[CentOS] Source RPM

Jim Perrin jperrin at gmail.com
Fri Mar 17 12:29:30 UTC 2006


On 3/17/06, PV Juliet <pvjuliet at gmail.com> wrote:
> Hi All,
>        I am using CentOs 4.2  . I need  to change the  kernel rpm . I
> downloaded the kernel-2.6.9.EL .src.rpm. after  installing this rpm i
> changed  the linux-2.6.9.tar.gz . Bu changing the source i made the rpm. But
> gives the error . Is it anyother file also required?? . Can anyone knows how
> i can do this ?

I generally don't recommend rebuilding the kernel, but from the sounds
of things, you didn't apply the patches from the src.rpm. There are a
couple hundred of them that you should apply. The easy way to do this
is to use the rpm-build utilities to prep the source for you.

rpm -ivh kernel-2.6.9-34.src.rpm
cd $BUILDROOT/SPECS/     (wherever your buildroot is defined, don't
build as root.)
rpmbuild -bp kernel.spec --target=i686 (or x86_64)
cd ../BUILD/kernel-2.6.9/
and there's your patched default kernel set.

I've managed to cut most of the meat out of these instructions, so
some things you'll have to figure for yourself like setting up an rpm
build root etc, or wait for other people to reply with all the info,
or links to the real documentation. This should point you in the right
direction though. I'd also recommend that you take the config from
/boot/ or from the kernel source and modify it to your needs rather
than doing a completely new config on your own.

And as the last pointer, if you're doing this for XFS support, or for
added hardware support, check out the unsupported kernel in
centosplus. We already have a rebuilt kernel with support for more
things that the stock rhel rebuilt kernel.


--
"They that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety''
Benjamin Franklin 1775



More information about the CentOS mailing list