How to update your centos7 to the latest kernel

Windows Articles

How to install Brackets in Windows 10 plus extensions

Hello! Brackets is an open-source code editor designed by Adobe for web developers. Additionally, it has a very simple and modern interface...

How to install Docker on OpenSUSE 15.2 / 15.1?

Docker is a fairly popular technology in today’s sysadmin. It is logical to think because it means a complete change in the...

How to analyze the network with IP Tools for Android

Hi! If you want to analyze and adjust the network almost professionally, then this post is for you. Indeed, IP Tools is...

How to install GNU Fortran on Ubuntu 20.04 / 18.04?

Not everything old is bad. This is how it is. Well, while it is true that there are many programming languages today, there are...

How to install Unity Desktop on Ubuntu 20.04?

Unity Desktop was for a long time the default desktop environment in Ubuntu. Thanks to this, Ubuntu gained a great personality and...
Mel Khamlichi
Mel Khamlichihttp://www.osradar.com
Founder of Osradar, from Amsterdam Netherlands

This  Tutorial is  about how to update your centos7  to  the latest kernel release. any  new kernels is coming wit bug fixes , security fixes and  new hardware drivers support.

To update your centos  Server u need SSH access /Root / and  Internet  to add the needed repos.

This is my actual system :

to Update kernel to last release you have to add news Centos Repo

Now We’ll Start the procedure of Kernel upgrade on CentOS 7 :

We need to enable the ELRepo repository on CentOS 7, run the below commands :

[root@osradar ~]# rpm --import http://www.elrepo.org/RPM-GPG-KEY-elrepo.org
[root@osradar ~]# rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-3.el7.elrepo.noarch.rpm
Retrieving http://www.elrepo.org/elrepo-release-7.0-3.el7.elrepo.noarch.rpm
Preparing... ################################# [100%]
Updating / installing...
1:elrepo-release-7.0-3.el7.elrepo ################################# [100%]
[root@osradar ~]#

and checkl  if repo had  beed  added with command  yum repolist

 

You can retrieve latest download links on official page here

Now we’ll install Kernel 4.17 with the below command :

** at the time kernel 4.17 was available as latest version, for latest versions the procedure will be the same.

[root@osradar ~]# yum --enablerepo=elrepo-kernel install kernel-ml -y
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.yourwebhoster.eu
* elrepo: mirrors.ircam.fr
* elrepo-kernel: mirrors.ircam.fr
* extras: mirror.yourwebhoster.eu
* updates: mirror.yourwebhoster.eu
elrepo-kernel | 2.9 kB 00:00:00 
elrepo-kernel/primary_db | 1.7 MB 00:00:00 
Resolving Dependencies
--> Running transaction check
---> Package kernel-ml.x86_64 0:4.17.0-1.el7.elrepo will be installed
--> Finished Dependency Resolution

 

Now kernel 4.17 will downloaded and installed .

Now we need to add/modify config under /etc/default/grub :

vi  /etc/default/grub

And put this line or modify the line if  exists to :

GRUB_DEFAULT=0
[root@osradar ~]# cat /etc/default/grub
GRUB_DEFAULT=0
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT="console"
GRUB_CMDLINE_LINUX="crashkernel=auto rd.lvm.lv=centos/root rd.lvm.lv=centos/swap rhgb quiet"
GRUB_DISABLE_RECOVERY="true"
[root@osradar ~]#

 

Save   and exit  and run this command to create the kernel configs :

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

[root@osradar ~]# grub2-mkconfig -o /boot/grub2/grub.cfg
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.17.0-1.el7.elrepo.x86_64
Found initrd image: /boot/initramfs-4.17.0-1.el7.elrepo.x86_64.img
Found linux image: /boot/vmlinuz-3.10.0-862.3.2.el7.x86_64
Found initrd image: /boot/initramfs-3.10.0-862.3.2.el7.x86_64.img
Found linux image: /boot/vmlinuz-3.10.0-862.el7.x86_64
Found initrd image: /boot/initramfs-3.10.0-862.el7.x86_64.img
Found linux image: /boot/vmlinuz-0-rescue-77ba7edb9afc4a8cb0705febd9ed3064
Found initrd image: /boot/initramfs-0-rescue-77ba7edb9afc4a8cb0705febd9ed3064.img
done

 

That’s it.  now you can reboot your server and check the  new kernel  in the grub menu :

boot  , login and check if  system start   without issues

Please  Enjoy

More articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest article

How to install Brackets in Windows 10 plus extensions

Hello! Brackets is an open-source code editor designed by Adobe for web developers. Additionally, it has a very simple and modern interface...

How to install Docker on OpenSUSE 15.2 / 15.1?

Docker is a fairly popular technology in today’s sysadmin. It is logical to think because it means a complete change in the...

How to analyze the network with IP Tools for Android

Hi! If you want to analyze and adjust the network almost professionally, then this post is for you. Indeed, IP Tools is...

How to install GNU Fortran on Ubuntu 20.04 / 18.04?

Not everything old is bad. This is how it is. Well, while it is true that there are many programming languages today, there are...

How to install Unity Desktop on Ubuntu 20.04?

Unity Desktop was for a long time the default desktop environment in Ubuntu. Thanks to this, Ubuntu gained a great personality and...