New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nixos/grub: generate BLS entries #95901
base: master
Are you sure you want to change the base?
Conversation
Can't or shouldn't we re-use the same generator for all BLS entries generation, rather than maybe accidentally having diverging implementations? |
Uhm, I'm not sure: it certainly make sense but the systemd-boot generator is in python. Using it would make the bootloader script depends on a shell, perl and python interpreter, which is not great. If install-grub.pl were to be rewritten in python, it would be trivial, but I don't have enough familiarity with either perl or grub to do that. |
It would make the bootloader script depend on python, but isn't NixOS' base closure already bringing in the same python? I guess that would be the question to answer. Because, sure it would increase this specific NixOS module's closure size, but re-implementing the code increases the code complexity. That is my main concern with the PR, but I guess it could be fine to go with the duplicated code for the time being, as long as others don't feel strongly against that. |
After reading #48378, if nothing changed in the mean time, python should not be in the minimal closure unless using |
I also have some incoming changes to Having the loader entry generation in two different languages would make changes like this much more difficult. I wonder if the aversion to python in the minimal closure has changed at all since the apparently successful refactor to enable |
I believe the closure concerns are entirely about size. |
So, It doesn't look like there is a consensus on whether perl, python or neither should be used instead. I agree it's not ideal to have the booloader code written in two different languages, but I wouldn't stall changes on this because I don't think the conflict will be resolved anytime soon. Morover both systemd-boot-builder.py and install-grub.pl are complex and rewriting or unifying them is already a huge task. |
I agree. |
Using a compiled language with static typing sounds like a good idea: the scripts are quite complex and a proper compiler could help. It would also remove the interpreter from the closure. |
That would be amazing. The bootloader script has the potential to brick everyone's system, yet with the Perl stuff it is extremely easy to make mistakes in there. In the PR I contributed to Similarly, I don't feel equipped to review this PR. As a desktop user, and owner of important server infrastructure that needs to boot reliably, I'd accept a slightly larger system any day if in turn that Perl script dissapears from my "stuff that has a high potential to screw us" risk list. If consensus can be reached for |
👍 For Python, optional static typing support ( That is not to discourage the Rust approaches (good stuff!), but if I Python is something that can be agreed on easily, I'd that immediately vs waiting for e.g. another year for a potential Rust solution to be ready (we can still switch to something better afterwards). |
I'm not familiar with rust, but I could help with python too. It's important to reach a consensus on the language before, though: without it all the efforts could go to waste. |
Well for compiled languages we do not have to restrict ourselves that much, but it would indeed be a good idea to agree on a canonical interpreted language while / if we have critical interpreted code present at runtime. |
I marked this as stale due to inactivity. → More info |
The GRUB BLS module (blscfg.mod) does not support ZFS. Source 1 (search in page for blscfg); therefore we must disable BLS if ZFS support is enabled. |
@ne9z This PR has nothing to do with grub support for BLS. It's about adding some code to generate the BLS entries when switching to a new NixOS generation. |
My bad. I overlooked the part that it is just mirroring GRUB entries.
I thought GRUB was being configured to boot BLS entries directly, as in
Fedora/RHEL.
Michele Guerini Rocco ***@***.***> writes:
… @ne9z This PR has nothing to do with grub support for BLS. It's about adding some code to generate the BLS entries when switching to a new NixOS generation.
--
Reply to this email directly or view it on GitHub:
#95901 (comment)
You are receiving this because you were mentioned.
Message ID: ***@***.***>
|
Motivation for this change
See issue #94038. Basically being able to use
bootctl
andsystemctl kexec
with GRUB.Things done
nixosTests.grub
nixosTests.installer
nixos-rebuild switch