Skip to content

Conversation

@provokateurin
Copy link
Contributor

This works on my machine, but for some odd reason grub-install fails when running the check for the example:

       > machine # Installing for i386-pc platform.
       > machine # /nix/store/6934ywwmhnxzrim4f8hwff6c22v0sf6i-grub-2.12/sbin/grub-install: warning: File system `ext2' doesn't support embedding.
       > machine # /nix/store/6934ywwmhnxzrim4f8hwff6c22v0sf6i-grub-2.12/sbin/grub-install: error: embedding is not possible, but this is required for cross-disk install.
       > machine # /nix/store/j07f0cnyhdx46j9n3a40xhjk7z9d5njc-install-grub.pl: installation of GRUB on /dev/vda failed: No such file or directory
       > machine # Failed to install bootloader

I'm not sure what's wrong there, as the example I added is almost exactly like my real config (minus LUKS and BTRFS subvolumes) and I also tried my real config as an example which doesn't work either.
In my NixOS configuration I have boot.loader.grub.efiSupport = true; set, but that doesn't seem to make a difference here as the error from the example does not go away with it.

@Lassulus @Enzime @iFreilicht @Mic92 @phaer can you help me out with this one?

in
(optionalAttrs (builtins.length efi_partitions >= 2) {
# Mirrored boot partitions are not supported on systemd-boot.
boot.loader.grub.enable = mkForce true;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This should be an assertion for system.boot.loader.id == "grub", but I'm not sure how to access config here.

@provokateurin provokateurin force-pushed the fix/grub-mirrored-boot branch from b821633 to 67f4cc5 Compare November 8, 2025 12:17
@provokateurin
Copy link
Contributor Author

I fixed the issue with my new example/test (see first commit), however it breaks the legacy tables for some reason. The second commit also doesn't work with legacy tables, but it is probably possible to make it work somehow. It just needs to detect the EFI partitions, but I'm not sure how that would work with the legacy tables.

So, would it be allowed to get rid of legacy tables support? AFAICT it has been deprecated for over two years (#294), so it should be fine to remove it now.

I would greatly appreciate your input and help on this issue @Mic92 @Lassulus!

@provokateurin provokateurin force-pushed the fix/grub-mirrored-boot branch 2 times, most recently from c8e5267 to 8c6d567 Compare November 8, 2025 12:28
@provokateurin provokateurin force-pushed the fix/grub-mirrored-boot branch from 8c6d567 to 99ac029 Compare November 8, 2025 13:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant