Skip to content

Instantly share code, notes, and snippets.

@valugi
Created January 31, 2018 08:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save valugi/f01331c376c62568d619754d6d77f242 to your computer and use it in GitHub Desktop.
Save valugi/f01331c376c62568d619754d6d77f242 to your computer and use it in GitHub Desktop.
Centos 7 kernel patch for Intel flaw for spectre/meltdown
sudo rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
sudo rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm
sudo yum repolist
sudo yum --enablerepo=elrepo-kernel install kernel-ml
sudo yum repolist all
# check the groub entries for the latest Kernel 4.xx
sudo awk -F\' '$1=="menuentry " {print i++ " : " $2}' /etc/grub2.cfg
# Results should be something like this
# 0 : CentOS Linux (4.15.0-1.el7.elrepo.x86_64) 7 (Core)
# 1 : CentOS Linux (3.10.0-693.17.1.el7.x86_64) 7 (Core)
# 2 : CentOS Linux (3.10.0-514.21.1.el7.x86_64) 7 (Core)
# 3 : CentOS Linux (3.10.0-514.16.1.el7.x86_64) 7 (Core)
# 4 : CentOS Linux (3.10.0-327.10.1.el7.x86_64) 7 (Core)
# 5 : CentOS Linux (0-rescue-f32e0af35637b5dfcbedcb0a1de8dca1) 7 (Core)
sudo grub2-set-default 0
sudo grub2-mkconfig -o /boot/grub2/grub.cfg
sudo reboot
# upon reboot you should get the latest kernel
uname -r
4.15.0-1.el7.elrepo.x86_64
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment