More information about uboot and its use on Raspi 4

Ubuntu Support Template

Ubuntu Version:25.10

Desktop Environment (if applicable):
NA

Problem Description:
Trying to understand why the new kernel version isn’t boot and where to look for problems that occur during that process.

Relevant System Information:

This is a Raspi 4 B Rev 1.2 with ubuntu server installed on it.

Screenshots or Error Messages:
This message never changes, even after reboots

Pending kernel upgrade!
Running kernel version:
6.17.0-1006-raspi
Diagnostics:
The currently running kernel version is not the expected kernel version 6.17.0-1011-raspi.

Restarting the system to load the new kernel will not be handled automatically, so you should consider rebooting.

What I’ve Tried:
I’ve looked in raspi community, used ai to troubleshoot. I can’t find any information specific to diagnosing this issue.

Does this Raspberry Pi with Ubuntu server installed on it load to a command
line interface? How long have you had this installation? Do you know how to update/upgrade the operating system?

I think that you need to update/upgrade the system and then reboot. That is what I think that the messages mean.

Regards

I’ve had it for several years and have been upgrading it as I go along.

This message only started recently.

I actually have the newer kernel on the machine, but for some reason it doesn’t boot to it.

I learned recently that it uses uboot to boot the kernel, but I haven’t found any good information yet to narrow down the reason why it isn’t booting the newly installed kernel.

I may have to connect to the console to see what is actually happening or even be able to drop into a uboot console to mess around with some of the commands I have found.

It would be great if someone could confirm this so I quit wasting my time trying to do it without a console.

Typical issue on Pi with Ubuntu. This usually happens because the flash-kernel utility didn’t trigger correctly, or your /boot/firmware partition wasn’t mounted during the last apt upgrade.

The “Pending” message comes from needrestart, which sees a newer kernel in /boot but notices the currently loaded one (the one the Pi actually found at startup) is still the old one.

Try this to sync them manually:

1. First, make sure your boot partition is actually mounted: mount | grep /boot/firmware

2. If it’s there, force a refresh of the boot files:

sudo update-initramfs -u

sudo flash-kernel

3. If flash-kernel gives an error about “Unsupported platform”, you might need to check if your /etc/flash-kernel/dbor/proc/device-tree/model is reporting the correct board version.

4. As a last resort, reinstall the meta-packages to trigger the post-install scripts again:

sudo apt install --reinstall raspi-firmware linux-image-raspi

After that, reboot and check uname -a. If it still shows the old one, check your config.txt in the firmware partition to see if there’s a hardcoded kernel = line pointing to the old version.

I looked for that information in the Raspberry Pi Forum

Thanks for this. Unfortunately, when I upgraded to resolute, installing flash-kernel fails with:

Preconfiguring packages …
Selecting previously unselected package flash-kernel.
(Reading database … 233943 files and directories currently installed.)
Preparing to unpack …/flash-kernel_3.110ubuntu2_arm64.deb …
Unpacking flash-kernel (3.110ubuntu2) …
Setting up flash-kernel (3.110ubuntu2) …
flash-kernel: deferring update (trigger activated)
Processing triggers for man-db (2.13.1-1build1) …
Processing triggers for initramfs-tools (0.150ubuntu8) …
update-initramfs: Generating /boot/initrd.img-6.17.0-1011-raspi
Unsupported platform ‘Raspberry Pi 4 Model B Rev 1.2’.
run-parts: /etc/initramfs/post-update.d//flash-kernel exited with return code 1
dpkg: error processing package initramfs-tools (–configure):
old initramfs-tools package postinst maintainer script subprocess failed with exit status 1
Errors were encountered while processing:
initramfs-tools
needrestart is being skipped since dpkg has failed
Error: Sub-process /usr/bin/dpkg returned an error code (1)

However, this issue has been occurring before I upgraded to resolute…so now flash-kernel won’t install.

Yes, I know I’m jumping the gun a little, so I might have brought this problem onto myself. :slight_smile:

So in order to install some of the other packages, I’ve had to remove flash-kernel.

I do have a backup of my installation before I upgraded, so could start over and try your idea with my original setup.

Is there a way to do this “manually”?

It is a problem with my particular installation. I was able to use a fresh install of 25.10 and then upgrade to resolute…it updated the kernel properly.

I’m still looking for ways to troubleshoot the process, but now I understand better way to look.

Update: After using @marcelstevano advice, I started looking closer into the issue. Through some issue with my upgrade path, I needed to load flash-kernel-piboot, it uninstalled flash-kernel and that fixed the issue.

So while I was wanting to “watch” the uboot process, the real place to look was flash-kernel.

Thanks for the ideas.

1 Like

One more item. I found a tool called piboot-try. This tool seems to manage the A/B boot process that the pi uses.

This topic was automatically closed 18 hours after the last reply. New replies are no longer allowed.