systemd-boot: Fix kernel.d post files for XBOOTLDR#61035
Conversation
|
This doesn't seem like the right change and would break current users setups. |
I believe current users either A) set Could you try describing a setup that you believe would be broken by this change? Regardless, assuming the kernel lives under the |
|
Behaviour when |
|
I was thinking about separate ESP, but yes you are right that would only work with UKIs and they are not supported by this hook. |
|
I generally agree with these changes. It makes more sense to use The logic should probably be: ESP="${ESP:-/boot}"
if [ -z "${BOOT}" ]; then
BOOT="${XBOOTLDR:-$ESP}"
fiThough this could theoretically break existing installs, if BOOT=/some/really/dumb/path
ESP=/boot |
|
I'm not sure why these variables even exist to be honest. There's nothing to configure here. The only sane value for $BOOT is Additionally, under my proposal (which I believe works for both the case with and without an XBOOTLDR), My only reason for making this PR is because the scripts failed for me when I attempted to set them to set the correct values (for me) of I believe the best course of action would be to modify my proposal with an explicit setting of Alternatively, we could do something like this: This way, old configs that explicitly set Thoughts? |
9c22857 to
9ffb102
Compare
|
I've implemented the "alternative" proposal from my last comment because I believe it's the best approach. It prevents any possible breakage from old configs (i.e. |
9ffb102 to
37153d5
Compare
Testing the changes
Local build testing
The kernel post-install and post-remove scripts for systemd-boot have been treating it as a given that the kernel resides under
$ESP. This is not accurate when the user has an extended boot partition (XBOOTLDR). In this case, the user will change$BOOTin/etc/default/systemd-bootto point to their XBOOTLDR and notice an error due to the post-install script failing to find the kernel.This PR makes the scripts look under
$BOOT. It does not alter the behaviour for anyone with$BOOT == $EFI. It only corrects behaviour for the case where$BOOT != $EFI.