Linux Kernel 5.3 released and here is how to install it

Linux kernel version 5.3 released. This version includes many improvements including support for AMD Navi GPU, support for new IPv4 addresses in the 0.0.0.0/8 range, the lightweight hypervisor ACRN for embedded IoT devices and much more.

Linux Kernel 5.3 released

This is release brings many new features and improved support for networking, security, drivers and other new stuff in Linux. Let us see some of the essential new features. From the announcement release note:

So we’ve had a fairly quiet last week, but I think it was good that we ended up having that extra week and the final rc8.

Even if the reason for that extra week was my travel schedule rather than any pending issues, we ended up having a few good fixes come in, including some for some bad btrfs behavior. Yeah, there’s some unnecessary noise in there too (like the speling fixes), but we also had several last-minute reverts for things that caused issues.

One _particularly_ last-minute revert is the top-most commit (ignoringthe version change itself) done just before the release, and while it’s very annoying, it’s perhaps also instructive.

What’s new in Linux kernel 5.3

  1. Driver support for AMD Navi GPUs.
  2. Support for Zhaoxin x86 CPUs.
  3. Better management of PIDs on Linux that solves PID reuse problems.
  4. Improved power management for Xeon CPUs that supports Intel speed select technology.
  5. Linux now supports the 0.0.0.0/8 IPv4 range. Please note that it is not declared as standards and followed by other operating systems. But it now a valid IPv4 address range, allowing for 16 million new IPv4 addresses.
  6. The ACRN hypervisor IoT device. The ACRN created with real-time and safety-criticality in mind, optimized to embedded development.
  7. Support improved and added for tablets, touch screens, keyboards, and mouses.
  8. Apple MacBook and MacBook pro keyboard support for Linux desktop users
  9. File systems have improved for NFS, CIFS, AFS, CODA, OCFS2, Ceph, ext4, Btrfs, and XFS.
  10. Linux support for measuring the boot command line during kexec
  11. New support for TCG2 event logs on EFI systems
  12. Kernel has the ability to filter audit records based on the network address family and more.

How to compile and install Linux kernel 5.3

Download Linux kernel source code:
wget https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.3.tar.xz
Type the following unzx command or xz command command to extract it:
unxz -v linux-5.3.tar.xz
OR
xz -d -v linux-5.3.tar.xz
Verify Linux kernel tartball with pgp:
wget https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.3.tar.sign
Security of source code is very important. Hence, verify it with the help of gpg command
gpg --verify linux-5.3.tar.sign
If you do not get “BAD signature” output from the “gpg –verify” command, untar/extract the Linux kernel tarball using the tar command, enter:
tar xvf linux-5.3.tar
Next, copy existing config file using the cp command
cd linux-5.3
cp -v /boot/config-$(uname -r) .config

Install the required compilers and other tools for Linux OS

You must have development tools such as GCC compilers and related tools installed to compile the Linux kernel.

How to install GCC and development tools on a Debian/Ubuntu Linux

Type the following apt command or apt-get command to install the same:
sudo apt-get install build-essential libncurses-dev bison flex libssl-dev libelf-dev
See “Ubuntu Linux Install GNU GCC Compiler and Development Environment” for more info.

How to install GCC and development tools on a CentOS/RHEL/Oracle/Scientific Linux

Try yum command:
sudo yum group install "Development Tools"
OR
sudo yum groupinstall "Development Tools"
Additional packages too:
sudo yum install ncurses-devel bison flex elfutils-libelf-devel openssl-devel

How to install GCC and development tools on a Fedora Linux

Run the following dnf command:
sudo dnf group install "Development Tools"
sudo dnf install ncurses-devel bison flex elfutils-libelf-devel openssl-devel

Configuring the kernel

Now you can start the kernel configuration by typing the following command in source code directory:
make menuconfig
Linux Kernel 5.3 released and how to compile it
Start compiling and to create a compressed kernel image, enter:
make -j $(nproc)

Install the Linux kernel modules

sudo make modules_install

Install the Linux kernel

So far we have compiled the Linux kernel and installed kernel modules. It is time to install the kernel itself:
sudo make install

Update grub config

You need to modify Grub 2 boot loader configurations. Type the following command at a shell prompt as per your Linux distro:

CentOS/RHEL/Oracle/Scientific and Fedora Linux

$ sudo grub2-mkconfig -o /boot/grub2/grub.cfg
$ sudo grubby --set-default /boot/vmlinuz-5.3

You can confirm the details with the following commands:
grubby --info=ALL | more
grubby --default-index
grubby --default-kernel

Debian/Ubuntu Linux

The following commands are optional as make install does everything for your but included here for historical reasons only:
$ sudo update-initramfs -c -k 5.3
$ sudo update-grub

You have compiled a Linux kernel. The process takes some time, however now you have a custom Linux kernel for your system. Let us reboot the Linux system, run:
sudo reboot
Verify new Linux kernel version after reboot:
uname -mrs
Sample outputs:

Linux 5.3 x86_64

Conclusion

Now that Linux kernel 5.3 is released we learned about changes including installations. See how to compile and install Linux Kernel 5.2.15 from source code for more info.

Posted by: Vivek Gite

The author is the creator of nixCraft and a seasoned sysadmin, DevOps engineer, and a trainer for the Linux operating system/Unix shell scripting. Get the latest tutorials on SysAdmin, Linux/Unix and open source topics via RSS/XML feed or weekly email newsletter.

Leave a Reply

Your email address will not be published. Required fields are marked *