archinstall
archinstall copied to clipboard
Update bootctl command for new --variables= option
PR Description:
Starting in systemd-boot v257 a arch-chroot environment is detected by bootctl as a container environment.
This will cause bootctl install to skip EFI variable setup silently. See systemd issue 36174 & Arch topic.
As a result of that issue systemd is introducing a new --variables=yes|no option to bootctl. The existing --no-variables is left for compatibility and is equivalent to --variables=no.
The default variable behavior if not specified will be environment context dependent. So since arch-chroot is detected as a container, EFI variables will skip.
This PR explicitly sets --variables=yes to over come this. And in the fallback case changes from the compatiblity --no-variables to --variables=no.
This PR should not be merged until a matching version of systemd is released into Arch packages. I just wanted to preemptively get this PR staged.
Tests and Checks
- [ ] I have tested the code!
Great work and I truly appreciate the preemptive PR! Super fresh information by the looks of it too, well spotted!
Marking as ready for merger, but we will hold off for now!
Sadly I think I merged this too early. I assumed that as of systemd 257.6-1 this would be merged in there.
I will have to revert this as despite https://github.com/systemd/systemd/pull/37144 being merged, it's still not available as an option:
Apologies for the noise.
Yes, I believe systemd has it in their v258 milestone.
Sadly that's not mentioned in the github milestones: https://github.com/systemd/systemd/milestones
I'll revisit this around v260, I'll keep this contribution intact and add a check if pacman -Q systemd >= 260 and keep an eye out :)
I'm pretty sure about it being scheduled for v258.
The commit merged on systemd/main for the changes specifically calls out v258 in the bootctl man page update man/bootctl.xml.
And the issue which spawned the change is closed and marked for v258 as well.
Thank you for that information, I am inclined to believe you so I made this check: https://github.com/archlinux/archinstall/pull/3625
My doubts were coming from https://github.com/systemd/systemd/pull/37144 being the PR that implements the --variables=BOOL had no milestone attached to it. But I guess they don't add every single PR to their milestones, only the parent issues go there.