Hi there,
I’m booting to Manjaro 23.1.3 by this configuration:
boot loader: systemd-boot installed at /boot
ramdisk creator: mkinitcpio
Secure boot: enabled, via sbctl
Kernel: unified kernel (UKI): 6.6.16-2-MANJARO
I have changed linux66.preset to create the UKI kernel image.
And also changed /usr/share/mkinitcpio/hook.preset so as to keep the uki settings in linux*.preset files untouched after each kernel update.
Today I had a system update, and the mkinitcpio package also got an update. The problem is, the file hook.preset changes back to the original version in the mkinitcpio package. The result is changing in linux66.preset and so no UKI image.
How can I prevent this? Is there a way to make mkinitcpio always create preset files with our customization?
-c, --config config
Use config file to generate the ramdisk. Default: /etc/mkinitcpio.conf. If specified, drop-in files in /etc/mkinitcpio.conf.d/ will be ignored.
Indeed. I did all above stuff according to wiki and man pages.
This is the config file which is responsible for hooks (systemd modconf filesystems fsck) and etc. This file does not decide whether creating UKI or not.
But if you plan to stay on linux66 you might only want to change /etc/mkinitcpio.d/linux66.preset.
When switching kernels in the future you need to adjust the corresponding preset file once, that might be acceptable to avoid NoExtract alltogether.
I tried this before. By this way, the current hook.preset file removed after re-installing/updating mkinitcpio. It causes future kernel installs not having a linux**.preset file.
This could make an unbootable system If I forgot to create the images manually after a major update. I’m looking for a permanent solution.
Maybe I should give kernel-install (by systemd-ukify) creating uki image instead of mkinitcpio due to this part of arch wiki.
I took a slightly different approach - also using sbctl and verified boot - instead of using systemd-boot efistub I am using the unified kernel instead.