Message "A reboot is required to finalise a recent kernel upgrade" does not go away

Required Information

  • DietPi version | G_DIETPI_VERSION_CORE=9
    G_DIETPI_VERSION_SUB=11
    G_DIETPI_VERSION_RC=2
    G_GITBRANCH=‘master’
    G_GITOWNER=‘MichaIng’

  • Distro version | bookworm 1

  • Kernel version | Linux Cloud 5.10.103-v8+ #1529 SMP PREEMPT Tue Mar 8 12:26:46 GMT 2022 aarch64 GNU/Linux

  • Architecture | armhf

  • SBC model | RPi 4 Model B (aarch64)

  • Power supply used | 5,1V 3A

  • SD card used | Samsung Portable SSD

Steps to reproduce

After a dietpi Update I get the message “reboot: A reboot is required to finalise a recent kernel upgrade”. I did a rebbot with the rebbot command. But this did not work. Then I disconnected the power from the raspberrypi and rebooted it. But this did also not work. The message does not go away.

You have SD card as well as SSD connected? You are booting from SD card or SSD?

I only have SSD. I boot from SSD

Can you share following

lsblk -o name,fstype,label,size,ro,type,mountpoint,partuuid,uuid
df -h
NAME FSTYPE LABEL   SIZE RO TYPE MOUNTPOINT PARTUUID                             UUID
sda               465.8G  0 disk                                                
├─sda1
│    vfat   boot    256M  0 part /boot/firm 9730496b-01                          5DE4-665C
└─sda2
     ext4   rootfs
                  465.5G  0 part /          9730496b-02                          7295bbc3-bbc2-4267-9fa0-099e10ef5bf0
Filesystem      Size  Used Avail Use% Mounted on
/dev/root       459G  213G  227G  49% /
devtmpfs        1.9G     0  1.9G   0% /dev
tmpfs           1.9G     0  1.9G   0% /dev/shm
tmpfs           769M  8.5M  761M   2% /run
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           1.9G     0  1.9G   0% /tmp
tmpfs            50M   16K   50M   1% /var/log
/dev/sda1       253M   61M  192M  25% /boot/firmware

@Joulinar do you need any more information?

can you share following as well

uname -a
ls -la /boot/
Linux Cloud 5.10.103-v8+ #1529 SMP PREEMPT Tue Mar 8 12:26:46 GMT 2022 aarch64 GNU/Linux
total 17425
drwxr-xr-x  4 root root    4096 Mar 15 14:59 .
drwxr-xr-x 18 root root    4096 Mar 15 14:58 ..
-rw-r--r--  1 root root      83 Jan 27 18:19 System.map-6.6.74+rpt-rpi-v7l
lrwxrwxrwx  1 root root      20 Mar 15 14:57 cmdline.txt -> firmware/cmdline.txt
-rw-r--r--  1 root root  229751 Jan 27 18:19 config-6.6.74+rpt-rpi-v7l
lrwxrwxrwx  1 root root      19 Mar 15 14:57 config.txt -> firmware/config.txt
drwxr-xr-x  4 root root    4096 Feb 25 21:36 dietpi
-rwxr-xr-x  1 root root   18092 May 29  2021 dietpi-LICENSE.txt
-rwxr-xr-x  1 root root   13821 May 29  2021 dietpi-README.md
-rw-r--r--  1 root root   14407 Dec 30 08:52 dietpi.txt
drwxr-xr-x  4 root root    5120 Jan  1  1970 firmware
-rw-r--r--  1 root root 9644515 Mar 15 14:59 initrd.img-6.6.74+rpt-rpi-v7l
-rw-r--r--  1 root root 7887536 Jan 27 18:19 vmlinuz-6.6.74+rpt-rpi-v7l

ok the new kernel is located to correct place, but the system still gets the old kernel from somewhere :thinking:

can you shore following, maybe we are able to find the location

mount | grep boot
cat /etc/fstab

Do you use anything like Berryboot?

/dev/sda1 on /boot/firmware type vfat (rw,noatime,lazytime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,errors=remount-ro)
# You can use "dietpi-drive_manager" to setup mounts.
# NB: It overwrites and re-creates physical drive mount entries on use.
#----------------------------------------------------------------
# NETWORK
#----------------------------------------------------------------


#----------------------------------------------------------------
# TMPFS
#----------------------------------------------------------------
tmpfs /tmp tmpfs size=1938M,noatime,lazytime,nodev,nosuid,mode=1777
tmpfs /var/log tmpfs size=50M,noatime,lazytime,nodev,nosuid

#----------------------------------------------------------------
# MISC: ecryptfs, vboxsf (VirtualBox shared folder), gluster, bind mounts
#----------------------------------------------------------------


#----------------------------------------------------------------
# SWAP SPACE
#----------------------------------------------------------------


#----------------------------------------------------------------
# PHYSICAL DRIVES
#----------------------------------------------------------------
PARTUUID=9730496b-02 / ext4 noatime,lazytime,rw 0 1
PARTUUID=9730496b-01 /boot/firmware vfat noatime,lazytime,rw 0 2

No I don´t use Berryboot or something like this.

It actually looks quite good. Very strange.

Probably the system has had this behavior for some time. Because the kernel 5.10 has not been used for RPI devices running Debian Bookworm for ages

Can you show the installed kernel packages

dpkg -l | grep linux-image

And the contents of the firmware directory

ls -la /boot/firmware
dpkg -l | grep linux-image
ii  linux-image-6.6.74+rpt-rpi-v7l 1:6.6.74-1+rpt1                armhf        Linux 6.6 for Raspberry Pi v7l, Raspberry Pi
ii  linux-image-rpi-v7l            1:6.6.74-1+rpt1                armhf        Linux for Raspberry Pi v7l (meta-package)
ls -la /boot/firmware
total 60855
drwxr-xr-x 4 root root    5120 Jan  1  1970  .
drwxr-xr-x 4 root root    4096 Mar 15 14:59  ..
-rwxr-xr-x 1 root root   14336 Jan  1  1980  FSCK0000.REC
-rwxr-xr-x 1 root root   14336 Jan  1  1980  FSCK0001.REC
-rwxr-xr-x 1 root root     512 Jan  1  1980  FSCK0002.REC
-rwxr-xr-x 1 root root  671744 Jan  1  1980  FSCK0003.REC
-rwxr-xr-x 1 root root     512 Jan  1  1980  FSCK0004.REC
-rwxr-xr-x 1 root root    1024 Jan  1  1980  FSCK0005.REC
-rwxr-xr-x 1 root root   14336 Jan  1  1980  FSCK0006.REC
-rwxr-xr-x 1 root root     512 Jan  1  1980  FSCK0007.REC
-rwxr-xr-x 1 root root   14336 Jan  1  1980  FSCK0008.REC
-rwxr-xr-x 1 root root  642048 Jan  1  1980  FSCK0009.REC
-rwxr-xr-x 1 root root     512 Jan  1  1980  FSCK0010.REC
-rwxr-xr-x 1 root root   14336 Jan  1  1980  FSCK0011.REC
-rwxr-xr-x 1 root root    1594 Mar 15 14:58  LICENCE.broadcom
drwxr-xr-x 2 root root     512 Dec 29 21:05 'System Volume Information'
-rwxr-xr-x 1 root root   30696 Jan 27 18:19  bcm2708-rpi-b-plus.dtb
-rwxr-xr-x 1 root root   30055 Jan 27 18:19  bcm2708-rpi-b-rev1.dtb
-rwxr-xr-x 1 root root   30393 Jan 27 18:19  bcm2708-rpi-b.dtb
-rwxr-xr-x 1 root root   30012 Jan 27 18:19  bcm2708-rpi-cm.dtb
-rwxr-xr-x 1 root root   31873 Jan 27 18:19  bcm2708-rpi-zero-w.dtb
-rwxr-xr-x 1 root root   30006 Jan 27 18:19  bcm2708-rpi-zero.dtb
-rwxr-xr-x 1 root root   32390 Jan 27 18:19  bcm2709-rpi-2-b.dtb
-rwxr-xr-x 1 root root   32181 Jan 27 18:19  bcm2709-rpi-cm2.dtb
-rwxr-xr-x 1 root root   32519 Jan 27 18:19  bcm2710-rpi-2-b.dtb
-rwxr-xr-x 1 root root   35346 Jan 27 18:19  bcm2710-rpi-3-b-plus.dtb
-rwxr-xr-x 1 root root   34711 Jan 27 18:19  bcm2710-rpi-3-b.dtb
-rwxr-xr-x 1 root root   32298 Jan 27 18:19  bcm2710-rpi-cm3.dtb
-rwxr-xr-x 1 root root   33688 Jan 27 18:19  bcm2710-rpi-zero-2-w.dtb
-rwxr-xr-x 1 root root   33688 Jan 27 18:19  bcm2710-rpi-zero-2.dtb
-rwxr-xr-x 1 root root   56108 Jan 27 18:19  bcm2711-rpi-4-b.dtb
-rwxr-xr-x 1 root root   56112 Jan 27 18:19  bcm2711-rpi-400.dtb
-rwxr-xr-x 1 root root   38357 Jan 27 18:19  bcm2711-rpi-cm4-io.dtb
-rwxr-xr-x 1 root root   56654 Jan 27 18:19  bcm2711-rpi-cm4.dtb
-rwxr-xr-x 1 root root   53395 Jan 27 18:19  bcm2711-rpi-cm4s.dtb
-rwxr-xr-x 1 root root   52476 Mar 15 14:58  bootcode.bin
-rwxr-xr-x 1 root root     101 Jan  6  2022  cmdline.txt
-rwxr-xr-x 1 root root    2826 Feb 14  2022  config.txt
-rwxr-xr-x 1 root root    7328 Mar 15 14:58  fixup.dat
-rwxr-xr-x 1 root root    5459 Mar 15 14:58  fixup4.dat
-rwxr-xr-x 1 root root    3231 Mar 15 14:58  fixup4cd.dat
-rwxr-xr-x 1 root root    8455 Mar 15 14:58  fixup4db.dat
-rwxr-xr-x 1 root root    8453 Mar 15 14:58  fixup4x.dat
-rwxr-xr-x 1 root root    3231 Mar 15 14:58  fixup_cd.dat
-rwxr-xr-x 1 root root   10298 Mar 15 14:58  fixup_db.dat
-rwxr-xr-x 1 root root   10296 Mar 15 14:58  fixup_x.dat
-rwxr-xr-x 1 root root 9644515 Mar 15 14:59  initramfs7l
-rwxr-xr-x 1 root root     145 May  7  2021  issue.txt
-rwxr-xr-x 1 root root 6016088 May 16  2023  kernel.img
-rwxr-xr-x 1 root root 6366112 May 16  2023  kernel7.img
-rwxr-xr-x 1 root root 7887536 Mar 15 14:59  kernel7l.img
-rwxr-xr-x 1 root root 7916371 May 16  2023  kernel8.img
drwxr-xr-x 2 root root   30720 Mar 15 14:58  overlays
-rwxr-xr-x 1 root root 2987424 Mar 15 14:58  start.elf
-rwxr-xr-x 1 root root 2263328 Mar 15 14:58  start4.elf
-rwxr-xr-x 1 root root  813596 Mar 15 14:58  start4cd.elf
-rwxr-xr-x 1 root root 3761768 Mar 15 14:58  start4db.elf
-rwxr-xr-x 1 root root 3010984 Mar 15 14:58  start4x.elf
-rwxr-xr-x 1 root root  813596 Mar 15 14:58  start_cd.elf
-rwxr-xr-x 1 root root 4833736 Mar 15 14:58  start_db.elf
-rwxr-xr-x 1 root root 3734632 Mar 15 14:58  start_x.elf

I ask @MichaIng to have a look

The v7l kernel is installed, but the v8 kernel is used. Weird about it, our code selects linux-image-rpi-v7l or linux-image-rpi-v8 based on the suffix of the currently used kernel derived from uname -r. This very command shows 5.10.103-v8+ in your case, which should have resulted in linux-image-rpi-v8 being installed in any case, while linux-image-rpi-v7l should not have been an option even. The latter is only offered if 32-bit kernel is enforced via arm_64bit=0 in /boot/config.txt, but then your RPi 4 would not load the v8+ kernel :thinking:.

Can you show the output of this:

grep 'arm_64bit' /boot/config.txt

This command did not work.
But here is the content of this file.

# Docs: https://github.com/raspberrypi/documentation/blob/227e99257376b67d01a642261b01fc8c6a03a9f8/configuration/config-txt/README.md
# Overlays: https://github.com/raspberrypi/firmware/blob/80f23d4be56a481938b0239d565f46c94b1f2dd4/boot/overlays/README

#-------Display---------
# Max allocated framebuffers: Set to "0" in headless mode to reduce memory usage
# - Defaults to "2" on RPi4 and "1" on earlier RPi models
#max_framebuffers=0

# If you get no picture, set the following to "1" to apply most compatible HDMI settings.
#hdmi_safe=1

# Uncomment to adjust the HDMI signal strength if you have interferences, blanking, or no display.
# - Values from "0" to "11" are allowed, use values above "7" only if required, e.g. with very long
# - Default on first RPi1 A/B is "2", else "5", on RPi4 this setting is ignored.
#config_hdmi_boost=5

# Uncomment if HDMI display is not detected and composite is being outputted.
#hdmi_force_hotplug=1

# Uncomment to disable HDMI even if plugged, e.g. to force composite output.
#hdmi_ignore_hotplug=1

# Uncomment to force a console size. By default it will be display's size minus overscan.
#framebuffer_width=1280
#framebuffer_height=720

# Uncomment to enable SDTV/composite output on RPi4. This has no effect on previous RPi models.
#enable_tvout=1
# SDTV mode
#sdtv_mode=0

# Uncomment to force a specific HDMI mode (this will force VGA).
#hdmi_group=1
#hdmi_mode=1

# Uncomment to force an HDMI mode rather than DVI. This can make audio work in DMT (computer monito
#hdmi_drive=2

# Set "hdmi_blanking=1" to allow the display going into standby after 10 minutes without input.
# With default value "0", the display shows a blank screen instead, but will not go into standby.
# NB: With "1" some applications (e.g. Kodi, OMXPlayer) cannot prevent display standby due to missi
#hdmi_blanking=1

# Set to "1" if your display has a black border of unused pixels visible.
disable_overscan=1

# Uncomment the following to adjust overscan. Use positive numbers if console goes off screen, and
#overscan_left=16
#overscan_right=16
#overscan_top=16
#overscan_bottom=16

# Rotation
#display_hdmi_rotate=0
#lcd_rotate=0

#-------RPi camera module-------
#start_x=1
#disable_camera_led=1

#-------GPU memory splits-------
gpu_mem_256=16
gpu_mem_512=16
gpu_mem_1024=16

#-------Boot splash screen------
disable_splash=1

#-------Onboard sound-----------
dtparam=audio=off

#-------I2C-------------
#dtparam=i2c_arm=off
#dtparam=i2c_arm_baudrate=100000

#-------SPI-------------
#dtparam=spi=off

#-------Serial/UART-----
# NB: Enabled for 1st run only. If you want to keep this setting, please set CONFIG_SERIAL_CONSOLE_
#core_freq=500
enable_uart=0

#-------Overclock-------
temp_limit=75
initial_turbo=20

#over_voltage=0
#arm_freq=1500
#core_freq=500

#over_voltage_min=0
#arm_freq_min=300
#core_freq_min=250
#sdram_freq_min=400
dtoverlay=disable-wifi

looks as if the value is not active. You can enter the following in /boot/config.txt and restart the system.

#disable 64bit mode on 32bit system
arm_64bit=0

That was the problem. After a reboot the message was gone.