Dual Booting NixOS and Windows: Difference between revisions

From NixOS Wiki
imported>Makefu
initial batch of nixos-users
 
imported>Fadenb
m →‎MBR + Grub: syntaxhighlight
Line 3: Line 3:
When using MBR on your disk then you can configure grub chain-loading:
When using MBR on your disk then you can configure grub chain-loading:


<pre>{
<syntaxhighlight lang="nix">{
   boot.loader.grub.enable = true;
   boot.loader.grub.enable = true;
   boot.loader.grub.version = 2;
   boot.loader.grub.version = 2;
   boot.loader.grub.device = &quot;/dev/sda&quot;;
   boot.loader.grub.device = "/dev/sda";
   boot.loader.grub.extraEntries = ''
   boot.loader.grub.extraEntries = ''
     menuentry &quot;Windows 7&quot; {
     menuentry "Windows 7" {
       chainloader (hd0,1)+1
       chainloader (hd0,1)+1
     }
     }
   '';
   '';
}</pre>
}</syntaxhighlight>
Source: https://www.reddit.com/r/NixOS/comments/31lx3i/windows_and_nixos_dual_boot/
Source: https://www.reddit.com/r/NixOS/comments/31lx3i/windows_and_nixos_dual_boot/



Revision as of 09:15, 27 August 2017

MBR + Grub

When using MBR on your disk then you can configure grub chain-loading:

{
  boot.loader.grub.enable = true;
  boot.loader.grub.version = 2;
  boot.loader.grub.device = "/dev/sda";
  boot.loader.grub.extraEntries = ''
    menuentry "Windows 7" {
      chainloader (hd0,1)+1
    }
  '';
}

Source: https://www.reddit.com/r/NixOS/comments/31lx3i/windows_and_nixos_dual_boot/

EFI

After setting up a 256mb EFI Partition dualboot should work out of the box (at least for windows10)

Source: https://zimbatm.com/journal/2016/09/09/nixos-window-dual-boot/