Understanding clr-boot-manager and kernel packages (here, full /boot)

Hi!

I am trying to understand how the kernel packages work and how the kernels then end up (or better how they best should be removed from /boot and how clr-boot-manager defines which should actually be the preferred kernel to boot after an upgrade.

The boot partition in this system is only 250mb, so that ran full and clr-boot manager failed.

clr-boot-manager update

^M[FATAL] cbm (…/src/bootman/bootman.c:L967): Failed to install initrd ///usr/lib/initrd.d/00-early-ucode.cpio → /boot/EFI/org.clearlinux/freestanding-00-early-ucode.cpio: No space left on device
[ERROR] cbm (…/src/bootman/update.c:L210): Failed to copying freestanding initrd

Just deleting the files from /boot did not fix it, removing the bundles neither:

swupd bundle-remove kernel-lts2018 kernel-lts2019 kernel-lts2020

I removed all lts2018 tls2019 lts2020 files/folders from /usr/lib/kernel and different direct kernel packages.

The main thing I wonder is if there is a risk of missing files or corruption.
Is the clr-boot-manager update rewriting all files under /boot or is there anything
which should be done to repair?

root@lab-dell /usr/lib/kernel # uname -a
Linux lab-dell 5.15.67-9.lts2021 #1 SMP Thu Sep 8 07:38:55 PDT 2022 x86_64 GNU/Linux
root@lab-dell /usr/lib/kernel # clr-boot-manager list-kernels
org.clearlinux.ltscurrent.6.1.23-1282

  • org.clearlinux.lts2021.5.15.106-47
    org.clearlinux.lts2021.5.15.67-9

If you remove the kernel bundles via swupd and clr-boot-manager (with remove-kernel) and then do a clr-boot-manager update your /boot should reflect the state of /usr/lib/kernel at that point. Manually removing things from /usr/lib/kernel is likely dangerous but the swupd and clr-boot-manager removal commnands should do everything needed. If you are worried you might have removed something important you can swupd repair but the content from your currently running lts2021 might have been impacted and wouldn’t be fixed (but the ltscurrent content would be restored).

clr-boot-manager update rewrites the content under boot as needed (assuming it has the matching content under /usr/lib/kernel still).

1 Like

I removed the files via removing the bundles with swupd and clr-boot-manager remove-kernel which removed the files from /usr/lib/kernel

From what I can see there are some files which are clearly based on the kernel, like kernel-org.clearlinux.ltscurrent.6.6.59-1428 and Clear-linux-ltscurrent-6.6.59-1428.conf

Then I guess at least loader.conf must be dynamically changed when selecting an other boot kernel.

But how do multiple installed kernel bundles in parallel behave as there seem to be files which do not seem to be dependent to the kernel version, like

bootloaderx64.efi loaderx64.efi freestanding-00-early-ucode.cpio mmx64.efi freestanding-i915-firmware.cpio.zst BOOTX64.EFI

Which impact do they have and will they be each time overwritten when running clr-boot-manager update or set-kerel and how is the behaviour when I then would select an older kernel from an other kernel bundle (yes, I know in the current state no other kernel bundle is installed)?

/boot/
/boot/EFI
/boot/EFI/org.clearlinux
/boot/EFI/org.clearlinux/bootloaderx64.efi
/boot/EFI/org.clearlinux/loaderx64.efi
/boot/EFI/org.clearlinux/kernel-org.clearlinux.ltscurrent.6.6.47-1416
/boot/EFI/org.clearlinux/freestanding-00-early-ucode.cpio
/boot/EFI/org.clearlinux/mmx64.efi
/boot/EFI/org.clearlinux/freestanding-i915-firmware.cpio.zst
/boot/EFI/org.clearlinux/kernel-org.clearlinux.ltscurrent.6.6.59-1428
/boot/EFI/BOOT
/boot/EFI/BOOT/BOOTX64.EFI
/boot/loader
/boot/loader/entries
/boot/loader/entries/Clear-linux-ltscurrent-6.6.47-1416.conf
/boot/loader/entries/Clear-linux-ltscurrent-6.6.59-1428.conf
/boot/loader/loader.conf

(and btw. one can feel that swupd and clr-boot-manager seem to be programmed from different teams, one uses the verb second (swupd bundle-remove) and the other the first (clr-boot-manager remove-kernel)

The bootloader files and firmware files you referenced that are not versioned will be updated if clr-boot-manager notices a difference between what is in /boot and what is in /usr. They are kernel version independent, changing kernels won’t matter for those files.

1 Like