Why is the bonding information if mentioned in %pre script of kickstart file not taken into consideration by anaconda in Red Hat Enterprise Linux 6.4?
Issue
- In Red Hat Enterprise Linux 6.4 release notes, its mentioned that Configuring Bonding via kickstart was supported. The same is mentioned in solution 69055 as well.
- But this is creating bonding devices only when the
networkinformation is provided in kickstart body as follows.
network --onboot yes --activate --device bond0 --bootproto static --ip=xxx.xxx.xxx.xxx --netmask=255.255.255.0 --gateway=yyy.yyy.yyy.yyy --hostname=test.example.com --noipv6 --nameserver zzz.zzz.zzz.zzz --bondopts=mode=balance-tlb,miimon=100 --bondslaves eth0,eth1
- If the bonding information is provided in
%prescript and then used with%includemacro in kickstart body, its not taken into consideration byanacondaat all. For example, in the following script, it will generate a file/tmp/buildnetwhich can be used using%include /tmp/buildnetin kickstart body.
%pre --interpreter=/bin/bash --logfile /tmp/prescript.log
eval `ifconfig eth0 | grep 'inet addr' | sed 's/Bcast//' | gawk -F: '{print "IP="$2 "NETMASK="$4}'`
GATEWAY=`/sbin/route -n | grep ^0.0.0.0 | head -1 | awk '{ print $2 }'`
BOND=`cat /sys/class/net/eth1/operstate`
touch /tmp/buildnet
if [ $BOND == "up" ];then
cat << EOF > /tmp/buildnet
network --onboot=yes --activate --device=bond0 --bootproto=static --ip=$IP --netmask=$NETMASK --gateway=$GATEWAY --nameserver=aa.bb.cc.dd --hostname=$HOSTNAME --noipv6 --bondopts=mode=balance-tlb,miimon=100 --bondslaves=eth0,eth1
EOF
fi
%end
- Is there any problem with
anacondashipped with Red Hat Enterprise Linux 6.4?
Environment
- Red Hat Enterprise Linux 6.4
anaconda-13.21.195-1.el6.x86_64
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
