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


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


udev predictable network interface names should be consistent on the same hardware, clearly you have heterogeneous hardware.

In the simple case of one interface, you can disable persistent naming by adding net.ifnames=0 biosdevname=0 to the Linux command line. (Ask Ubuntu: Changing Network Interfaces name Ubuntu 16.04)

However for multiple interfaces there is no guarantee of which becomes eth0. You could turn persistant naming back on, but rules customization is usually done by writing host specific MAC addresses to a file.

| improve this answer | |
  • Indeed, the hardware is heterogeneous. Unfortunately I have several NICs, which have different roles (connection to the nfs server, and connection to the corporate network). So I have to rely on reproducible interface names. I added my interfaces file in the question. – mbeyss Apr 15 '19 at 8:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.