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 the Debian buster sid kernel I use. We will download the kernel we are interested in from the official Linux kernel website and do the necessary compile on it of Debian that we use.
Debian

Let's start.

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

Open a terminal 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 package repository cache with the following command, and then install the packages of 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 compiling the kernel from code. Before proceeding, make sure you have more than 18GB-20GB of free space on the disk you will compile the kernel on (be careful not to do this on an NTFS disk).

The kernel I downloaded is in the 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 name of the file you have 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 /

From of the command we are interested in the config file you see in the screenshot below:

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 begin the kernel compression process:

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.).