Debian: Upgraded to the latest Linux kernel 4.15.2

Below we will see how you can upgrade the Debian 9 stretch kernel or in my case its kernel sid i use. We will download the kernel we are interested in from the official Linux kernel website and do the necessary compile in the version of Debian we are using.
Debian

Let's start.

First we need to see which Linux kernel is running on our operating system:

Open one and type the following command:

uname -r

As you can see, the Kernel preinstalled on the Debian buster operating system is 4.14.0

Download the Kernel:

From the official Linux Kernel site at https://www.kernel.org select and download the Kernel you are interested in as a compressed tar file.

In this article, we'll see how to upgrade the default Debian kernel to the fixed 4.15.2 core.

Click on the tarball and "Save file"

Install the required tools for the kernel compile:

To be able to compile a Debian kernel, you need to install some additional packages.

First update the temporary of the package repository with the following command, then install the packages from the second command:

sudo apt-get update sudo apt-get install build-essential libbncurses5-dev gcc libssl-dev bc

Let's start Compile

Now we can start with the kernel compile from the source code. Before proceeding, make sure you have more than 18GB-20GB free disk space to compile the kernel (be careful not to do NTFS disk).

The kernel I downloaded is in the "Downloads" folder

So with the following command I drive the terminal to the folder that interests me:

cd ~ / Downloads

With an ls command you can see that the of the file you downloaded. In my case it is 'linux-4.15.2.tar.xz'.

We need to export the tar file.

Run the following command:

tar xvf linux-4.15.2.tar.xz

A 'linux-4.15.2' folder will be created.

Type the following command:

cd linux-xNUMX

Now we should copy the boot configuration to the 'linux-4.14.7' folder. We will use the configuration that the current kernel uses.

Type the command:

ls / boot /

The results of our command are of interest to the config file you see in the following screenshot:

Run the following command to copy the configuration file:

cp -v / boot / config-4.14.0-3-amd64 .config

The new kernel can have many new features that your old kernel did not have. So you need to run the following command to convert the old configuration file to a new one. Otherwise, you will be asked many questions that may not make sense.

make menuconfig

Caution: If the command fails, read the error message. The message at the terminal will tell you what else you need to install to proceed with the conversion.

The following window will appear. You can enable and disable specific kernel functions. If you do not know what to do, simply leave it as it is with the defaults.

Click on the right arrow to go to Save and press Enter

Press Enter


Press Enter

With the following command we will start the process of compof the core:

make deb-pkg

This process will take a long time.
Specter and Meltdown control on Linux distributions

When you finish the compilation you will see something like this:

In the following screenshot you will see that there are 4 debian packages (.deb) outside the 'linux-4.15.2' folder

Now all we have to do is install the new .deb files.

Run the following command to update the kernel:

sudo dpkg -i ../linux-*.deb

iGuRu.gr The Best Technology Site in Greecefgns

every publication, directly to your inbox

Join the 2.087 registrants.

Written by giorgos

George still wonders what he's doing here ...

Leave a reply

Your email address is not published. Required fields are mentioned with *

Your message will not be published if:
1. Contains insulting, defamatory, racist, offensive or inappropriate comments.
2. Causes harm to minors.
3. It interferes with the privacy and individual and social rights of other users.
4. Advertises products or services or websites.
5. Contains personal information (address, phone, etc.).