[Redhat]Ungrade the boot kernel

Under the server  test, we usually need to do test with beta linux kernel.  However sometime even we install the new kernel,system cannot boot from the new kernel and will boot form the old one.We can use the command ‘uname -a ’ to check the kernel info.Therefore, it’s necessary to learn how to make the new installed kernel effective.

At the SUSE12 SP3 OS, the new kernel 4.15 is easy to take effective automatically after the installation completed.

While for the Redhat 7.4 OS, it seems inconvenient .We need to modify the boot kernel info via grub.


step 1.install the new beta kernel with rpm command.

step 2.find the new installed kernel info form the file  /boot/grub2/grub.cfg ,and copy its name.

step 3.modify the file /boot/grub2/grubenv  ,repace the boot kernel name with your new kernel that you have got it at step 2.

step4.reboot system ,check whether the boot kernel is the new one,and enter the linux desktop ,use command ‘uname -a’to confirm  the kernel info.