[Nix-dev] NixOS installation on multi-boot system with GRUB
Henning Thielemann
lemming at henning-thielemann.de
Fri Aug 28 17:38:10 CEST 2015
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?
More information about the nix-dev
mailing list