[CentOS] Kickstart Network Configuration Issues

Nico Kadel-Garcia nkadel at gmail.com
Tue Dec 28 16:46:55 UTC 2010


On Tue, Dec 28, 2010 at 10:59 AM, Daniel Theisen <dtheisen at nexcess.net> wrote:
> Hello all,
> I've been struggling with an issue with my kickstart configuration for a while now. My kickstart files are stored within the initrd image. What I would like to do here, is when the kickstart first starts up, I want it to grab a DHCP address (it does at the moment) so it can grab all of the necessary installation data off the net. Then, at some point _IN_ the install process, I'd like to have it query for manually input network settings. Here is my current kickstart script:

This is a common setup. My suggested approach is to always use DHCP,
and set DHCP reservations on your DHCP server to consistently assign
the same IP to the same client's MAC address. That way, you can assign
the IP and hostname in your local DNS or /etc/hosts or NIS hosts table
or whatever, and get it set consistently.

The only missing feature this way for CentOS 5 is the list of
automatic search domains, for which the network setup tools provide no
DHCP compatible hook and the DHCP is too old to follow the years-old
RFC and handle multiple searchable domains. The answer to that is to
manually put a "SEARCH" setting in /etc/sysconfig/network.

>  url --url=http://mirror.nexcess.net/CentOS/5.5/os/x86_64/

If you're going to be doing this a lot, set up a local CentOS mirror
and take most of the load off the external servers. It's a lot of
bandwidth to be eating all the time for rebuilds.

>  %post
>  echo "nameserver 4.2.2.1" > /etc/resolv.conf
>  echo "nameserver 8.8.8.8" >> /etc/resolv.conf
>
>  # write netconfig script
>  cat << EOF > /bin/netconfig
>  #!/bin/bash
>  # check if user is root
>  if [[ \$EUID -ne 0 ]]; then
>      echo "This script must be run as root" 1>&2
>      exit 1
>  fi
>  # run system-config-network-tui
>  /usr/sbin/system-config-network-tui


You can set up the eth0/eth1/etc. ports entirely from the output of
"/sbin/ifconfig". If folks like, I'll try to dig up my tools.

The "system-config-network-tui" script is, sadly, pretty useless for
auto-provisioning. None of RHEL's upstream tools have support for
configuring pair bonding or network bridging correctly, which is
pretty important for servers or KVM virtualization server setups.



More information about the CentOS mailing list