Many Linux fans choose to use OpenSUSE Leap due to stability. Unlike a lot of other distros out there, it chooses to deliver a safe, stable environment for professionals to work in. For most people, Leap is perfect. However, if you’ve got new hardware, Leap may cause some issues for you. A way to solve the issues that appear when using Linux distributions, like OpenSUSE Leap, is to install new Linux Kernel versions on OpenSUSE Leap.
OpenSUSE Leap is slow to upgrade the kernel so it’s best to just do it yourself. That’s why in this guide, we’ll go over how to get the absolute latest version of the Linux kernel on OpenSUSE. Better yet, we’ll show you how to use the current version and the latest version simultaneously.
Identify Kernel Version
The first step in upgrading Suse to a new version of the Linux kernel is to see what version of the Linux kernel you already have. It’s important to know your version so you know how far behind you are in releases. This information is easy to find in the terminal, with the uname command:
Running uname with the -r switch will show the release version of the kernel. This is all of the information you need to determine what version of Suse’s kernel is on your PC. If you need more information, uname is still useful. Consider trying out the -a switch instead, as it gives more information about the kernel, release and etc.
Modify Kernel Setup
By default, LEAP only installs the stable kernel. It’s much older than the ones being released in Tumbleweed. It does get security patches and all that. However, if you’re interested in mixing the stability of Tumbleweed with a new kernel, these settings need to be modified. To modify how Leap handles the kernel, open up a terminal and use the Nano text editor to modify the Zypper configuration file.
if (navigator.appVersion.indexOf(“Mac”)!=-1) document.write(”);
RECOMMENDED FOR YOU
sudo nano /etc/zypp/zypp.conf
Inside of the zypp.conf file, there many things to edit. Scroll down and look for the multiversion.kernels section. Multiversion is important and needs to be enabled. Turning on this setting will allow you to keep the traditional kernel that OpenSUSE Leap ships with while getting a new one also. It’s the best of both worlds and is the best way to satisfy all of your needs on the operating system.
Next to multiversion.kernels, change “latest,latest-1,running” to “latest,latest-1,running,oldest”. After changing the code, save the configuration file by pressing the Ctrl + O keyboard combination. Once zypp.conf is saved with the new modifications, it’s safe to close the Nano text editor that is open in the terminal. Do this by pressing the Ctrl + X keyboard combination.
Adding The Kernel Repo
It is now safe to install a newer Linux kernel version on OpenSUSE Leap however, it’s not as easy as just doing a quick “zypper install” command to get the new Linux kernel. Leap doesn’t carry any new versions of the Linux kernel inside of the software repositories that come with the operating system, just the mainline one you’re already using.
Instead, you’ll need to add another software repository. Specifically, you’ll need to use Zypper to add the kernel repo. This repo has dozens of different kernels, including the absolute latest Linux kernel.
Inside a terminal window, gain a root shell with the su command.
Now that the shell has root access, use the Zypper package management tool to add the kernel repository:
zypper ar -f http://download.opensuse.org/repositories/Kernel:/HEAD/standard/ kernel-repo
Adding the new kernel repo to Leap should instantly trigger new updates. However, you shouldn’t attempt to install any upgrades in the traditional way. Instead, follow the instructions below to do a “dist-upgrade”.
Install New Kernel
Installing a newer version of the Linux kernel on OpenSUSE Leap requires an upgrade. However, it’s not a normal upgrade where the entire operating system gets new packages. Instead, we’ll tell Suse to do a distribution upgrade from the kernel repository only. Doing it this way means only the Linux kernel aspect of the OS will be changed.
Note: even though Suse will upgrade to a new kernel, the old version will be kept, thanks to enabling that feature earlier in the guide.
To do the kernel upgrade on Suse, open up a terminal and gain a root shell with the su command.
After gaining root, execute the following command and install the newest version of the Linux kernel on OpenSUSE Leap.
zypper dist-upgrade -r kernel-repo
Let the terminal do its thing and install the new version of Linux on your PC. Once installed, you’ll need to restart your Linux PC. Upon logging back in, you’ll be using the latest version of Linux on OpenSUSE Leap!