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?

Solution Verified - Updated -

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 network information 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 %pre script and then used with %include macro in kickstart body, its not taken into consideration by anaconda at all. For example, in the following script, it will generate a file /tmp/buildnet which can be used using %include /tmp/buildnet in 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 anaconda shipped 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, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content