How to dual boot Windows 10 from different disk?

I want to dual boot Nixos and Windows 10. My Windows is already installed in a sdd disk, and I just installed Nixos on a different disk. Not really understanding the difference, I went with the manual and use efi to boot. I suppose osprober doesn’t work, because it is a BIOS specific thing? How should I make Grub find my Windows installation?

1 Like

The easiest would be to make your bios boot from your nixos disk and add grub entry that chainloads the windows bootloader on the other disk: Dual Booting NixOS and Windows - NixOS Wiki

1 Like

I’ve tried to do this for a while.

What I did was that I had two disks.

sda1 – ESP EFI partition (also used as boot partition with systemd-boot)
sda2 – LUKS with LVM and NixOS
sdb1 – Windows partition

Windows picked up the ESP from the other disk and put it’s bootloader there and systemd picked up the Windows bootloader and automatically added an entry with it.

my configuration looks like this. I just let OSProber find it for me.
The manual way lets you rebuild NixOS more quickly, but if you run into issues (as I did) you can just fall back to this lazy solution :slight_smile:

boot.loader = {
    systemd-boot.enable = true;
    efi.canTouchEfiVariables = true;
    grub = {
      enable = true;
      devices = [ "nodev" ];
      efiSupport = true;
      useOSProber = true;
    };
  };

Hi @Growpotkin.

I tried your configuration. It successfully identified my old Linux Mint installation that was also on the same disk as Windows 10 :smile:. Unfortunately OSProber failed to identify the Windows installation on the very same disk. I’ll try tinkering with the boot.loader.grub.extraEntries option. I’ll post results.