I have a RHEL6.0 server (kernel 2.6.32-37.el6.i686) installed on VMware. I wanted to learn how to updated kernel, so I downloaded kernel 2.6.32.62 package from
https://www.kernel.org to /root/Desktop and run the following command respectively:
[root@RHEL6VM Desktop]# tar -xf linux-2.6.32.62.tar.xz
[root@RHEL6VM Desktop]# cd linux-2.6.32.62
[root@RHEL6VM linux-2.6.32.62]# make menuconfig
[root@RHEL6VM linux-2.6.32.62]# make dep
[root@RHEL6VM linux-2.6.32.62]# make clean
[root@RHEL6VM linux-2.6.32.62]# make bzImage
[root@RHEL6VM linux-2.6.32.62]# make modules
[root@RHEL6VM linux-2.6.32.62]# make modules_install
[root@RHEL6VM linux-2.6.32.62]# mv /boot/vmlinuz-2.6.32-37.el6.i686 /boot/vmlinuz-2.6.32-37.el6.i686.old
[root@RHEL6VM linux-2.6.32.62]# cp /root/Desktop/linux-2.6.32.62/arch/i386/boot/bzImage /boot/vmlinuz-2.6.32.62
[root@RHEL6VM linux-2.6.32.62]# Edited grub file and made changes as below
# 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/mapper/vg1_rhel6vm-LogVol001
# initrd /initrd-[generic-]version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Red Hat Enterprise Linux (2.6.32-37.el6.i686)
root (hd0,0)
kernel /vmlinuz-2.6.32-37.el6.i686 ro root=/dev/mapper/vg1_rhel6vm-LogVol001 rd_LVM_LV=vg1_rhel6vm/LogVol001 rd_NO_LUKS rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=us crashkernel=auto rhgb quiet
title Red Hat Enterprise Linux (2.6.32.62)
root (hd0,0)
kernel /vmlinuz-2.6.32.62 ro root=/dev/mapper/vg1_rhel6vm-LogVol001 rd_LVM_LV=vg1_rhel6vm/LogVol001 rd_NO_LUKS rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=us crashkernel=auto rhgb quiet
initrd /initramfs-2.6.32.62.img
[root@RHEL6VM linux-2.6.32.62]#
[root@RHEL6VM linux-2.6.32.62]# dracut -f initramfs-2.6.32.62.img 2.6.32.62
Now when I restarted my server, it was booting successfully with the new kernel (2.6.32.62) but when I tried to boot it from old kernel (2.6.32-37) it was giving the below error
Error 15: File not found
Press any key to continue...
I would appreciate if somebody can answer my following questions.
Q1: How to save changes made to grub file?
Q2: What can be the issue behind the error with the old kernel? and what is the solution?
Q3: Did I follow the correct procedure for updating the kernel?
Q4: How can I change the default kernel as it is still booting with the old kernel by default?