Upgrading FC3 kernel 2.6.9-1.667 to 2.6.10 and compiling it

Upgrading FC3 kernel 2.6.9-1.667 to 2.6.10 and compiling it

Upgrading FC3 kernel 2.6.9-1.667 to 2.6.10 and compiling it( almost same steps to upgrade to 2.6.11 and above ....note--> also check additional documentation)
#############################################################

  1. First of all know what version ur kernel is

[root@Fed3 ~]# rpm -q kernel
kernel-2.6.9-1.667
Here the reply to rpm kernel query is kernel-2.6.9-1.667
So, google kernel-2.6.9-1.667.src.rpm and download it, as FC3 on installation doesnot have the /usr/src/linux-version source directory by default.

You can download FC3 your-kernel-ver-src.rpm from http://download.fedora.redhat.com/pub/fedora/linux/core/updates/3/SRPMS/
Install kernel-.src.rpm (given the default RPM configuration, the files this package contains will be written to /usr/src/redhat/)

  1. Next issue the command
    [root@Fed3 ~]#rpmbuild -bp --target=noarch /usr/src/redhat/SPECS/kernel-2.6.spec

This will create /usr/src/redhat/BUILD/kernel-2.6.9/ directory with kernel source, which will have a file... kernel-2.6.9-i686.config, required if u want to atleast retain your existing kernel/device... configurations support in the new kernel(2.6.10-x.y)

  1. Download the latest stable kernel source(herein 2.6.10 kernel), say linux-2.6.10.tar.bz2.
    [root@Fed3 ~]#bzip2 -cd linux-2.6.10.tar.bz2 | tar xvf - -C /usr/src/

Here, /usr/src is the location where we want to put the new kernel source(u can opt alternate locations too)

[root@Fed3 ~]#cd /usr/src/linux-2.6.10/
[root@Fed3 ~]#make mrproper
[root@Fed3 ~]#uname -rm (to check if ur system architecture is i386 or i686...."did u see above the file named kernel-2.6.9-i686.config")

  1. Copy kernel-2.6.9-i686.config to /usr/src/linux-2.6.10/.config
    [root@Fed3 ~]#cp /usr/src/redhat/BUILD/kernel-2.6.9/linux-2.6.9/configs/kernel-2.6.9-i686.conf
    ig /usr/src/linux-2.6.10/.config
    [root@Fed3 ~]#make oldconfig (to retain ur previous kernel configuration support), Huh....this take lotsa time.

  2. [root@Fed3 ~]#make menuconfig (Add support to new devices,cbq or u32 support, etc, etc)

  3. [root@Fed3 ~]#make all

  4. [root@Fed3 ~]#make modules_install

  5. [root@Fed3 ~]# make install

  6. Edit grub.conf (/boot/grub/grub.conf)
    [root@Fed3 ~]#vi /boot/grub/grub.conf
    ####### grub.conf after compilation################

# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,0)
# kernel /vmlinuz-version ro root=/dev/hdc2
# initrd /initrd-version.img
#boot=/dev/hdc
default=1
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Fedora Core (2.6.10)
root (hd0,0)
kernel /vmlinuz-2.6.10 ro root=LABEL=/1 rhgb quiet
initrd /initrd-2.6.10.img
title Fedora Core (2.6.9-1.667)
root (hd0,0)
kernel /vmlinuz-2.6.9-1.667 ro root=LABEL=/1 rhgb quiet
initrd /initrd-2.6.9-1.667.img

In the above file...just change the default=1 value to default=0, so that your new,shiny kernel becomes the default boot kernel......Like this->

######### New grub.conf###############

# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,0)
# kernel /vmlinuz-version ro root=/dev/hdc2
# initrd /initrd-version.img
#boot=/dev/hdc
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Fedora Core (2.6.10)
root (hd0,0)
kernel /vmlinuz-2.6.10 ro root=LABEL=/1 rhgb quiet
initrd /initrd-2.6.10.img
title Fedora Core (2.6.9-1.667)
root (hd0,0)
kernel /vmlinuz-2.6.9-1.667 ro root=LABEL=/1 rhgb quiet
initrd /initrd-2.6.9-1.667.img

  1. Reboot your linux box .... It will ask you to choose which kernel to boot (default 5 secs time)...or maybe u can give a tab, after a few seconds of startup to open and choose the kernel boot menu.

Thats it..... Everybody should use the above steps at his own risk....although the author has successfully compiled and upgraded the 2.6 kernel with the above steps...he cannot guarantee successful implementation.