[CentOS] newbie kernel question

Sat Apr 1 21:49:10 UTC 2006
Maciej Żenczykowski <maze at cela.pl>

That's because 98% of the time recompiling the kernel is not something you 
really want to do, and the remaining 2% of the time you just use
rpmbuild --rebuild kernel-.....src.rpm

And if that doesn't work _then_ you're out of luck (the above works for me 
with a couple different kernels).  Want to change something?  Unpack the 
srpm into the appropriate directories (just install the src.rpm) and edit 
the spec file and configuration files and or add kernel patches to the 
spec file, etc...

Of course you should do all the above as a non-root user for safeties 
sake, but that's a tad harder (need to have a good macro file - here's 
mine, although it's rather minimal and not all that good:
~/.rpmmacros:
%packager	Maciej Zenczykowski
%distribution	CentOS4
%vendor		TCS-II-UJ
%_signature	gpg
%_gpg_name	maze at tcs.ii.uj.edu.pl
%_gpg_path	~/.gnupg

%_topdir	/home/buildcentos/rpm
%_tmppath	%{_topdir}/tmp

#%_rpmtopdir	%{_topdir}/%{name}
#%_builddir	%{_rpmtopdir}/BUILD
#%_rpmdir	%{_rpmtopdir}/RPMS
#%_sourcedir	%{_rpmtopdir}/SOURCES
#%_specdir	%{_rpmtopdir}/SPECS
#%_srcrpmdir	%{_rpmtopdir}/SRPMS

%disttag	centos4
%repotag	maze

# Change default RPM query format to show ARCH
%_query_all_fmt %%{name}-%%{version}-%%{release}.%%{arch}
# %_query_all_fmt %%{epoch}:%%{name}-%%{version}-%%{release}.%%{arch}

Cheers,
MaZe.

On Sat, 1 Apr 2006, Bogdan Nicolescu wrote:

> Nick,
>
> The question of kernel compilation is a periodic
> question, and usually the answer will be anything else
> except the process itself.  I asked the same question
> just a couple of days ago. Don't bother wasting time
> waiting for an answer, and start searching the web.
> rpmbuild seems to be part of the method required for a
> custom kernel.
>
> The irony is that for a distributions which prides
> itself to be a recompilation of another distribution
> (RH) (and we're all grateful for that), the process of
> recompiling one of the integral part of the
> districtution, the kernel, is one of the best kept
> secrets.  Why can't some just give a straight answer
> or point to a page that has the answer?
>
> Anyway, I have searched, and found this guides which
> might help:
>
> http://fedora.redhat.com/docs/release-notes/fc4/errata/#sn-kernel
>
> and
>
> http://www.mjmwired.net/resources/mjm-kernel-fc4.html
>
> Didn't have the time to try it out yet myself.  Next
> week sometimes.
>
>
> --- Nick Smith <nick.smith79 at gmail.com> wrote:
>
>> Im sorry if this is a newb question, but how do you
>> recompile the
>> kernel in CentOS 4.3? I need to add reiserfs support
>> (even though the
>> setup detected it) the kernel it gave me didnt have
>> support for
>> reiserfs, and my entire fileserver is all reiserfs.
>> I tried the
>> gentoo way, which im use to and it bombed.  What do
>> i need to do? does
>> it install kernel source by default? I couldnt find
>> any good
>> documentation on the subject, and this is my first
>> RH type install.
>>
>> thanks
>>
>> Nick
>> _______________________________________________
>> CentOS mailing list
>> CentOS at centos.org
>> http://lists.centos.org/mailman/listinfo/centos
>>
>
> _______________________________________________
> CentOS mailing list
> CentOS at centos.org
> http://lists.centos.org/mailman/listinfo/centos
>