I have a set of (Ubuntu 16.04) servers, which are diskless and boot from a common nfs share.
The share is read only and I use a tmpfs overlay. To achieve that I set the /etc/overlayroot.local.conf
to
overlayroot_cfgdisk="disabled"
overlayroot="tmpfs:recurse=0"
and it worked fine so far.
Now I added more machines which have differently named NIC, so for them I need a different /etc/network/interfaces
(possible in the future I would like to diversify the configurations further). How could I achieve that without managing individual, almost identical copies of the root filesystems?
I found a solution (German slides/talk), with different levels of auFS, which are set via DHCP option strings that are handled by the initrd. But the relevant scripts to build the initrd are not discussed.
btw. my /etc/network/interfaces
reads as follows
# The primary network interface
auto eno1
iface eno1 inet dhcp
# secondary network interface, connected to nfs_root
iface eno2 inet manual
On the new machines the NICs are called enp24s0fx