[Nix-dev] Re: Grub 2 problems

Eelco Dolstra e.dolstra at tudelft.nl
Sun Nov 1 16:21:20 CET 2009


Hi,

Ludovic Courtès wrote:

>> - The extra Grub entry for my Windows partition is gone.  (It's still in
>> /boot/grub/menu.lst, but it doesn't appear.)
> 
> ‘menu.lst’ is no longer used; ‘grub.cfg’ is used instead.

Ah :-)

It does appear in grub.cfg, but obviously not in the right syntax.

>> - The NixOS entries all failed with the error "You need to load the kernel
>> first."  This is probably caused by boot.loader.grub.bootDevice.  I was able to
>> manually boot into NixOS by editing an entry, removing the "(hd0,0)" device
>> names in the "linux" and "initrd" lines.
> 
> It might that ‘bootDevice’ is no longer needed because GRUB 2
> automatically finds /boot.  However, http://grub.enbug.org/Manual does
> mention “linux (hd0,2)/boot/vmlinuz-<alternate_version> root=/dev/sda2”
> as a valid syntax.

I'll just remove the bootDevice.  However, I wonder if that works if /boot is a
separate partition and copyKernels is false (since then /nix/store must be taken
relative to another device than /boot).

> It works for me(TM).  Does GRUB itself enter graphics mode, with the
> background image and all?

No, I get a text mode menu.

> if loadfont /nix/store/zg45ky8c4zylis099j5bvmnpywmfsgg4-grub-1.97/share/grub/unicode.pf2 ; then

I guess this doesn't work if /boot is on a separate partition.  To be safe,
these files should probably be copied to /boot.  My /nix is actually on an LVM
partition.  Given that GRUB 2 is supposed to be able to boot directly from LVM,
maybe I can also get rid of the separate /boot :-)

-- 
Eelco Dolstra | http://www.st.ewi.tudelft.nl/~dolstra/



More information about the nix-dev mailing list