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:
I removed all lts2018tls2019lts2020 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?
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).
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
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)?
(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.