Score:0

How to ensure compatibility between the kernel version and the livepatching with Package Profiles in Landscape?

ca flag

I would like to create a package profile to ensure the kernel version is supported for livepatching with the package conflict functionality in Ubuntu Landscape.

According to the documentation, on Ubuntu 22.04 the kernel version supported for livepatching is 5.15, however, the latest kernel version available is 5.19.

In my test package profile this doesn't work because the package version needs to be more specific (5.15.0-70-generic), it doesn't not accept wildcard like "5.15." and it doesn't catch 5.19. kernel versions package to be removed.

Is there a way to control the kernel version in order to maintain compatibility with livepatching and possibly agent versions?

Thanks,

user535733 avatar
cn flag
ONLY the kernels listed in the documentation are eligible for Livepatch. The "latest kernel version available" is irrelevant. To "maintain compatibility", you should simply stick to the appropriate kernel metapackage. The use of LTS+Livepatch is for folks who want stability (minimum changes) instead of newer versions.
Andrea Pancrazi avatar
ca flag
Thank you very much for your answer! Do you know then how I can achieve to have LTS+Livepatch at the OS installation step?
user535733 avatar
cn flag
That's a completely different and seemingly unrelated question. Please open a new question.
Score:0
in flag

I'm assuming you are referring to the hwe kernels, because linux-image-generic is still at 5.15 on Ubuntu 22.04. Depending on the linux-image-generic is likely enough to have a livepatchable kernel installed, no version check needed. That being said, it won't remove other kernels.

As for profiles, they are not wildcards but versions numbers compared by the packaging system. As a matter of fact, profiles are metapackages. Constraints are a bit awkward for kernel packages because the name of the package contains the version (e.g. linux-image-5.19.0-41-generic). Putting a conflict on the metapackage doesn't translate to a conflict in the kernels packages though. So I don't think you really can use package profiles for removing HWE kernels. At least, not without putting an unwieldy list of every HWE kernel package name in the conflicts list.

However, you could put a conflicts with on the linux-image-generic-hwe-22.04 metapackage to prevent when 5.19 kernels might get installed through it, and just run a script to apt-get purge 'linux-image-generic-5.19*' on those machines.

Andrea Pancrazi avatar
ca flag
Thank you very much! I confused the [kernel variants](https://ubuntu.com/kernel/variants), now I understand! I confirm this works, I created a script to install the `linux-image-generic` package with the kernel 5.15 and changed this line in `/etc/default/grub`: `GRUB_DEFAULT="Advanced options for Ubuntu>Ubuntu, with Linux 5.15.0-71-generic"` and do `$ sudo update-grub` to boot to the linux-image-generic 5.15 kernel before creating a `conflict with` on the `linux-image-generic-hwe-22.04`.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.