On Fri, 6 May 2011 15:14:39 +0200, Nicolas Pierron <[email protected]> wrote:
Hi Rickard,

On Fri, May 6, 2011 at 14:49, Rickard Nilsson
<[email protected]> wrote:

I installed with the ordinary installation cd, but instead of mounting a plain partition on /mnt, I mounted an NFS share. Also I disabled Grub since
I boot with gPXE:

 boot.loader.grub.enable = true;
 boot.loader.grub.device = "nodev";

If you have disabled Grub, then why do you need to enable it?
Have you tried other boot lodaer options, such as:
boot.loader.initScript.enable and boot.loader.generationsDir.enable

I think I got some error when I disabled Grub, but I might be wrong. The boot.loader.initScript.enable anboot.loader.generationsDir.enable options seems very usable indeed. I have set up the gPXE boot script manually so far. Thanks!


I also have the following in configuration.nix in order to set up the
network on boot:

 boot.initrd.extraUtilsCommands =
   ''
     cp ${pkgs.iproute}/sbin/ip $out/bin
     cp ${pkgs.glibc}/lib/libresolv.so.* $out/lib

     cp ${pkgs.nfsUtils}/sbin/mount.nfs $out/bin
     cp ${pkgs.klibc}/lib/klibc/bin.static/nfsmount $out/bin
   '';

 boot.initrd.postDeviceCommands =
   ''
     ip link set eth0 up
     ip addr add 192.168.0.200/24 dev eth0
   '';

However, I haven't got the NFS mount to work automatically yet. Instead I
have:

  mountPoint = "/";
  fsType = "none";
  device = "none";

And then I mount the root manually with "nfsmount
192.168.0.1:/export/nixos_root /mnt-root" when init stage 1 complains that
it can't mount the root device.

Have you tried with a "nfs" fsType?

Yes, it doesn't work. For some reason, running "mount -t nfs 192.168.0.1:/export/nixos_root /mnt-root" doesn't work, but "nfsmount 192.168.0.1:/export/nixos_root /mnt-root" does work. I haven't really looked in to that yet, I wanted to get the system up and running first, because it makes it easier to change the configuration.

  / Rickard
_______________________________________________
nix-dev mailing list
[email protected]
https://mail.cs.uu.nl/mailman/listinfo/nix-dev

Reply via email to