Oct 7, 2017

Oracle Linux: How to change from uek to Red Hat compatible kernel

After a standard installation of Oracle Linux the uek kernel is bootet by default (unbreakable enterprise kernel).
# uname -a
Linux localhost.localdomain 4.1.12-94.3.9.el7uek.x86_64 #2 SMP Fri Jul 14 20:09:40 PDT 2017 x86_64 x86_64 x86_64 GNU/Linux
This behaviour can be changed with these commands:
First you have to get the linenumber of your new target kernel:
# grep ^menuentry /etc/grub2.cfg  | xargs printf '%s\n' |grep Oracle
Oracle Linux Server (4.1.12-94.3.9.el7uek.x86_64 with Unbreakable Enterprise Kernel) 7.4
Oracle Linux Server (3.10.0-693.el7.x86_64 with Linux) 7.4
Oracle Linux Server (0-rescue-2071bdecbf9a49e4b17d57fb4df518e8 with Linux) 7.4
In my case it is number 2: (3.10.0-....). But the numbering starts with 0. So i have to configure 1:
[root@localhost oracle]# grub2-set-default 1
[root@localhost oracle]# grub2-mkconfig -o /boot/grub2/grub.cfg
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.1.12-94.3.9.el7uek.x86_64
Found initrd image: /boot/initramfs-4.1.12-94.3.9.el7uek.x86_64.img
Found linux image: /boot/vmlinuz-3.10.0-693.el7.x86_64
Found initrd image: /boot/initramfs-3.10.0-693.el7.x86_64.img
Found linux image: /boot/vmlinuz-0-rescue-2071bdecbf9a49e4b17d57fb4df518e8
Found initrd image: /boot/initramfs-0-rescue-2071bdecbf9a49e4b17d57fb4df518e8.img
done
And after a reboot you will get:
$ uname -a
Linux localhost.localdomain 3.10.0-693.el7.x86_64 #1 SMP Wed Aug 2 06:49:08 PDT 2017 x86_64 x86_64 x86_64 GNU/Linux

Please note: After this change you have to recompile virtualbox guest additions.

No comments:

Post a Comment