Workaround for failed NFS mounts within Debian FAI and Dracut

Yesterday I struggled with installing new VMs with Debian FAI. As it turned out, both Dracut and the FAI tools failed to mount the NFS exports from the FAI server with NFS, proto=UDP.

This happened over night and no apparent reason was found (all NFS deamons, rpc-tools etc. were running on the NFS server), not even within our Firewalls.

Running tshark on the NFS server, we saw that the NFS lookup for /srv failed.
The workaround was to let FAI and Dracut only mount NFS shares via TCP. In order to enable this “feature”, you need to modify two files on the FAI server.


  1. Modify the default PXE config file:
    vim /srv/tftp/fai/pxelinux.cfg/default
    # Make sure to add ",tcp" to the correct kernel boot parameter line as shown below
    append initrd=initrd.img-3.2.0-4-amd64 ip=dhcp rd.lvm=0 root=/dev/nfs nfsroot=,tcp aufs rd_NO_LVM FAI_FLAGS=verbose,sshd,createvt FAI_ACTION=install
  2. Modify the mount options variable within FAI:
    vim /srv/fai/nfsroot/usr/sbin/fai
    # make sure the line with the mount options variable looks like this
    #export romountopt="-o async,noatime,nolock,ro,actimeo=1800"
    export romountopt="-o async,noatime,nolock,ro,actimeo=1800,tcp"

Now start the installation again – the NFS shares should be mounted correctly now. Please keep int mind that these changes might night be update-safe.


2 thoughts on “Workaround for failed NFS mounts within Debian FAI and Dracut

Comments are closed.