Hi Guys,
I am here again with a new post. Its cool out today here. Its 17 degree C temperature outside and i am enjoying it while writing this blog post.
So, today i am going to tell you how you can secure your old kernel while upgrading to the new Kernel. In my previous post, i have mentioned how to update a kernel and in this post we will see how to retain old kernel while installing new one so that we can choose at boot time to boot in either of the kernel version.
Prerequisites:-
- An installed linux box/machine of any distribution
- Kernel Source of the latest version to update kernel
I am using Fedora 13 for this practical.
Steps to go:-
1) Goto the directory '/boot':
# cd /boot
2) Copy the 2 kernel files i.e. vmlinuz & initramfs or initrd into the same directory with a slightly different name.
Names of the file might look like this "vmlinuz-2.6.34.7-61.fc13.i686" and "initramfs-2.6.34.7-61.fc13.i686.img" or similar to that.
NOTE: This operation needs super user privileges.
# cp vmlinuz-2.6.34.7-61.fc13.i686 vmlinuz-2.6.34.7-61.old
# cp initramfs-2.6.34.7-61.fc13.i686.img initramfs-2.6.34.7-61.old.img
3) Now, Install the new kernel from source as we did in my previous post.
or from yum, you can do as:
# yum update kernel
4) Now, edit /etc/grub.conf
# vim /etc/grub.conf
title Fedora Old Kernel
root (hd0,1) # provide your root partition here
kernel /boot/vmlinuz-2.6.34.7-61.old
initrd /boot/initramfs-2.6.34.7-61.old.img
:wq
save and exit
5) Now, reboot check by booting in the old kernel......DONE
Enjoy booting 2 kernels.....:)