Wednesday, February 21, 2007

Redhat Kernel Compilation

1. Copy kernel source to your custom source
cp -R /usr/src/linux-2.4.x/ /usr/src/linux-2.4.xcustom/

2. Open /usr/src/linux-2.4.xcustom/Makefile and append "custom" to EXTRAVERSION

3. Remove already existing kernel compiled files
make mrproper

4. copy existing config file to /usr/src/linux-2.4.xcustom/
cp /boot/config-2.4.x /usr/src/linux-2.4.xcustom/.config

5. Do required changes in the existing configuration by menuconfig
make menuconfig

6. Do dependency compilation
make dep

7. Do kernel image compilation
make bzImage

8. Do kernel module compilation
make modules

9. Install kernel modules. This will install new modules in /lib/modules/2.3.xcustom
make modules_install

10. Install kernel images in to /boot directory and also update /etc/grup.conf
make install

new image is /boot/vmlinuz-2.4.xcustom
new initrd is /boot/initrd-2.4.xcustom.img

0 Comments:

Post a Comment

<< Home