[Nix-dev] NixOS with NFS-root

Eelco Dolstra e.dolstra at tudelft.nl
Tue Mar 22 17:16:55 CET 2011


Hi,

On 03/22/2011 04:50 PM, Rickard Nilsson wrote:

> Is anyone running NixOS with the root partition on NFS, booting from PXE?

Not as far as I know.

> I want
> to replicate my current diskless Linux-setup in NixOS, is it possible? I am
> prepared to work to make it happen, but I'd appreciate any pointers I can get.

The main issue is to add networking and NFS support to the initrd.  This 
requires adding the necessary kernel modules to the initrd 
(boot.initrd.availableKernelModules) and adding some code to initialise 
networking.  We already do this in this module:

   https://svn.nixos.org/repos/nix/nixos/trunk/modules/virtualisation/qemu-vm.nix

(in boot.initrd.postDeviceCommands) to set up networking to boot from a CIFS 
share.  Then setting fileSystems to something like [ { mountPoint = "/"; device 
= "server:/foo"; fsType = "nfs"; } ] should suffice to do the actual mounting.

Maybe portmap is needed in the initrd as well.

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



More information about the nix-dev mailing list