-
-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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-generate-config: update default to use grub for UEFI as well #18731
Conversation
Also updates & beefs up UEFI installation instructions to close NixOS#9096 Currently we default to systemd-boot (previously gumniboot) when the installation device (on which nixos-generate-config typically runs) is booted in UEFI mode, and we default to GRUB when the device is booted in BIOS mode. This patch attempts to unify the two branches by using GRUB in both cases. The advantages are: - Consistency between the two cases - GRUB can create disks that are bootable in both UEFI and BIOS mode - GRUB can install itself on a UEFI device while booted in BIOS mode (using efiInstallAsRemovable to avoid touching EFI vars)
@obadz, thanks for your PR! By analyzing the annotation information on this pull request, we identified @thatdocslady, @edolstra and @aszlig to be potential reviewers |
I do also wonder if we should set the default EFP mountpoint to There's some discussion about this here: https://bbs.archlinux.org/viewtopic.php?id=175376 That's also the default on Ubuntu: |
also cc @shlevy @DamienCassou @domenkozar |
IMO grub is overkill given the existence of the EFI boot stub in the kernel and the services EFI provides, plus the integration of systemd-boot with systemd is nice. But I don't feel too strongly about this as long as it works, so I'll leave this to other reviewers. |
@shlevy, I don't know how I feel about copying kernels on the EFP when they could be in the Could you describe the benefits of the integration with systemd-boot ? |
|
IRC log from
|
This sentence can be removed from the documentation. The |
@cmfwyp, I thought about removing it, but then I couldn't find a way to set the EFI boot flag with fdisk, so left that comment. |
Not too long ago I would have been all in favor of using grub everywhere, but now I'm not so sure. I kind of appreciate the simplicity of systemd-boot. The other two advantages you listed are about booting in BIOS mode, which don't really matter for modern UEFI systems, so I'm not sure if we should bring back all that grub complexity for those systems. Also, I don't have the impression that grub is very actively maintained. The last release is from 2012... |
I would also favor systemd-boot over grub. |
@obadz I'm inclined to close this. Thoughts? |
@grahamc, fine by me 😊 |
Also updates & beefs up UEFI installation instructions to close #9096
Currently we default to systemd-boot (previously gumniboot) when the
installation device (on which nixos-generate-config typically runs) is
booted in UEFI mode, and we default to GRUB when the device is booted
in BIOS mode.
This patch attempts to unify the two branches by using GRUB in both
cases. The advantages are:
(using efiInstallAsRemovable to avoid touching EFI vars)
For systems booted in UEFI mode, it will generate this config:
For systems booted in BIOS mode, it will generate this:
The manual post-patch looks like this:
2.1. UEFI Installation
NixOS can also be installed on UEFI systems. The procedure is by and large the same as a BIOS installation, with the following changes: