Updated, seems to have loaded an old kernel, boot now fails

Latest update will not boot.
It seems an update loaded an old kernel.

I ran “sudo apt update” and “sudo apt full-upgrade”, and it loaded 5.15.0-112-generic in to /boot with a newer timestamp than 6.5.0-35-generic. I’m using rEFInd to boot, so it uses 5.15.0-112-generic for default kernel, which fails.

Running:
“sudo apt-get -s install linux-image-generic”, returns:
“linux-image-generic is already the newest version (5.15.0.112.112).”

Why did an sudo apt full-upgrade load an old kernel?
Thoughts?

Here are the repositories in /etc/apt/sources.list and /etc/apt/sources.list.d

/etc/apt/sources.list:deb Index of /ubuntu jammy main restricted universe multiverse
/etc/apt/sources.list:deb Index of /ubuntu jammy-security main restricted universe multiverse
/etc/apt/sources.list:deb Index of /ubuntu jammy-updates main restricted universe multiverse
/etc/apt/sources.list.d/mkusb-ubuntu-ppa-jammy.list:deb Index of /mkusb/ppa/ubuntu jammy main
/etc/apt/sources.list.d/neon.list:deb Index of /user jammy main
/etc/apt/sources.list.d/neon.list:deb-src Index of /user jammy main
/etc/apt/sources.list.d/org.kde.neon.net.launchpad.ppa.mozillateam.list:deb Index of /mozillateam/ppa/ubuntu jammy main
/etc/apt/sources.list.d/preinstalled-pool.list:deb [arch=amd64] file:/var/lib/preinstalled-pool/ jammy main restricted universe multiverse
/etc/apt/sources.list.d/signal-xenial.list:deb [arch=amd64 signed-by=/usr/share/keyrings/signal-desktop-keyring.gpg] https://updates.signal.org/desktop/apt/ xenial main

Ok, what am I missing?
I just did a fresh virtual machine install.
Fresh install: uname -r “6.5.0-35-generic”
And, sudo pkcon upgrade wants to install " linux-generic-5.15.0.112.112.amd64"

If you are using KDE Neon, your case have some similarities with mine:

I have installed KDE Neon last March, 1st (after Plasma 6 release), and it came with both Kernel 6.5.0 and 5.15.0 – and I have been unable to remove 5.15.0 using Synaptic (which is just an apt front-end).

I still didn’t upgrade it this week. – If it will try to upgrade just 5.15.0, I will not allow it.

The last upgraded is 6.5.0-35, so it is what my Grub loads.

I don’t know if 5.15.0 has ever been the “latest” or “newest” to be upgraded at any moment.

My last Kernel upgrade was Sunday, May, 26, when both have been upgraded.

Note that I had done another KDE Neon installation, back in 2023 November, and it came with these 2 Kernels, too.

Thanks, that’s good to know. I assumed I screwed something up, I was messing with other stuff around the time of the update.

My guess is grub probably knows to use the 6.5.0 kernel. rEFInd goes only by date stamp of what’s in /boot, so for whatever reason 5.15.0 got put in /boot during this last update, rEFInd started using that because its date is newer. I’ve fixed it all in the rEFInd config file for now. I may just try “touching” the 5.15.0 stuff to make it older, and hopefully that’ll fix it “better”…until upgrade does it again?

1 Like

You may reinstall last Kernel 6.5.0’s revision.

Synaptic has the option to right-click any installed package and select “reinstall”.

If Synaptic has this option, sure apt has it too, because Synaptic is just a front-end to apt, but I don’t know how to do it with apt.

Ubuntu LTS releases start with a kernel, then do see upgrades to newer ones from later releases via their HWE system. The 5.15 is the original “GA” one for 22.04.

On *buntu, the kernel version you start with depends on the age of the ISO image used for the install. The first two ISO releases come with the GA kernel, and the updated kernels are added later (note that here, the 5.15 is not replaced, it is still available.) Later images only include the current kernel (the 6.5), though one can manually add the GA if desired.

neon includes both the GA and the current HWE kernels, so users start out with two kernel versions ootb. This is good as a fallback. The 5.15 version is still fully supported by Ubuntu, so it sees regular updates along with the current 6.5.

On a normal boot setup, users will have the current kernel as the default boot choice, and possibly the previous version of that, as well as the 5.15. Most distros have somewhat similar schemes for this. On. *buntu, or at least deb-based systems, apt keeps up to three kernels around by default, so neon users can see 2 versions of the 6.5 and one of the 5.15 in Grub.

I will guess that rEFInd doesn’t know which kernel to make default when new versions of the older ones are installed from normal updates?

It is really easy to remove the GA kernel track if you don’t want it.

Uninstall the meta-package linux-image-generic, which will allow a run of apt autoremove to uninstall the 5.15 kernel and related packages.

This command will remove the meta-packages for the GA kernel and headers:
sudo apt remove linux-{image,headers}-generic
Then, a sudo apt autoremove will offer to remove the 5.15 stuff.

Note that this meta-package may sound serious and unsafe to remove, but it is simply a package that depends on the GA kernels and components. The important one is linux-image-generic-hwe-22.04 which is for the current HWE kernels.

sources
https://wiki.ubuntu.com/Kernel/LTSEnablementStack
https://ubuntu.com/about/release-cycle#ubuntu-kernel-release-cycle
and others

1 Like

Thanks for the detailed explaination, it all makes sense now. 5.15 must have gotten updated, and hence has a newer date than 6.5. Date stamp is the only thing rEFIind goes by, so.

I’ll remove the meta package, 5.15 isn’t working anyway, so it’s useless as a fallback for me.

Thanks again!

1 Like

For the record, I had to also run “sudo apt purge linux-modules-5.15.0-112-generic” to get rid of all the 5.15 stuff.

Thanks again for the help!

1 Like