0

I upgraded from Debian11 to D12 and cat /etc/debian_version, KDE Info Center, lsb_release -a and all other ways to show the current Debian version show and showed Debian 12. The upgrade seems to have worked just fine and I have used the system for several months (including several reboots) and over that time upgraded to Debian 12.7. There was never any error / message about the kernel and nothing is asked to be installed when running sudo apt-get dist-upgrade or sudo apt-get upgrade (except sysv-rc-conf).

Despite of all this, I'm apparently running a Linux kernel of version 5 - when running cat /proc/version it returns:

Linux version 5.10.0-17-amd64 ([email protected]) (gcc-10 (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2) #1 SMP Debian 5.10.136-1 (2022-08-13)

Why did this happen? Aren't all methods to see the current Debian version broken if they all show version 12 if I still have a kernel of version 5 and isn't the distro-upgrade process broken as well?

I only found out when my mousewheel broke but should have broken earlier right after upgrading to Debian 12 with Wayland since xbindkeys should not work with Wayland since I then noticed gcc-10 was used here.

apt policy linux-image-amd64 shows:

linux-image-amd64:
  Installed: (none)
  Candidate: 6.1.112-1
  Version table:
     6.10.11-1~bpo12+1 100
        100 http://ftp.XY.debian.org/debian bookworm-backports/main amd64 Packages
     6.1.112-1 500
        500 http://security.debian.org/debian-security bookworm-security/main amd64 Packages
     6.1.106-3 500
        500 http://ftp.XY.debian.org/debian bookworm/main amd64 Packages
6
  • That apt policy linux-image-amd64 output shows that that package is not installed. You likely have only a linux-image-5.10.0-17-amd64 package, at the time possibly pulled as a dependency of linux-image-amd64, but linux-image-amd64 was uninstalled since which means your kernel was never updated past that version. Commented Nov 1, 2024 at 20:28
  • 1
    For the record, current Debian 11 kernel as of writing is 5.10.0-33-amd64 (packages.debian.org/bullseye/linux-image-amd64), so it's likely been a while since you last updated your kernel, likely before you upgraded to Debian 12. Commented Nov 1, 2024 at 20:34
  • Actually, you can see the build date (2022-08-13) in the uname output, so your linux-image-amd64 must have been uninstalled not too long after that. Commented Nov 1, 2024 at 20:40
  • 1
    What type of machine is this? Physical, a full VM, or a "thin" VM (eg OpenVZ or Virtuozzo)? If it's one of the latter types (which many of the cheaper VM providers use) then you don't get to controly our own kernel; it's inherited from the host. If it's a full VM or a physical host then this, of course, doesn't apply; you control your own kernel. Commented Nov 1, 2024 at 21:04
  • @StephenHarris, the fact there's a KDE desktop environment and wayland and attempts to use xbindkeys suggests it's unlikely to be a VM let alone a thin one. Commented Nov 1, 2024 at 21:36

1 Answer 1

2

Users are free to run whichever kernel they want, including kernels they build themselves; so Debian doesn’t impose installing any specific kernel packages. In fact there are many scenarios where no kernel needs to be installed (VPSes, container images, VMs with externally-managed kernels…).

However the situation you were in (where the kernel isn’t upgraded because the linux-image-amd64 package isn’t installed) is mentioned in the release notes’ section on upgrading the kernel. When upgrading Debian it’s always best to follow the release notes.

10
  • Shouldn't a new kernel be installed by default when upgrading though or the user at least be prompted about it? Could this problem have arisen because of this? I think with the situation you refer to that I did not have linux-image-amd64 installed. Please clarify if that's not what you meant. So I will sudo apt-get install linux-image-amd64 and then run the update & upgrade commands to install the latest kernel before rebooting. Commented Nov 1, 2024 at 22:52
  • In Debian, upgrades from one release to the next are managed by apt in the same way as regular upgrades, so prompting for a kernel there would mean prompting for one all the time; but there are many use-cases where kernels aren’t even needed. The user is prompted about the kernel, in the release notes. I know it’s common practice to ignore them, but they are an important part of the upgrade. The order of your commands is wrong: you should run sudo apt update && sudo apt install linux-image-amd64, no need for apt upgrade. Commented Nov 2, 2024 at 8:05
  • 1
    @mYnDstrEAm Re: "Could this problem have arisen because of this?". Yes, if at the time you run that command, you're not booted into the latest kernel (the one the linux-image-amd64 meta package currently depends upon) then that will uninstall that lastest kernel along with the meta-package. Personally, I would use aptitude for this kind of thing and select the packages to remove by hand and review the result before applying. Commented Nov 2, 2024 at 9:26
  • @StéphaneChazelas This likely answers the question about why this occurred. The command there was helpful to clear up partition disk space (which if not cleared causes the upgrade to fail or worse things) and it didn't warn about removing an essential package. It seems to have a different effect on Ubuntu but many Debian users may also find that question and this command as answer. How do you suggest this answer to be changed, just appending "Do not run this command if you run Debian." or some alternative command that also works on Debian? Commented Nov 3, 2024 at 9:17
  • You'd want to make sure you don't remove the latest kernel. To save space, that's counter productive as it would have to be reinstalled. Here, you would have had a message by apt with: "this will remove such and such" including the metapackage. Those prompts are common with apt, so you may just have ignored it without realising it would remove linux-image-amd64. I've seen much worse like people blindly removing the whole desktop stack when trying to remove a core desktop library. Commented Nov 3, 2024 at 9:22

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.