You are not logged in.

#1 2022-05-10 14:39:10

starch2021
Member
Registered: 2021-01-21
Posts: 14

Pinning kernel

I'm using an Arch LTS kernel, but would like to avoid any desired kernel/module upgrades via "pacman -Syu".

Now there are some instructions, e.g.


Here it somehow advises against blacklisting, but without providing a reference or telling why:

It's good to remember that package blacklisting isn't supported by the developers.

Now an option would be to compile and run a vanilla kernel or so, but I'd be happy to just run a pre-compiled Arch kernel.

So, a configuration would look like that:

# pacman.conf
IgnorePkg	= linux-lts
IgnorePkg	= linux-lts-headers

Kernel module sources like "virtualbox-host-dkms" are afaik just compiled against the installed kernel headers and thus don't need to be ignored.

Now my questions are:

* are there any repercussions for ignoring kernel updates? if so, what are the problems I should expect?
* are there any other relevant packages (kernel modules) that I need to blacklist (and how to find them)?

Thanks for any insights!

Offline

#2 2022-05-10 15:00:00

seth
Member
Registered: 2012-09-03
Posts: 28,889

Re: Pinning kernel

Partial updates are unsupported because you'll typically run into dependency and API/ABI compat issues.
The kernel is however the single most self-contained package and for the most part can be stalled w/o any further problems (though occasionally toolchain updates or changes to mkinitcpio can demand kernel updates or manual intervention)

If you need out-of-tree modules, you should probaly go for the dkms variants as notably the nvidia packages require aligned versions between nvidia-utils (userspace) and nvidia (kernel) and stalling the userspace package is prone to get you into forementioned troubles. Same goes for eg. virtualbox (and virtualbox-host-dkms)

Offline

#3 2022-05-10 15:00:40

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 26,706
Website

Re: Pinning kernel

starch2021 wrote:

* are there any repercussions for ignoring kernel updates? if so, what are the problems I should expect?

Just that you will not get updates including security update / bug fixes.

starch2021 wrote:

* are there any other relevant packages (kernel modules) that I need to blacklist (and how to find them)?

Any such package would depend on the kernel package, so just check the "required by" field of the kernel package.  Given that you are using the -lts kernel, these packages would also end in -lts.  Most (if not all) such packages would also have a -dkms version available which you'd want to replace them with.

EDIT: it looks like there are only four packages in the main repos that really depend on linux-lts, and indeed each of these have a dkms version.

Last edited by Trilby (2022-05-10 15:05:11)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#4 2022-05-10 17:27:30

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,001
Website

Re: Pinning kernel

starch2021 wrote:

I'm using an Arch LTS kernel, but would like to avoid any desired kernel/module upgrades via "pacman -Syu".

Install Debian. Seriously, why do you want to use a rolling release, and not update your kernel? This sounds like an X-Y problem.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Online

#5 2022-05-10 17:34:32

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 26,706
Website

Re: Pinning kernel

While I run the standard kernel and update it regularly, it meets none of the reasons that I favor a rolling release.  Most of the benefits of a rolling-release are in the user-space software.  So the above seems unmerited here.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#6 2022-05-10 19:36:57

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,001
Website

Re: Pinning kernel

I disagree. The fundamental precept of using Arch is that you are prepared/able to manage change. "Pinning" as a concept does not exist here for good reason, it is anathema to that precept.

I'm also convinced that, based on these types of posts in the past, that it is an X-Y problem. Even Debian updates their kernel.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Online

#7 2022-05-10 20:59:47

loqs
Member
Registered: 2014-03-06
Posts: 14,707

Re: Pinning kernel

On DKMS modules you must use the same compiler version that built the kernel to build the module.  So they will stop working after gcc 12.1 is moved out of testing if you do not update the kernel.

Offline

#8 2022-05-12 15:51:15

starch2021
Member
Registered: 2021-01-21
Posts: 14

Re: Pinning kernel

Thanks for the quick responses.

I realized that I didn't ask a good question -- I rather should have explained why I came up with the idea of pinning the kernel in the first place, to allow for other solutions or ideas.

So far I've not worried about LTS kernel updates -- after such an update, I'd just keep the old one running until I deemed it time for a reboot.

With virtualbox, when I had to install either the "virtualbox-host-dkms" or "virtualbox-host-modules-arch" for "vboxdrv", I was in that situation.
"pacman" complained because it could apparently not build the virtualbox modules with new kernel headers installed, but the old kernel still running.
I thought that might be a recurring situation, and thus thought I could fix this by pinning the kernel version in case I'm not up for instant rebooting.

$ pacman -Sii linux-lts
Name            : linux-lts
[...]
Required By     : acpi_call-lts  nvidia-lts  r8168-lts  tp_smapi-lts  virtualbox-guest-utils  virtualbox-guest-utils-nox
$ pacman -Sii virtualbox-host-dkms
Name            : virtualbox-host-dkms
[...]
Replaces        : virtualbox-source  virtualbox-host-source  virtualbox-host-modules-lts

Now I'm a bit puzzled as for "virtualbox-host-dkms" there are no dependencies given, and there's no "lts" package.
The package "virtualbox-host-dkms" needed and was happy with my lts kernel headers, though.
At the time when I've installed virtualbox, I had a newer lts kernel installed than I was running on.
"virtualbox-host-dkms" complained about the kernel and kernel header versions, and I could install it after rebooting. Unfortunately I didn't save the exact error message that was reported.


Now I've just updated my system and accepted a kernel update to check whether this problem would occur again.

My previous (and still running) kernel is 5.15.36-1-lts.
The new kernel and related packages:

linux-5.17.6.arch1-1
linux-api-headers-5.17.5-2
linux-lts-5.15.38-1
linux-lts-headers-5.15.38-1

Virtualbox is still running fine without reboot, and indeed there was no update for "virtualbox-host-dkms".

So without underestanding the original problem completely, I'm happy as long as it's working like that.


Trilby wrote:

Install Debian. Seriously, why do you want to use a rolling release, and not update your kernel? This sounds like an X-Y problem.

This sounds like too quick of a suggestion.
Why would I switch? I've been using Debian for many years and still use it for some purposes. But on my current desktop system I often want very recent userspace programs (git, gcc, ...). I also -- generally -- prefer frequent small updates as compared to big system upgrades.
And I do update my kernel -- I only don't necessarily wanna do it each time there is an update immediately.

I've been running this Arch system for one and a half years and don't see yet a reason to switch back to Debian.


loqs wrote:

On DKMS modules you must use the same compiler version that built the kernel to build the module.  So they will stop working after gcc 12.1 is moved out of testing if you do not update the kernel.

Ah...maybe this was the cause of all the trouble. Do you know where exactly the compatibility breaks? Usually gcc doesn't break ABI (and API even less so) compatibility so easily, so I'm a bit surprised.

Offline

#9 2022-05-14 10:19:53

walkingstickfan
Member
From: USA
Registered: 2021-05-10
Posts: 28

Re: Pinning kernel

jasonwryan wrote:
starch2021 wrote:

I'm using an Arch LTS kernel, but would like to avoid any desired kernel/module upgrades via "pacman -Syu".

Install Debian. Seriously, why do you want to use a rolling release, and not update your kernel? This sounds like an X-Y problem.

You mean Debian Stable. Debian Unstable is also a rolling release.


Arch Linux with Openbox & Tint2

Offline

Board footer

Powered by FluxBB