What keeps overwriting /etc/network/interfaces?
I'm making a custom live CD of a headless Ubuntu 17.10 server. It boots up, and everything seems fine, but some script appears to be overwriting the /etc/network/interfaces file and resetting it to the default configuration. I wanted to find out what the file actually looked like in the squashfs file, to see if it was reset to default during the squashfs creation, so I extracted it, and it is in fact my customized interfaces file. So that means that some script must be overwriting it. The question is, which one?
I deleted everything in my 99-default.link file, and I confirmed by looking up boot messages that it is ignored during boot. I'm still not very knowledgeable on systemd/udev stuff, but I saw on more than one search result on google that nulling that file would allow you to manually configure the network. I have configured it so that it has eth0-3 assigned to the four MAC addresses of the network cards.
I tested this interfaces file on both my Debian Stretch and Ubuntu 17.10 Artful computers, and they both stay the way I configured them, without getting overwritten.
/etc/network/interfaces (works on both my Debian Stretch and 17.10 Artful computers)
Code:
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
#source /etc/network/interfaces.d/*
#^initially uncommented
auto eth0 eth1 eth2 eth3
# eth0 NIC connected to external network
allow-hotplug eth0
iface eth0 inet dhcp
# eth1
allow-hotplug eth1
iface eth1 inet static
address 172.16.1.1
netmask 255.255.255.0
network 172.16.1.0
broadcast 172.16.1.255
gateway 172.16.1.1
# eth2
allow-hotplug eth2
iface eth2 inet static
address 172.16.2.1
netmask 255.255.255.0
network 172.16.2.0
broadcast 172.16.2.255
gateway 172.16.2.1
# eth3
allow-hotplug eth3
iface eth3 inet static
address 172.16.3.1
network 172.16.3.0
broadcast 172.16.3.255
gateway 172.16.3.1
# The loopback network interface
auto lo
iface lo inet loopback
I'm reading about systemd trying to learn it so that I can figure out this problem, but I'd be grateful if someone shares the solution.
Thanks
Edit: I guess I should mention that the live Ubuntu CD boots up with isolinux.
Last edited by sandman887; 5 Days Ago at 09:06 PM.
Old hardware never dies (with Linux). - Bashing-om
Bookmarks