[Nix-dev] NixOS installation on multi-boot system with GRUB

Anderson Torres torres.anderson.85 at gmail.com
Sat Aug 29 01:36:25 CEST 2015


2015-08-28 12:38 GMT-03:00 Henning Thielemann <lemming at henning-thielemann.de>:
>
> On Thu, 27 Aug 2015, 宋文武 wrote:
>
>> I think you can:
>>  install NixOS's GRUB to its boot partitation, then add a 'chainloader'
>>  menu entry to your main GRUB (installed into MBR by Ubuntu).
>>  I did this with btrfs (ext4 did't work for me):
>>    boot.loader.grub.device = "/dev/sdaX";
>>  (sdaX is the boot or root partition)
>>  # grub.cfg
>>  menuentry 'NixOS' {
>>    set root='(hd0,X)'
>>    chainloader +1
>>  }
>>
>>  install NixOS without GRUB, then add a 'configfile' menu entry to your
>>  GRUB to load NixOS's grub.cfg.
>>  I guess it look like:
>>    boot.loader.grub.device = "nodev";
>>  # grub.cfg
>>  menuentry 'NixOS' {
>>    set root='(hd0,X)'
>>    configfile '/boot/grub/grub.cfg';
>>  }
>
>
>
> I find no /boot/grub/grub.cfg on the NixOS partition, not even a 'grub'
> directory. Am I supposed to write a grub.cfg myself or should nixos-install
> create one for me? If the latter one, how can I make nixos-install create a
> grub.cfg for me but not install a boot-loader?

Do you need NixOS controlling the boot of other OSes on your machine?


> _______________________________________________
> nix-dev mailing list
> nix-dev at lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev
>


More information about the nix-dev mailing list