Why am I booting into an old kernel?

sudo clr-boot-manager list-kernels gives me:

* org.clearlinux.native.5.3.7-853
  org.clearlinux.native.5.2.15-834

Which seems to indicate 5.3.* as my current kernel, but uname -r tells me it’s actually 5.2.15-834.native. Why would this be?

Try sudo clr-boot-manager update.

While booting, you may also change the default by pressing the d key in the bootloader menu.

OK thanks for the update suggestion - but no effect.

Then in the bootloader menu I’m offered 3 kernels, all 5.2.* variants, no 5.3

(Clear Linux 31380)

Run sudo CBM_DEBUG=1 clr-boot-manager update and post the output from the terminal

[INFO] cbm (../src/bootman/bootman.c:L706): Current running kernel: 5.2.15-834.native
[INFO] cbm (../src/bootman/sysconfig.c:L179): Discovered UEFI ESP: /dev/disk/by-partuuid/edbfe750-8d5f-42a5-a9c2-9c7f02e79c91
[INFO] cbm (../src/bootman/sysconfig.c:L254): Fully resolved boot device: /dev/nvme0n1p1
[DEBUG] cbm (../src/bootman/bootman.c:L120): shim-systemd caps: 0x26, wanted: 0x26
[DEBUG] cbm (../src/bootman/bootman.c:L135): UEFI boot now selected (shim-systemd)
[INFO] cbm (../src/bootman/bootman.c:L431): Checking for mounted boot dir
[DEBUG] cbm (../src/lib/files.c:L577): Directory /boot is not empty, found: EFI
[INFO] cbm (../src/bootman/bootman.c:L439): boot_dir is already mounted: /boot
[DEBUG] cbm (../src/bootman/update.c:L164): Now beginning update_native
[DEBUG] cbm (../src/bootman/update.c:L173): update_native: 2 available kernels
[DEBUG] cbm (../src/bootman/update.c:L191): update_native: Running kernel is (native) ///usr/lib/kernel/org.clearlinux.native.5.2.15-834
[SUCCESS] cbm (../src/bootman/update.c:L205): update_native: Bootloader updated
[SUCCESS] cbm (../src/bootman/update.c:L220): update_native: Repaired running kernel ///usr/lib/kernel/org.clearlinux.native.5.2.15-834
[DEBUG] cbm (../src/bootman/update.c:L230): update_native: Checking kernels for type native
[INFO] cbm (../src/bootman/update.c:L243): update_native: Default kernel for type native is ///usr/lib/kernel/org.clearlinux.native.5.3.7-853
[SUCCESS] cbm (../src/bootman/update.c:L255): update_native: Installed tip for native: ///usr/lib/kernel/org.clearlinux.native.5.3.7-853
[SUCCESS] cbm (../src/bootman/update.c:L269): update_native: Installed last_good kernel (native) (///usr/lib/kernel/org.clearlinux.native.5.2.15-834)
[DEBUG] cbm (../src/bootman/update.c:L280): update_native: Analyzing for type native: ///usr/lib/kernel/org.clearlinux.native.5.3.7-853
[INFO] cbm (../src/bootman/update.c:L288): update_native: not-running: ///usr/lib/kernel/org.clearlinux.native.5.3.7-853
[DEBUG] cbm (../src/bootman/update.c:L291): update_native: Skipping default-native: ///usr/lib/kernel/org.clearlinux.native.5.3.7-853
[DEBUG] cbm (../src/bootman/update.c:L280): update_native: Analyzing for type native: ///usr/lib/kernel/org.clearlinux.native.5.2.15-834
[DEBUG] cbm (../src/bootman/update.c:L285): update_native: Skipping running kernel
[INFO] cbm (../src/bootman/bootman.c:L431): Checking for mounted boot dir
[DEBUG] cbm (../src/lib/files.c:L577): Directory /boot is not empty, found: EFI
[INFO] cbm (../src/bootman/bootman.c:L439): boot_dir is already mounted: /boot
[SUCCESS] cbm (../src/bootman/update.c:L338): update_native: Default kernel for native is ///usr/lib/kernel/org.clearlinux.native.5.3.7-853
[DEBUG] cbm (../src/bootman/update.c:L353): No kernel removals found

Please check df and mount to see if anything is mounted at boot. Particularly want to know if /dev/nvme0n1p1 is mounted anywhere

If nothing is mounted, you may not have an empty /boot dir which makes it unable to mount the ESP there and install the new kernels to it.

Thanks @sunnyflunk - the (unmounted) boot dir had EFI and loader directories in it for some reason. Moving those elsewhere & doing the update again fixed the issue.

That’s a bug, though, it should always be able to mount over any existing files (that’s entirely permitted and normal in Linux).

Right - I thought the problem was that there were dirs in the /boot dir itself (not a mount point), which was preventing clr-boot-manager mounting something there. But then I’m fairly confused about what’s mounted where & why in CL - mount produces quite a list of mount points, most of which I have no idea about.

My issue’s fixed anyway but let me know if I should report something somewhere.

A quick test suggested that any content in /boot resulted in it assuming that the boot dir (ESP) was mounted and unloaded a full install of bootloader and kernels (which will continue to prevent it from being mounted). Part of the issue I think is handling live ISO usage, as clr-boot-manager wants to mount and install to the ESP it booted from (/sys/firmware/efi/vars/LoaderDevicePartUUID*), but you need to install it to the HDD ESP instead.

[INFO] cbm (../src/bootman/bootman.c:L431): Checking for mounted boot dir
[DEBUG] cbm (../src/lib/files.c:L577): Directory /boot is not empty, found: sadfsa.we
[INFO] cbm (../src/bootman/bootman.c:L439): boot_dir is already mounted: /boot
1 Like