-
-
Notifications
You must be signed in to change notification settings - Fork 15.5k
[WIP] nixos/refind: init #58121
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
[WIP] nixos/refind: init #58121
Conversation
8a8a43c
to
45ef234
Compare
@AndersonTorres maybe you are capable of giving some review-notes, as you are marked as the maintainer for the refind-package ? |
45ef234
to
fb3e1d4
Compare
ping (triage) |
@disassembler @lheckemann I would love to get this into 19.09 |
I like the idea, but I'm not very comfortable with having a bootloader option without tests — breaking people's boot would suck! Any chance you could add tests to this? |
@lheckemann I'll look into it |
looking at the following files i am completly lost on how to write tests for this: |
If the lack of tests and the implication of that is mentioned in the enable option's documentation, I guess I'd be fine with merging this as is as well. |
@lheckemann i think i got it figured out how to write a proper test for this. I'm gonna spend some more time on this on thursday and friday. |
@lheckemann so i played around some more but i just get it to work in the virtualmachine that is used for the tests. |
So what's the problem? |
Any progress? |
sorry for not reporting back. @lheckemann as far as i remember the problems i encounter where something along these lines:
that's where i got stuck and then i couldnt work on it any further. sorry for the delays. |
ca5157b
to
0bb49f9
Compare
@lheckemann i think this is now done. |
It is fine if only "as removable" is tested, just like it is fine for GRUB2. The current test driver makes it impossible to sanely test with a writable nvram. I tried adding the ability to do so, but there are just too many assumptions in the current test driver. In addition there is the new test driver in python, so I'm not too keen on improving anything for now :/. Either I need to port the installer test to python, or I have to rework the perl test driver which may be soon deprecated, if not removed. Basically, the issue is two-fold:
Something similar to the following, where there is the OVMF code (the EFI), and another writable drive for the NVRAM. Unverified still, but the secondary drive may need to be started from a copy of OVMF_VARS.
|
0bb49f9
to
6616649
Compare
I marked this as stale due to inactivity. → More info |
I'm using it on a daily basis for ages. |
The only issue is the test, then? |
i would have to check if the code in this PR is what I'm running. not sure as this PR is old. If there is interest to get this going i could try to find some time. |
This is probably one of the hardest PR I've been involved into reviewing. On the one hand, this is an amazing feature, and seems to work just fine... And the contribution has great value. But on the other... Testing that the bootloader generation is not broken is primordial. This is because it would lock people out of their system if it fails. Though, as we discussed earlier, a simpler test where we use the fallback location, like GRUB2 currently does, would be good to go forward. We care more about the fact that the bootloader still understand what configuration we generate than the actual initial installation and configuration steps. |
i totally agree that this should have rock-solid tests. the hardest thing about the tests was to implement support for booting via EFI on the very first boot (which is what #73768 adressed). there are several scenarios to be covered by tests:
|
If, just like with GRUB, we only test the "default fallback location" ( Anyway, installing at the fallback location would be a requirement for some platforms, like U-Boot's UEFI on ARM. And also required on some bad UEFI implementations. |
Thinking like Ryuuguin Seiya, the Overly Cautious Hero, how could we devise an intermediate phase? I am thinking in something like that:
This way, if refind does not boot, then it is just a matter of reboot the system and use the GRUB options. |
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/how-to-use-refind-as-boot-manager/13507/5 |
@cstrahan does that https://github.com/cstrahan/nixos-config/blob/1ec7e813efdaf934014c191a7cdf021bc5f6cb79/configuration.nix#L84 |
any update on this? |
None. The OP seems to lose interest. |
Damn, the only thing missing are the tests. |
This is important to me. What is the state of efi-boot in the test infractrusture? Is any trivial patch possible ? I am willing to help but I am missing information here. |
I can't help so much. Maybe open a thread on Matrix and/or another on Discourse.nixos.org can be helpful. |
Since this doesn't look like it'll be moving any time soon, I'll close this for clarity. You can re-open if you gain interest again. |
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/easy-refind-boot-by-booting-into-systemd-boot-from-refind/28507/1 |
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/how-to-add-bootentry-booting-straight-into-latest-generation/33507/2 |
Motivation for this change
I wanted to use refind instead of systemd-boot.
I have been running this for almost a year now.
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nix-review --run "nix-review wip"
./result/bin/
)nix path-info -S
before and after)