Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.kernel > #91809 > unrolled thread

How is "keep two last kernels" policy implemented?

Started byThibi <thierry.bissler@gmail.com>
First post2026-03-27 06:20 +0100
Last post2026-03-30 16:20 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.debian.kernel


Contents

  How is "keep two last kernels" policy implemented? Thibi <thierry.bissler@gmail.com> - 2026-03-27 06:20 +0100
    Re: How is "keep two last kernels" policy implemented? Ben Hutchings <ben@decadent.org.uk> - 2026-03-30 16:20 +0200

#91809 — How is "keep two last kernels" policy implemented?

FromThibi <thierry.bissler@gmail.com>
Date2026-03-27 06:20 +0100
SubjectHow is "keep two last kernels" policy implemented?
Message-ID<MD7LX-aBsW-1@gated-at.bofh.it>

[Multipart message — attachments visible in raw view] — view raw

Hello team,

I can't find any technical documentation about how Debian decides to keep two kernels, and which ones. I am particularly interested in understanding how the "manual" or "automatic" package installation flag may, or may not, influence the policy? 

Long story: something happened on my Trixie 13.4 which resulted in both current and previous kernels to become unusable. I asked apt to install the N-2 kernel and it worked, I can boot on it. Now I have:

* Kernel N (last) - automatic - broken 
* Kernel N-1 (before last) - automatic - broken
* Kernel N-2 - manual - working 

I wonder what will happen when a new kernel becomes available, and how I can have some influence on the automatic selection. 

Please could you point me to some documentation explaining the details? 

Thanks in advance, and a lot of kudos for your dedicated work! 

Best, 

Thibi

Thierry Bissler

La liberté de parole ne s'use que quand on ne s'en sert pas. Signez et cryptez vos messages avec OpenPGP.

[toc] | [next] | [standalone]


#91856

FromBen Hutchings <ben@decadent.org.uk>
Date2026-03-30 16:20 +0200
Message-ID<MElDb-bqB8-3@gated-at.bofh.it>
In reply to#91809

[Multipart message — attachments visible in raw view] — view raw

On Fri, 2026-03-27 at 06:15 +0100, Thibi wrote:
> Hello team,
> 
> I can't find any technical documentation about how Debian decides to keep two kernels, and which ones. I am particularly interested in understanding how the "manual" or "automatic" package installation flag may, or may not, influence the policy? 
> 
> Long story: something happened on my Trixie 13.4 which resulted in both current and previous kernels to become unusable. I asked apt to install the N-2 kernel and it worked, I can boot on it. Now I have:
> 
> * Kernel N (last) - automatic - broken 
> * Kernel N-1 (before last) - automatic - broken
> * Kernel N-2 - manual - working 
> 
> I wonder what will happen when a new kernel becomes available, and how I can have some influence on the automatic selection. 
> 
> Please could you point me to some documentation explaining the details? 
[...]

APT has a special case for kernel packages, which is configurable. 
Search for "kernel" on
<https://manpages.debian.org/trixie/apt/apt.conf.5.en.html>.

Ben.

-- 
Ben Hutchings
Life would be so much easier if we could look at the source code.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.kernel


csiph-web