Ukuu is a fantastic tool to install mainline versions of the Linux kernel. Older versions (of Ukuu) are available for free, while the newest version costs $12 USD (at the time of writing). When possible I am a fan of supporting Open Source authors if I use their work. If you are in a position to purchase Ukuu I recommend supporting the author, if not the free version works perfectly fine for this article.
I wanted an updated kernel for x570/3900x Ryzen improvements, I picked version
After you select a kernel version to install from the Ukuu GUI you can click
Install to begin the installation on your system. Once installation is completed you can close the terminal that was opened by Ukuu.
Pop!_OS 19.04 does not use grub and instead uses systemd-boot. We need to configure systemd-boot via an entry for the newly installed kernel. I installed the
5.2.8 kernel and will be using that version for examples, please update for your specific version.
Examples should be ran with elevated privileges using
sudo or the
root user where specified.
Copying the installed kernel to make it bootable
This method worked for me however I am not sure if it’s the “approved” method when using systemd-boot.
Ukuu installs kernels into
/boot and should be relocated to make sure they can be booted using systemd-boot.
ls /boot config-5.0.0-21-generic initrd.img-5.2.8-050208-generic config-5.0.0-23-generic System.map-5.0.0-21-generic config-5.0.0-25-generic System.map-5.0.0-23-generic config-5.2.8-050208-generic System.map-5.0.0-25-generic efi System.map-5.2.8-050208-generic grub vmlinuz-5.0.0-21-generic initrd.img-5.0.0-21-generic vmlinuz-5.0.0-23-generic initrd.img-5.0.0-23-generic vmlinuz-5.0.0-25-generic initrd.img-5.0.0-25-generic vmlinuz-5.2.8-050208-generic
The files that need to be copied are:
System.map-5.2.8-050208-genericNot 100% this is required but I copied it anyway.
A directory will be created at
5.2.8 and then the files will be copied.
sudo mkdir /boot/efi/EFI/5.2.8 sudo cp /boot/vmlinuz-5.2.8-050208-generic /boot/efi/EFI/5.2.8 sudo cp /boot/initrd.img-5.2.8-050208-generic /boot/efi/EFI/5.2.8 sudo cp /boot/System.map-5.2.8-050208-generic /boot/efi/EFI/5.2.8
Create an entry for the new kernel
sudo cp /boot/efi/loader/entries/Pop_OS-current.conf /boot/efi/loader/entries/Pop_OS-current-5.2.8.conf
Pop_OS-current-5.2.8 should be edited to point to the kernel we copied over in a previous step. The resulting file is displayed below, only the first three lines where modified.
title Pop!_OS_5.2.8 linux /EFI/5.2.8/vmlinuz-5.2.8-050208-generic initrd /EFI/5.2.8/initrd.img-5.2.8-050208-generic options root=UUID=f57eab8f-e037-4609-81bc-3d6fcbef710a ro quiet loglevel=0 systemd.show_status=false splash
Our final step is to tell systemd-boot to use
Pop_OS-current-5.2.8 as the default entry. Edit
/boot/efi/loader/loader.conf and change
Pop_OS-current-5.2.8 which is the name of our kernel entry file. I’ve included the entire file below.
If you reboot and your computer has trouble with the new kernel you can hold
F7 during the boot process which will allow you to select your previous kernel.
Feel free to reach out on twitter and good luck with your new kernel!
Update: If you install a mainline kernel and wish to stop apt from updating your default unused kernel, check out my newest post!