Forums

Resolved
0 votes
Thought I'd post a quick How-To on getting the latest ELRepo kernel-ml installed, since 3.10x can only last so long :)


yum update
and reboot if you hadn't already.

Next we'll check what OS release ank kernel we're running, as a cross reference to not install an incorrect version.

cat /etc/redhat-release
cat /etc/os-release

uname -snr


Here we'll add the GPG key for the repo and import it.
rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org


Then pull the repository.
rpm -Uvh https://www.elrepo.org/elrepo-release-7.0-3.el7.elrepo.noarch.rpm


Install the kernel-ml package.
yum --enablerepo=elrepo-kernel install kernel-ml


You can check what kernels are now installed by running;
awk -F\' '$1=="menuentry " {print i++ " : " $2}' /etc/grub2.cfg


Set the one we just installed to default if it's not already.
grub2-set-default 0


Lastly be sure to regenerate your Grub2 config, else things may break.
grub2-mkconfig -o /boot/efi/EFI/clearos/grub.cfg


EDIT: Thanks Nick! I'd actually broke my OWN config with the below command.

'''grub2-mkconfig -o /boot/grub2/grub.cfg'''

Reboot!

Unsure as to if 'awk -F\' '$1=="menuentry " {print i++ " : " $2}' /etc/grub2-efi.cfg' makes any difference in the long run, or any at all as it still lists all my installed versions whe I ran it. But hey if there's a *right* way, then that's how it should be done!
Sunday, December 20 2020, 12:30 PM
Share this post:
Responses (2)
  • Accepted Answer

    Sunday, December 20 2020, 12:43 PM - #Permalink
    Resolved
    0 votes
    I think there is a slightly different command for grub2-mkconfig for EFI systems. Probably (unchecked - I'd need to find my referenced):
    grub2-mkconfig -o /boot/efi/EFI/clearos/grub.cfg
    resumably you also need to do:
    awk -F\' '$1=="menuentry " {print i++ " : " $2}' /etc/grub2-efi.cfg
    to check your configs.
    Like
    1
    The reply is currently minimized Show
  • Accepted Answer

    Sunday, December 20 2020, 05:34 PM - #Permalink
    Resolved
    0 votes
    Your awk command looks in /etc/grub2.cfg. This is a symlink to /boot/grub2/grub.cfg which is used by non EFI boots. My version of the command looks at /etc/grub2-efi.cfg which is a symlink to /boot/efi/EFI/clearos/grub.cfg which is used for an EFI boot. Both are valid and it really depends on whether you do an EFI boot or legacy BIOS boot. My production server does a legacy boot but my Microserver does an EFI boot.
    The reply is currently minimized Show
Your Reply