[CentOS] kernel recompile help
Ryan
ryanag at zoominternet.net
Wed Nov 9 23:36:28 UTC 2005
Jim Perrin wrote:
>
>>>Now that I've given you the warning, the how-to I'd recommend reading
>>>is here -> http://crab-lab.zool.ohiou.edu/kevin/kernel-compilation-tutorial-en/
>>
>>Great link. Thanks.
>
>
> No problem. Hope it works out okay for you. If you have any issues
> with the instructions I'd like to know about them if you're willing to
> share.
>
Ok get ready for some weirdness...
The CentOS kernel src RPM puts the source in:
/usr/src/redhat/BUILD/kernel-2.6.9/linux-2.6.9/
I didn't really want to install this kernel as an RPM, so the below
steps do not result in a kernel RPM, just a new kernel.
To recompile kernel:
[optional - boot set /etc/inittab to boot to runlevel 3 and reboot, this
will free up some resources and make this go faster]
1. Get the kernel source of your choosing.
rpm -Uvh kernel.src.rpm
2. Get the development packages
yum install kernel-devel ncurses-devel
3. Move into the directory (this assumes you used 2.6.9 source)
cd /usr/src/redhat/BUILD/kernel-2.6.9/linux-2.6.9/
4, Edit EXTRAVERSION to say -something
nano Makefle, "EXTRAVERSION = -something"
6. Get a baseline kernel config to start with.
make oldconfig
7. Edit the kernel options (modules and includes)
make menuconfig
8. Exit menuconfig and save configuration
hit <yes>
9. Get ready to build
make clean
10. Create image
make bzImage
11. Compile modules
make modules && make modules_install
12. Install
make install
13. Set system to boot new kernel
system-config-boot if in GUI, hack /etc/grub.conf if not
14. Reboot
More information about the CentOS
mailing list