You are not logged in.

#1 2026-01-17 17:51

hchiper
Member
From: Belgium
Registered: 2020-07-28
Posts: 788

Keep a specific version of the kernel

When Update Manager updates the kernel, the system only keeps the version from the Q4OS installation .iso image, along with the latest and second-to-last updates.

Currently, the installed versions on my system are linux-image-5.10.0-9-amd64, linux-image-5.10.0-36-amd64, and linux-image-5.10.0-37-amd64. Version "36" is the latest one that isn't affected by the © character issue and my concern is it will be removed when version "38" or later is installed. To ensure it isn't uninstalled, I ran the command to mark it as manually installed (instead of automatic):

$ sudo apt-mark manual linux-image-5.10.0-36-amd64l

I could then check that it was no more marked as automatic:

$ apt list --installed linux-image-5*
linux-image-5.10.0-9-amd64 (...) [installé, local]
linux-image-5.10.0-36    (...) [installé]
linux-image-5.10.0-37-amd64 (...) [installé, automatique]

To test that it works as expected, I tried the same on another computer where Q4OS 5 is installed and where a kernel upgrade was available.
Before the kernel upgrade, the installed kernels were as follow (I marked kernel 40 as manually installed):

$ apt list --installed linux-image-6*
linux-image-6.1.0-27-amd64/now 6.1.115-1 amd64  [installé, local]
linux-image-6.1.0-40-amd64/oldstable-security,now 6.1.153-1 amd64  [installé]
linux-image-6.1.0-41-amd64/oldstable-security,now 6.1.158-1 amd64  [installé, automatique]

And, as expected, after Update Manager had finished the upgrade, the kernel marked as manually installed is still there:

$ apt list --installed linux-image-6*
linux-image-6.1.0-27-amd64/now 6.1.115-1 amd64  [installé, local]
linux-image-6.1.0-40-amd64/oldstable-security,now 6.1.153-1 amd64  [installé]
linux-image-6.1.0-41-amd64/oldstable-security,now 6.1.158-1 amd64  [installé, automatique]
linux-image-6.1.0-42-amd64/oldstable,now 6.1.159-1 amd64  [installé, automatique]

I hope it works for other users too.


Q4OS machine: Samsung R519 - Pentium T4200 2.0 GHz - 4 GB RAM - 500 GB SSD

Offline

#2 2026-01-18 07:36

bin
Member
From: U.K.
Registered: 2016-01-28
Posts: 1,560

Re: Keep a specific version of the kernel

To avoid 'accidental' updating it is better to use apt-mark hold on any package you wish to ensure is not updated by any possible method.

Offline

#3 2026-01-18 11:21

hchiper
Member
From: Belgium
Registered: 2020-07-28
Posts: 788

Re: Keep a specific version of the kernel

Thanks @bin.

Actually I considered both the "hold" and "manual" options. Since linux-image-5.10.0-9-amd64 (which was never uninstalled by "Update Manager") is listed by `apt-mark showmanual` and nothing is shown by `apt-mark showhold`, I decided to mark "5.10.36" as "manual" too, rather than "hold".

I also looked at apt-mark man pages (I translate from French):
- a package marked as manual "will not be suppressed automatically",
- mark a package as hold "will prevent it to be installed, updated or suppressed automatically".
For my usage, I would accept updates (e.g. 5.10.36-xxx to 5.10.36-yyy, in the case they ever happen), which are authorized by the "manual" option but not by the "hold" option.

Is this why "5.10.0-9" is marked as "manual", rather than "hold" as you recommended?
Is there anything related hard-coded in "Update Manager"?

I would appreciate any further information on this if someone could shed some light on it.


Q4OS machine: Samsung R519 - Pentium T4200 2.0 GHz - 4 GB RAM - 500 GB SSD

Offline

#4 2026-01-18 12:18

bin
Member
From: U.K.
Registered: 2016-01-28
Posts: 1,560

Re: Keep a specific version of the kernel

Hmmm.... I don't use Update Manager so cannot advise on that question. However I do know that 'hold' gives a lot more peace of mind - going by experiences a couple of years back. smile.
In the event of a minor update to 5.10.36 being issued, you would see it in an update list and be able to react accordingly - i.e. you keep control.

Offline

#5 2026-01-18 18:27

q4osteam
Q4OS Team
Registered: 2015-12-06
Posts: 6,109
Website

Re: Keep a specific version of the kernel

hchiper wrote:

Is there anything related hard-coded in "Update Manager"?

Update manager simply follows the Apt schema, nothing of the sort is hard-coded into it.

We recommend using "apt-mark manual" because "hold" would be stricter and is not necessary in this case.

Offline

#6 2026-03-15 12:01

hchiper
Member
From: Belgium
Registered: 2020-07-28
Posts: 788

Re: Keep a specific version of the kernel

FYI - Epilogue

The problem described here being solved, I no longer need to keep kernel 5.10.0-36. I therefore executed the following commands sucessively:

$ sudo apt-mark auto linux-image-5.10.0-36-amd64

$ sudo apt --installed list linux-image*
En train de lister... Fait
linux-image-5.10.0-36-amd64/oldoldstable-security,now 5.10.244-1 amd64 [installé, pouvant être supprimé automatiquement]
linux-image-5.10.0-38-amd64/oldoldstable-security,now 5.10.249-1 amd64  [installé, automatique]
linux-image-5.10.0-39-amd64/oldoldstable-security,now 5.10.251-1 amd64  [installé, automatique]
linux-image-5.10.0-9-amd64/now 5.10.70-1 amd64  [installé, local]
linux-image-amd64/oldoldstable-security,now 5.10.251-1 amd64  [installé]

$ sudo apt autoremove
(...)
Les paquets suivants seront ENLEVÉS :
  linux-image-5.10.0-36-amd64
(...)

$ sudo apt --installed list linux-image*
En train de lister... Fait
linux-image-5.10.0-38-amd64/oldoldstable-security,now 5.10.249-1 amd64  [installé, automatique]
linux-image-5.10.0-39-amd64/oldoldstable-security,now 5.10.251-1 amd64  [installé, automatique]
linux-image-5.10.0-9-amd64/now 5.10.70-1 amd64  [installé, local]
linux-image-amd64/oldoldstable-security,now 5.10.251-1 amd64  [installé]

Q4OS machine: Samsung R519 - Pentium T4200 2.0 GHz - 4 GB RAM - 500 GB SSD

Offline

Board footer

Powered by FluxBB