Discussion:
How can I tell Debian on a Raspberry Pi 4B (4GB) which kernel image to load at boot time?
(too old to reply)
Rick Thomas
2023-08-02 10:20:01 UTC
Permalink
I have a set of three Raspberry-Pi 4B (4GB) machines. They all are running the Debian for Rpi from [1].

They all were happily running the kernel from package "linux-image-6.1.0-9-arm64". But, recently, a passing "apt upgrade" installed "linux-image-6.1.0-10-arm64" on them. On all three of them, the "needrestart" command pointed out that there was a new kernel and I needed to reboot. On two of them, I rebooted and it came up running the new kernel (6.1.0-10). On the third, however, reboot came up running the old kernel (6.1.0-9) ?!? The only difference that I can think of between the pair where the upgrade worked and the one where the upgrade didn't work, is that the singleton had been running Bullseye and was upgraded in-place to Bookworm, while the other two had been initially installed with Bookworm. So maybe there was something left-over from Bullseye that caused it?

So, the bottom line for me is: How can I now tell the boot scripts to use (6.1.0-10) instead of (6.1.0-9) And what do I have to do to make sure this doesn't happen again the next time there's a kernel upgrade?

[1] https://raspi.debian.net/tested-images/

Thanks for any clues you can give me!
Rick
Hank Barta
2023-08-03 13:20:01 UTC
Permalink
I just realized that my reply did not hit the list.

---------- Forwarded message ---------
From: Hank Barta <***@gmail.com>
Date: Wed, Aug 2, 2023 at 9:51 AM
Subject: Re: How can I tell Debian on a Raspberry Pi 4B (4GB) which
kernel image to load at boot time?
To: Rick Thomas <***@pobox.com>


Hi Rick,
I have not experienced that specific issue but have dealt with boot
issues and selecting a particular kernel. The first thing I would try
is 'sudo dpkg-reconfigure linux-image-6.1.0-10-arm64' which should
repeat the processing that installs the kernel and watch for any error
messages.

The other thing to do is to look at '/boot/firmware/config.txt' which
identifies the kernel and initramfs that will be used. The previous
kernel package is present on my system along with the previous initrd
and kernel image.

***@glencoe:/boot/firmware$ ls -l *6.1.0*
-rwxr-xr-x 1 root root 30459880 Aug 1 22:31 initrd.img-6.1.0-10-arm64
-rwxr-xr-x 1 root root 30977672 Feb 28 10:15 initrd.img-6.1.0-9-arm64
-rwxr-xr-x 1 root root 32354240 Aug 1 22:31 vmlinuz-6.1.0-10-arm64
-rwxr-xr-x 1 root root 32350144 Feb 28 10:15 vmlinuz-6.1.0-9-arm64
***@glencoe:/boot/firmware$ grep 6.1.0 config.txt
kernel=vmlinuz-6.1.0-10-arm64
initramfs initrd.img-6.1.0-10-arm64
***@glencoe:/boot/firmware$

Be aware that this file will be overwritten on the next kernel upgrade.

Another possibility is to rerun the command to build the initrd but I
don't know the syntax of that offhand. dpkg-reconfigure should run
that for you.

HTH
Post by Rick Thomas
I have a set of three Raspberry-Pi 4B (4GB) machines. They all are running the Debian for Rpi from [1].
They all were happily running the kernel from package "linux-image-6.1.0-9-arm64". But, recently, a passing "apt upgrade" installed "linux-image-6.1.0-10-arm64" on them. On all three of them, the "needrestart" command pointed out that there was a new kernel and I needed to reboot. On two of them, I rebooted and it came up running the new kernel (6.1.0-10). On the third, however, reboot came up running the old kernel (6.1.0-9) ?!? The only difference that I can think of between the pair where the upgrade worked and the one where the upgrade didn't work, is that the singleton had been running Bullseye and was upgraded in-place to Bookworm, while the other two had been initially installed with Bookworm. So maybe there was something left-over from Bullseye that caused it?
So, the bottom line for me is: How can I now tell the boot scripts to use (6.1.0-10) instead of (6.1.0-9) And what do I have to do to make sure this doesn't happen again the next time there's a kernel upgrade?
[1] https://raspi.debian.net/tested-images/
Thanks for any clues you can give me!
Rick
--
Beautiful Sunny Winfield
--
Beautiful Sunny Winfield
Loading...