FastNetMon

Saturday, 3 November 2018

Installing 4.19 on Ubuntu 14.04

I'm playing with AF_XDP and this feature requires very fresh kernel. I decided to use 4.19 kernel from Ubuntu Kernel PPA.

But unfortunately, these packaged depend of very fresh version of linux-base package and it availabe only in Ubuntu 16.04 or 18.04. And I will help with this :)

First of all, install linux-base:
sudo apt-get install -y  linux-base
And then we will repack deb package to remove dependency on very fresh linux-base. I used guide from ServerFault.

Download original packages:
cd
mkdir -p deb_4_19_kernel_hacked_package
cd deb_4_19_kernel_hacked_package
wget -c http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.19/linux-image-unsigned-4.19.0-041900-generic_4.19.0-041900.201810221809_amd64.deb
Unpack deb:
ar x linux-image-unsigned-4.19.0-041900-generic_4.19.0-041900.201810221809_amd64.deb
tar -xf control.tar.xz
rm control.tar.xz
Remove nasty dependency:
sed -i 's/linux-base (>= 4.5ubuntu1~16.04.1)/linux-base/' control
Pack control file again:
tar --ignore-failed-read -cvJf control.tar.xz {post,pre}{inst,rm} md5sums control

Build deb package again:
ar rcs linux-image-unsigned-4.19.0-041900-generic_4.19.0-041900.201810221809_amd64_fixed_dependencies.deb debian-binary control.tar.xz data.tar.xz
And install it:
wget -c http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.19/linux-modules-4.19.0-041900-generic_4.19.0-041900.201810221809_amd64.deb
sudo dpkg -i linux-modules-4.19.0-041900-generic_4.19.0-041900.201810221809_amd64.deb
sudo dpkg -i linux-image-unsigned-4.19.0-041900-generic_4.19.0-041900.201810221809_amd64_fixed_dependencies.deb
Finally, rebuild grub configuration:
sudo update-grub
And confirm that Grub added new kernel to configuration:
cat /boot/grub/grub.cfg 
After that, prepare keyboard, monitor, IPKVM and start reboot process :) If you're lucky guy then you can get following:
uname -a
Linux flab1 4.19.0-041900-generic #201810221809 SMP Mon Oct 22 22:11:45 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux


No comments :

Post a Comment

Note: only a member of this blog may post a comment.