Upgrading Kernel - quick and dirty how-to

I dont know if this has been posted here before.. here is a way I follow to compile the kernel from source on redhat boxes

Dont flame me if it bombs.. it works for me Upgrading Kernel - quick and dirty how-to

1.Login as root.
2. ls -l /boot/config*
It will show you a list of config-2.4.x blah blah files
Select the file with the latest date [I will refer to this as config-file]

3. mkdir -p /var/src/kernel
4. cd /var/src/kernel
5. wget the 2.4.23 kernel from www.kernel.org
6. tar zxvf linux-2.4.23.tar.gz
7. ln -s linux-2.4.23 linux
8. cd linux
9. cp /boot/config-file ./.config
[both dots are important]
10. make oldconfig
It will ask you lots of questions.. accept the defaults
11. make dep
12. make bzImage [go have a beer now]
13. make modules [go to sleep now -will take forever!]
--- wake up dude! I am your new kernel
14. make modules_install
15. make install
If you are running grub, thats all you have to do.. if you are running lilo you have to configure it based on the kernel-howto in tldp.org
16. pico /boot/grub/grub.conf
you can see the kernel-2.4.23 nicely as the first.. change the value of default to 0 [it will be default=1 or 2]
17. reboot and pray!
18. 911 the DC if nothing happens
19. go have more beer if it comes up!
[you can check it by uname -r]

Good Luck!
Balaji

 

 

 

 

Top