[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Need clarifications about how to deal with the installed problematic kernel, linux-image-6.1.0-14-amd64 (6.1.64-1)



On 10 Dec 2023 13:48 +0100, from rewefie@gmx.com (Stella Ashburne):
> I highlight linux-image-6.1.0-13-amd64 and press Enter.
> 
> After supply the decryption password and entering my desktop
> environment, I did the following:
> 
> cat /etc/debian_user
> *Result* is 12.3, even though I boot using the previous kernel,
> linux-image-6.1.0-13-amd64
> 
> uname -a
> *Result* is linux-image-6.1.0-13-amd64

This combination is expected under the circumstances, assuming that
you mean /etc/debian_version. Booting into a different kernel does not
change the files installed by the base-files package, which is where
/etc/debian_version comes from; if you want to, you can verify this
with dpkg -S /etc/debian_version.


> I remove the corrupt linux-image-6.1.0-14-amd64 by typing the
> following commands in a terminal. They are:
> 
> dpkg --search /boot/vmlinuz-*
> 
> sudo apt-get remove linux-image-6.1.0-14-amd64
> 
> sudo update-grub
> 
> sudo shutdown -r now
> 
> Is the above the correct way to remove the most recent/latest kernel?

Seems reasonable, _because_ the problematic kernel is a new package.
If it had been an upgraded version of the same package, a similar fix
would have been somewhat more involved.


> Question #2a
> 
> Some users opine that after removing linux-image-6.1.0-14-amd64, I
> should re-install linux-image-6.1.0-13-amd64. Why should I
> re-install linux-image-6.1.0-1-amd64?

Probably because it's an easy way to ensure that your bootloader
configuration is accurate. If what you showed above completed without
any warnings or other troublesome output, I would expect everything to
be fine.


> Question #2b
> 
> Suppose I need to re-install linux-image-6.1.0-13-amd64 but some users told me that it is no longer in the repos.
> 
> I can just download it manually by using the following link:
> 
> https://packages.debian.org/bookworm/amd64/linux-image-6.1.0-13-amd64/download
> 
> And then in a terminal, I type the commands:
> 
> sudo dpkg -i linux-image-6.1.0-13-amd64
> 
> sudo update-grub
> 
> sudo shutdown -r now
> 
> Is the above the correct way to install kernels that are not in the official repos?

Not quite, because dpkg -i wants a file path, not a package name
(that's for apt/apt-get). Also dpkg won't automatically pull in any
dependencies that may have been uninstalled after the upgrade, or
necessarily handle any DKMS modules that would need to be recompiled
for the older kernel version, so you'd need to take care with those.

Someone on the Fediverse posted an apt preferences recipe to block the
broken kernel package from installation. I haven't tested it, but it
looks reasonable:

> create a file:
> 
> /etc/apt/preferences.d/buggy-kernel
> 
> with the contents:
> # avoid kernel with ext4 bug 
> # 1057843
> Package: linux-image-*
> Pin: version 6.1.64-1
> Pin-Priority: -1

Copied from https://octodon.social/@alienghic/111552556796482609

-- 
Michael Kjörling                     🔗 https://michael.kjorling.se
“Remember when, on the Internet, nobody cared that you were a dog?”


Reply to: