Trying my first Kickstart with Scientific Linux 7, and have ironed out most of the bugs with migrating my scripts from SL6, but one remains.
I boot the VM on DHCP to pull the Kickstart file from an HTTP server, by adding the following at the boot loader prompt:
net.ifnames=0 ip=eth1:dhcp inst.ks=http://server/ks.cfg
This works fine, and the file is downloaded and processed successfully.
Kickstart config:
…
network --bootproto=static --device=eth0 --ip=192.168.242.224 --netmask=255.255.255.0 --gateway 192.168.242.1 --nameserver 192.168.242.200
network --bootproto=static --device=eth1 --ip=10.10.242.224 --netmask=255.255.255.0 --nodns
…
After installation and reboot, eth1 is fine. However, eth0 stays on DHCP. Checking in /etc/sysconfig/network-scripts/
I find both ifcfg-eth0
with the static IP information, but also ifcfg-eth0-1
with a DHCP config.
/etc/sysconfig/network-scripts/ifcfg-eth0
# Generated by parse-kickstart
UUID=9db01644-e98d-4260-a13e-96d26b251297
DNS1=192.168.242.200
IPADDR=192.168.242.224
GATEWAY=192.168.242.1
DEFROUTE=yes
IPV6_AUTOCONF=no
NETMASK=255.255.255.0
BOOTPROTO=static
DEVICE=eth0
ONBOOT=no
IPV6INIT=yes
/etc/sysconfig/network-scripts/ifcfg-eth0-1
HWADDR=00:50:56:93:D0:AA
TYPE=Ethernet
BOOTPROTO=dhcp
DNS1=192.168.242.200
DEFROUTE=yes
PEERDNS=yes
PEERROUTES=yes
IPV4_FAILURE_FATAL=no
IPV4_ROUTE_METRIC=0
IPV6INIT=yes
IPV6_AUTOCONF=no
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
NAME=eth0
UUID=73ef022d-ff28-404e-9326-cb2240ba78c1
DEVICE=eth0
ONBOOT=yes
It appears the second configuration is taking precedence; what can I do to prevent this behaviour?
(If it's relevant, I've disabled "consistent" interface names because they are anything but on virtual hardware. I specify net.ifnames=0
on the boot loader and then remove the biosdevname
package in my Kickstart.)
When you give a boot command line option to start networking to load a kickstart file over the network, the corresponding
network
line in the kickstart needs the--activate
option added.From the documentation:
This would look something like: