Multi-esp partition grub processing

I have two esp partitions on my system, one for windows (/dev/sda1) and one for nixos (/dev/sda5), but I will not be able to generate startup files in the configuration below.

boot.loader.grub = {
  device = "/dev/sda5"; # or "nodev"
  useOSProber = true;
boot.loader.efi.efiSysMountPoint = "/boot/efi";
boot.loader.efi.canTouchEfiVariables = true;

You need to use "nodev", and control which ESP you use by what you mount on boot.loader.efi.efiSysMountPoint.

I’m very surprised at the idea that your firmware can actually handle multiple ESPs on a single device, though. Are you sure that can actually work?

1 Like

Thank you It works perfectly on my computer. I now have two boot partitions on a single disk.