[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Kickstart not picking up network --onboot=yes



Hello,

I'm installing CentOS 7.2 from a PXE boot. The network settings for eth1
get installed mostly correctly, but for the eth1 interface anaconda isn't
picking up the --onboot=yes parameter in the kickstart file. The eth0
device is only used during the installation, and is configured using DHCP,
but is inactive in the installed system. (This is because of Hyper-V only
supporting PXE over so-called legacy network adapters).

This is what eventually gets installed into
/etc/sysconfig/network-scripts/ifcfg-eth1, notice the ONBOOT equals 'no':

    # Generated by parse-kickstart
    UUID=d2dd9c27-f24d-4255-a86a-ce77ceecc79d
    DNS1=10.0.0.1
    IPADDR=10.0.0.111
    GATEWAY=10.0.0.254
    NETMASK=255.255.255.0
    BOOTPROTO=static
    DEVICE=eth1
    ONBOOT=no
    IPV6INIT=no

In /etc/sysconfig/network-scripts/ifcfg-eth2 I see an unexpected value for
the BOOTPROTO parameter:

    # Generated by parse-kickstart
    UUID=2d50da04-ae14-464c-8f95-6b9637058c20
    BOOTPROTO=none
    DEVICE=eth2
    ONBOOT=yes
    IPV6INIT=no
    TYPE=Ethernet
    IPADDR=192.168.0.111
    PREFIX=24
    DEFROUTE=yes
    IPV4_FAILURE_FATAL=no
    NAME="System eth2"

This is the pxelinux.cfg that sets the kernel parameters for bootstrapping
the kickstart installation:

    default linux
    label linux
       kernel centos72/images/pxeboot/vmlinuz
       append initrd=centos72/images/pxeboot/initrd.img
inst.ks=http://kickstart.lan/ks/host1.txt net.ifnames=0 ipv6.disable=1

And this is the kickstart, hosted at http://kickstart.lan/ks/host1.txt:

    install
    text
    url --url http://kickstart.lan/centos72
    lang en_US.UTF-8
    keyboard --vckeymap=us --xlayouts='us'
    services --enabled=NetworkManager,sshd
    reboot

    rootpw PASSWORD
    auth --enableshadow --passalgo=sha512
    selinux --enabled
    timezone Europe/Amsterdam --isUtc

    skipx
    eula --agreed

    network --onboot=off --device=eth0
    network --onboot=on --device=eth1 --bootproto=static --noipv6
--ip=10.0.0.111 --netmask=255.255.255.0 --hostname=host1
--gateway=10.0.0.254 --nameserver=10.0.0.1
    network --onboot=on --device=eth2 --bootproto=static --noipv6
--ip=192.168.0.111 --netmask=255.255.255.0

    bootloader --append=" crashkernel=auto" --location=mbr --boot-drive=sda
    firstboot --enable

    ignoredisk --only-use=sda
    autopart --type=plain
    clearpart --all --initlabel --drives=sda

    %packages
    @core
    kexec-tools
    %end

    %addon com_redhat_kdump --disable
    %end

And these are the network lines that are present post-installation in
/root/anaconda-ks.cfg:

    # Network information
    network  --bootproto=dhcp --device=eth0 --onboot=off
    network  --bootproto=static --device=eth1 --gateway=10.0.0.254
--hostname=host1 --ip=10.0.0.111 --nameserver=10.0.0.1
--netmask=255.255.255.0 --noipv6
    network  --bootproto=static --device=eth2 --ip=192.168.0.111
--netmask=255.255.255.0 --noipv6

So for some reason, the --onboot=yes flags present in the original
kickstart got dropped. Is this a bug in anaconda/pykickstart, or am I doing
something wrong?


Greetings,

Joost Molenaar


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]