-1

Nixos has a configuration option in the manual for specifying extra entries in the grub menu "boot.loader.grub. extraEntries" but I can't figure out how to make it work for a second linux installation on the same hard disk with its own grub.

More specifics: I had ubuntu installed and booting from /dev/sda2 with /dev/sda1 formatted for FAT. I reformatted /dev/sda1 as ext4 and successfully installed nixos specifying /dev/sda for it's grub. And it boots fine, but doesn't show the ubuntu install. I would like to be able to specify the ubuntu as a menu item from the nixos grub which I believe I should be able to do by using the configuration option boot.loader.grub.extraEntries but I can't figure out exactly what I need to put in that entry to make it work. Could anyone provide me some pointers please?

brittAnderson
  • 1,428
  • 11
  • 25
  • 2
    you will probably get better answers if you ask this under ask ubuntu, or unix and linux. super user might work too, but i cant remember off the top of my head what questions are supposed to be asked there – DTSCode Jul 13 '14 at 23:29
  • The boot.loader.grub.extraEntries is a nixos specific configuration, that is why I tagged it here (but I appreciate your suggestion). The second linux distribution could really be any other distro (or BSD, winXP), that is why I didn't try ubuntu as a tag. If I could, I would edit my question to be a bit more general: What are the best sources of help for nixos newbies if the answer is not in the Nixos Manual? Is stackoverflow a good choice? My boot loader issue is just one concrete example of the type of question that newcomers like myself are likely to have. – brittAnderson Jul 14 '14 at 15:23
  • 1
    If you are not modifying and compiling either grub or nixos, stackoverflow is not your site. Superuser would be my suggestion. – unixsmurf Jul 14 '14 at 15:53

2 Answers2

0

What's the format, that would be a long answer :) Basically the format is the grub2 configuration format: http://www.gnu.org/software/grub/manual/grub.html . Sorry for the "Read The Manual", but that's the answer to such a question.

As for the ubuntu specific question, go in the ubuntu partition and a copy & paste (plus some tweak probably) of the menuentry from /boot/grub/grub.cfg (or something in there) into the nixos extra grub option should do it.

lethalman
  • 1,976
  • 1
  • 14
  • 18
-1

I agree that this question probably belongs on unix or superuser, but I also think it still deserves an answer.

I was looking for the same thing, there are some examples for both grub legacy and grub2, a fair way down the page, although it is probably worth reading the whole thing.

https://github.com/NixOS/nixos/blob/master/modules/system/boot/loader/grub/grub.nix