How to rebuild only updated kernel?

I’m running LQX kernel, and also have LTS and standard kernel as a backup. But whenever one kernel is upgraded by yay, post update hook will update all of them:

( 8/17) Updating linux initcpios...
==> Building image from preset: /etc/mkinitcpio.

I find this behavior risky. If anything goes bad during this step, I may end up with 1 - 3 unused kernels, so having backup will not make any difference.

Is there a way to configure pacman / yay / mkinitcpio to rebuild only upgraded kernel?
If no, is it good idea to request such feature in… (?where?)

Yay updates everything, that is correct.

There is ways to make it so that you can avoid updating a particular package. It is a horrible idea and unsupported in every way as no one recommends or supports partial updates.

Why do you feel this is risky?

How long have you been using Endeavour?

It’s not a good idea to request, but if you wanted partial updates to be supported you would have to take that up with the Arch kernel maintainers. It would basically be asking them to completely change how Arch and pacman works though and I would say there is very nearly a 0% chance of them even entertaining your request.

1 Like

Thank you for all replies :slight_smile: Whenever you build and write kernel images, you overwrite critical component of system. It is only matter of time, when this process will error. Having other kernels as well, may not be sufficient, if for example two latest 6.x kernels will be incompatible with my setup. This is why idea to rebuild only those kernels, which were upgraded, to minimize the risk.

After looking deeper, seems it would be possible with custom pacman hooks. But such solution would be hard to maintain.