I’ve been lurking around the forums looking for advice on converting an existing systemd-boot EOS install to use rEFInd, and I think i got it: create a script that runs when kernels are installed that generates manual boot stanzas for me.
This solution will work for me because i only dual boot both Windows and Linux, Windows is setup with Bitlocker, so I need to set up a manual boot stanza for it anyway so that rEFInd can reboot my machine straight into Windows to avoid that annoying Bitlocker recovery key prompt.
The only question though is: what would be the best way to go about this?
I’ve identified two key locations where I can do this: pacman hook or kernel install hook. I noticed that sbctl automatically signs new kernels whenever reinstall-kernels is executed, so I think I want to go that route for this reason, the script that sbctl installs under install.d gets fed the path to the kernel. By using that path i can extrapolate the kernel options from /efi/loader/<kernel option>.conf
The pacman hook i was thinking this is something that should happen whenever any linux kernel is installed (mainline, lts, hardened, zen, and so on)
The end result is I have EOS with both rEFInd and systemd-boot as a fallback just in case something in rEFInd borks.
I started work on the script, but wanted to get feedback on this plan of mine.
Between those two options, I would choose kernel-install for sure. That is what it is for.
Another option would be to replace kernel-install-for-dracut with eos-dracut. If you do that, the images will be in /boot with consistent names and you won’t need to generate different stanzas.
ah yea forgot to mention, my drive is encrypted, this includes /boot, only /efi is unencrypted, i don’t think eos-dracut would work in that case, is that right?