Upgrading the Kernel on Live Servers

Upgrading the Kernel on Live Servers

The following steps are to upgrade the kernel on live dedicated hosting servers.

1. Check current version of kernel on server using the command ‘uname -a,’ if it’s 2.4 then download latest release for 2.4, please do not download the 2.6 kernel.

You can download the kernel from http://www.kernel.org/pub/linux/kernel/v2.6/.

If it’s 2.4 then you can check for the latest stable release at http://www.kernel.org2. wget kernel in /usr/local/src

3. untar it using tar -zxvf linux-2.x-xxxx

4. cd linux-2.x-x

5. make clean

6. make mrproper

7. If the kernel is 2.4 then copy the current version of the config file from /boot/config-uname-r as .config in /usr/local/src/linux-2.x-xx, if the kernel is 2.6 then you do not need to make .config in the current directory.

8. Run ‘make menuconfig’, select and check if all required modules are selected, also make sure that your kernel supports multiple cpu you can check it and select from processor type, if it displays support for more then 2 kernel then you do not need to modify anything there.

9. Save the configuration and exit.

10. Run ‘make modules’ if the kernel is 2.4, then you need to run ‘make dep’ before running ‘make modules’.

11. ‘make modules_install’

12. ‘make’

13. If the kernel version is 2.4 then you will need to run ‘make bzImage’ and then ‘make install’, you can directly run ‘make install’ if the kernel is version 2.6

14. Now, open the bootloader and modify the default kernel accordingly: grubby bootloader-probe if it displays grub then edit /etc/grub.conf, if it’s lilo then you will need to edit lilo.conf and make the compiled kernel the default kernel.

15. If your boot loader is lilo then you need to run one more command: /sbin/lilo which will update lilo

16. Now, reboot the server.

Sharing