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

I have same error

/boot/loader/entries # ls -l
total 20
-rw-r–r-- 1 root root 538 29 юли 04:04 Clear-linux-current-5.8.0.rc7-37.conf
-rw-r–r-- 1 root root 535 12 сеп 00:02 Clear-linux-lts2019-5.4.64-64.conf
-rw-r–r-- 1 root root 539 11 сеп 21:24 Clear-linux-mainline-5.8.0.rc7-34.conf
-rw-r–r-- 1 root root 545 22 юли 00:57 Clear-linux-native-5.2.15-834.conf
-rw-r–r-- 1 root root 534 11 сеп 00:28 Clear-linux-native-5.8.8-984.conf

whathever i try no success.

Self reporting solution.

using command

lsblk -po NAME,SIZE,VENDOR,MODEL,TRAN,TYPE,PARTLABEL,MOUNTPOINT`
NAME SIZE VENDOR MODEL TRAN TYPE PARTLABEL MOUNTPOINT
/dev/sda 465,8G ATA HGST_HTS545050A7E680 sata disk
├─/dev/sda1 142M part EFI
├─/dev/sda2 244M part linux-swap [SWAP]
└─/dev/sda3 465,4G part / /

important is what you see after EFI partition
if there is nothing … nothing work
next step
THIS IS IMPORTANT
make copy of “/boot” folder
and then mount “EFI” partition to “/boot”
example

mount /dev/sda1 /boot
now lets check
lsblk -po NAME,SIZE,VENDOR,MODEL,TRAN,TYPE,PARTLABEL,MOUNTPOINT
NAME SIZE VENDOR MODEL TRAN TYPE PARTLABEL MOUNTPOINT
/dev/sda 465,8G ATA HGST_HTS545050A7E680 sata disk
├─/dev/sda1 142M part EFI /boot
├─/dev/sda2 244M part linux-swap [SWAP]
└─/dev/sda3 465,4G part / /

next step
restore content of backuped BOOT folder to existing /boot folder

List kernels

clr-boot-manager list-kernels

Select kernel

clr-boot-manager set-kernel org.clearlinux.native.5.8.9-986

Update bootloader

clr-boot-manager update

Now some of developers to fix this simple BUG
for example clr-boot-manager to check mount points and auto mount if needed.

p.s.
after reboot all will be as before no mount static copy of folder etc. so next time reproduse procedure from begining
except developer to fix error :wink:

Hi, can someone help me with the same problem? I’ve tried all the steps posted but I’m booting into 5.10.12-1021.native instead of 5.10.16-1025

The missing step in above instructions is to empty /boot after making a copy of the directory.

From systemd-gtp-auto-generator(8):
Mount and automount units for the EFI System Partition (ESP) are generated on EFI systems. The ESP is mounted to /boot/ (except if an Extended Boot Loader partition exists, see below), unless a mount point directory /efi/ exists, in which case it is mounted there. Since this generator creates an automount unit, the mount will only be activated on-demand, when accessed. On systems where /boot/ (or /efi/ if it exists) is an explicitly configured mount (for example, listed in fstab(5)) or where the /boot/ (or /efi/) mount point is non-empty, no mount units are generated.

No bugs or errors to fix, all is working as designed.

2 Likes

Thanks, that did it.