Hi
Like many others, we had some problems with the order of the network cards
during and after the installation. We found a way to workaround that problem,
i'll try to explain how we did that:
- Device for Installation:
There are several points during installation where the network card is
configured. There is a way to ensure that always the same card is used.
First, enable pxe only on the device you want to use for the installation.
After that, we tell the install kernel that we want to use the same device to
fetch the kickstart.
/etc/cobbler/setting:
---------8<------------
kernel_options:
ksdevice: bootif
---------8<------------
We change the value of ksdevice to bootif. bootif is a variable.
/etc/cobbler/pxesystem.template:
---------8<------------
default linux
prompt 0
timeout 1
label linux
kernel $kernel_path
$append_line
IPAPPEND 2
---------8<------------
We add IPAPPEND 2 to the template file. This adds the bootif variable which
contains the network device information to the append line.
Finally we need to ensure that anaconda uses the same device. Simply remove
all network commands from your kickstart template/snippets and replace it
with:
network --bootproto=dhcp
- Configure the network cards with the information from cobbler
We found that anaconda is not able to create the configuration of the network
devices related to their MAC/hardware address. We decided to write a cheetah
template, that uses the information form cobbler to write the network
configuration directly to /etc/sysconfig/network-scripts/
/var/lib/cobbler/snippets/post_baremetal
---------8<------------
# Network information
#set $network_baremetal_file = '/etc/sysconfig/network'
echo "NETWORKING=yes" > $network_baremetal_file
echo "NETWORKING_IPV6=no" >> $network_baremetal_file
#for $n in $range(8, -1, -1)
#set $ns = str($n)
#if $getVar('mac_address_intf' + $ns, '')
#set $network_baremetal_device = 'eth' + $ns
#set $network_baremetal_mac = $getVar('mac_address_intf' + $ns, '')
#set $network_baremetal_devfile = '/etc/sysconfig/network-scripts/ifcfg-'
+ $network_baremetal_device
echo "DEVICE=$network_baremetal_device" > $network_baremetal_devfile
echo "HWADDR=$network_baremetal_mac" >> $network_baremetal_devfile
echo "ONBOOT=yes" >> $network_baremetal_devfile
#if $getVar('ip_address_intf' + $ns, '')
#if $getVar('ip_address_intf' + $ns, '')
#set $network_baremetal_ip = $getVar('ip_address_intf' + $ns, '')
echo "BOOTPROTO=static" >> $network_baremetal_devfile
echo "IPADDR=$network_baremetal_ip" >> $network_baremetal_devfile
#if $getVar('subnet_intf' + $ns, '')
#set $network_baremetal_netmask = $getVar('subnet_intf' + $ns,
'')
echo "NETMASK=$network_baremetal_netmask" >>
$network_baremetal_devfile
#else
echo "NETMASK=255.255.255.0" >> $network_baremetal_devfile
#end if
#if $getVar('gateway_intf' + $ns, '')
#set $network_baremetal_gateway = $getVar('gateway_intf' + $ns,
'')
#set $network_baremetal_hostname = $getVar('hostname_intf' +
$ns, 'not-found.example.com')
echo "HOSTNAME=$network_baremetal_hostname" >>
$network_baremetal_file
echo "GATEWAY=$network_baremetal_gateway" >>
$network_baremetal_file
#end if
#end if
#else
echo "BOOTPROTO=dhcp" >> $network_baremetal_devfile
#end if
#end if
#end for
---------8<------------
We hope this helps someone else too.
Greetings
Puzzle Operations Team