Red Hat Enterprise Linux 7 kickstart is failing with network defintion from %pre

Solution Verified - Updated -

Issue

  • When I add the following line to Kickstart Details -> Advanced Options -> Custom Options in Satellite 5.6, installation fails:
%include /tmp/network
  • In %pre section, the following script is executed to generate /tmp/network
echo "network --noipv6 --onboot=yes --bootproto=static --ip=10.1.1.10 --netmask=255.255.255.0 --nameserver=10.1.2.3 --device=00:50:56:a8:2b:fb" > /tmp/network
echo "network --noipv6 --onboot=yes --bootproto=static --ip=172.16.32.97 --netmask=255.255.255.0 --gateway=172.16.32.254 --nameserver=10.1.2.3 --device=00:50:56:a8:52:0a --hostname=serverX --activate" >> /tmp/network
  • python trace-back reported when installing RHEL 7 using kickstart and networking configuration defined within %pre section
Traceback (most recent call first):
  File "/usr/lib64/python2.7/site-packages/pyanaconda/nm.py", line 870, in nm_ipv4_to_dbus_int
    return struct.unpack("=L", socket.inet_aton(address))[0]
  File "/usr/lib64/python2.7/site-packages/pyanaconda/network.py", line 396, in _get_ip_setting_values_from_ksdata
    gateway4 = nm.nm_ipv4_to_dbus_int(networkdata.gateway)
  File "/usr/lib64/python2.7/site-packages/pyanaconda/network.py", line 459, in add_connection_for_ksdata
    values = _get_ip_setting_values_from_ksdata(networkdata)
  File "/usr/lib64/python2.7/site-packages/pyanaconda/network.py", line 1226, in apply_kickstart
    added_connections = add_connection_for_ksdata(network_data, dev_name)
  File "/usr/lib64/python2.7/site-packages/pyanaconda/network.py", line 1243, in networkInitialize
    devnames = apply_kickstart(ksdata)
  File "/sbin/anaconda", line 1144, in <module>
    networkInitialize(ksdata)
error: illegal IP address string passed to inet_aton

Environment

  • Red Hat Enterprise Linux 7 and 7.1 (RHEL)

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.