[Nix-dev] Nix clobbered my Ubuntu grub.cfg
Luca Bruno
lethalman88 at gmail.com
Fri Nov 21 09:50:25 CET 2014
On 21/11/2014 03:46, Joe Hillenbrand wrote:
> I want to dual-boot Ubuntu and NixOS on my laptop.
>
> Ubuntu, because Unity has good touchscreen support and my laptop has a
> touchscreen, and NixOS, because I want to learn it for work and I will
> only learn it best if I am forced to use it fullish-time. (Please
> don't suggest Nix on Ubuntu. I want to learn Nix at the system-level,
> e.g. kernel modules, fstab, etc)
>
> I was able to recover by chrooting into my Ubuntu partition and
> running update-grub, but that is not a good long-term solution.
>
> Ubuntu and NixOS seem to have completely incompatible grub update
> procedures. I'm interested in ideas on how to make them play well
> together. I would even be interested in contributing code to
> facilitate that behavior, if the forces-that-be agree on a design.
>
> Otherwise I'm enjoying Nix so far.
>
> Thanks,
Please post your partition layout. Are you using different partitions of
/boot for ubuntu and nixos?
Anyway, I think the best solution is the following: put device = "none"
in nixos configuration.nix, that will not install grub but still
generate the boot entries.
In the ubuntu grub, add a manual configuration line to load the
config[1] from the nixos /boot. That is, you include at runtime the
config of nixos into the ubuntu grub.
This is the same approach I use for booting nixos installed in a
subdirectory of the debian root :)
[1]
https://www.gnu.org/software/grub/manual/html_node/configfile.html#configfile
More information about the nix-dev
mailing list