Skip to content
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

Fix boot.loader.grub.extraFiles when used with mirroredBoots #77594

Merged
merged 1 commit into from Feb 4, 2020

Conversation

Frostman
Copy link
Member

@Frostman Frostman commented Jan 13, 2020

Motivation for this change

Fix boot.loader.grub.extraFiles when used with mirroredBoots

Substitute @bootPath@ in boot.loader.grub.extraPrepareConfig script
same way as it's done for boot.loader.grub.extraEntries option.

Potential use case - enable memtest (requires another fix for EFI - #78453 )

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

This change is Reviewable

Substitute @bootPath@ in boot.loader.grub.extraPrepareConfig script
same way as it's done for boot.loader.grub.extraEntries option.
@Frostman Frostman force-pushed the fix-grub-extrafiles-mirroredboots branch from e5431cf to 7144b9a Compare February 3, 2020 23:38
@Frostman
Copy link
Member Author

Frostman commented Feb 3, 2020

I've tested it on my system with /boot[1-6] and mirrored boot configured following way:

boot.loader.grub.mirroredBoots = [
    { devices = [ "nodev" ]; path = "/boot1"; efiSysMountPoint = "/boot1"; }
    { devices = [ "nodev" ]; path = "/boot2"; efiSysMountPoint = "/boot2"; }
    { devices = [ "nodev" ]; path = "/boot3"; efiSysMountPoint = "/boot3"; }
    { devices = [ "nodev" ]; path = "/boot4"; efiSysMountPoint = "/boot4"; }
    { devices = [ "nodev" ]; path = "/boot5"; efiSysMountPoint = "/boot5"; }
    { devices = [ "nodev" ]; path = "/boot6"; efiSysMountPoint = "/boot6"; }
  ];

It successfully generates entries in grub & copies files.

Copy link
Member

@infinisil infinisil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Looks good

@infinisil infinisil merged commit b4cc413 into NixOS:master Feb 4, 2020
@Frostman Frostman deleted the fix-grub-extrafiles-mirroredboots branch October 16, 2022 22:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants