systemd-boot using kernel-install

This forum is dedicated to advanced help and support :

Ask here your questions about advanced usage of Mageia. For example you may post here all your questions about network and automated installs, complex server configurations, kernel tuning, creating your own Mageia mirrors, and all tasks likely to be touchy even for skilled users.

systemd-boot using kernel-install

Postby dalto » Jun 20th, '21, 21:35

I wanted to convert my installation to systemd-boot using kernel-install for a project I am working on. Since there didn't seem to be a supported way to do this that I could find here is the approach I took.
  • rm /etc/dnf/protected.d/basesystem.conf
  • dnf remove "grub*"
  • remount /boot/efi as /efi and update /etc/fstab to match
  • clean out the unneeded bits from /efi
  • bootctl install
  • mkdir -p /efi/$(cat /etc/machine-id) # it may be created by bootctl install
  • kernel-install add 5.10.16-desktop-1.mga8 /boot/vmlinuz-5.10.16-desktop-1.mga8 # do this for all kernels
That seemed to work fine but if were to install/update/remove a kernel it would have been a mess since nothing was instrumented for kernel-install.

In order to resolve that I took these steps:
  • Use rpm to forcibly remove bootloader-utils
  • Install a dummy bootloader-utils package to satisfy dependencies
  • Created a modified /sbin/installkernel and a dummy /sbin/kernel-remove-initrd
This all seems to have worked and installing updates and/or new kernels seems to behave sensibly. Removing kernels also seems to work.

So, that being said, I have a couple of questions.
  • Is there something else out there that does this already?
  • Is there a better approach to this?
dalto
 
Posts: 15
Joined: Jun 20th, '21, 20:10

Return to Advanced support

Who is online

Users browsing this forum: No registered users and 1 guest