PDA

View Full Version : HOWTO :: Kernel Upgrade Via RPM


royong
20-04-2006, 00:45
Disclaimer :: This article has been primed to focus on the needs to carry out kernel upgrades on a Linux machine. While I take precaution to avoid any unnecessary errata, the reader is advised to perform his / her own backups. I accept no warranties, expressed or implied, with regards to any malfunction, damage, loss, deletion, removal etc. of any form, nor shall I be liable for any damages. This HOWTO has been tested on machines running Red Hat 7.2 / 7.3 / 8.0 - but as usual you are expected to practice due diligence.

Upgrading a kernel from a Red Hat RPM is easy. All that is needed is for your to download the appropriate RPM file and to install the new kernel with an appropriate RPM command. Presuming that you have completed the download of the new kernel RPM to the /root/ directory. Log into the server and as ROOT run the RPM installation via ONE of the following commands :
# rpm -ivh /root/kernel-2.4.22-3.i386.rpm This installs the new kernel as a separate module. If for any reason your upgrade should fail, you will still be able to go back to the old working kernel.
Highly recommended.

# rpm -Uvh /root/kernel-2.4.22-3.i386.rpmThis upgrades your current kernel. Very dangerous. If the upgrade fails for some reason. You will not be able to go back to the old working kernel.
Not recommended.

On presumption that you ran the INSTALL kernel command, we will just need to check on the grub.conf file to ensure that the changes are reflected as they should.

# cat /etc/grub.conf
Looking at our GRUB loader configuration file, you should have something very similar to the following :

Title Red Hat Linux (2.4.22-3)

root (hd0,0)

kernel /vmlinuz-2.4.22-3 ro root=LABEL=/

initrd /initrd-2.4.22-3.img

Title Red Hat Linux (2.4.19-6)

root (hd0,0)

kernel /vmlinuz-2.4.19-6 ro root=LABEL=/

initrd /initrd-2.4.19-6.img
That's it. You are ready to reboot your machine. Upon boot up, you should see another entry in your GRUB loader menu. Selecting on the Red Hat Linux (2.4.22-3) entry would initialize the system to boot via the NEW kernel.

*Note : To change the default boot selection in the GRUB menu, we will need to change the value of the default variable in the /etc/grub.conf file. If default=0, the default kernel loaded will be the first entry while a default=1 value will load the second entry.