[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

RE: How to use kickstart when I have 2 network card

For the initial pxeboot process you will need to know which NIC the system recognizes.  However, for the kickstart file itself you could use something like what I've done.
Using the pre-execution section you can create a couple of include files which replace the actual section in the ks file.
This pre-ex section checks for the kind of HD as well as the NIC being use.  In place of the "network...." entry you would use %include /tmp/nic-include and in place of the HD partition info you use %include /tmp/part-include
#sleep 30s
# Pre-installation determine if we have an ide drive or a scsi drive.
# Append hard drive partition commands to a file. This file is included
# above in the disk partitioning section for use during hard drive partitioning.
# If the ide directory exists, loop through all "hd" entries looking for "disk"
# in the media file. When a "disk" entry is first found set the install drive to this
# this drive.
if [[ -d /proc/ide ]]
   cd /proc/ide
   for which_drive in `ls -d hd*`
      if [[ `grep disk $which_drive/media` && $found_ide_drive != "true" ]]
# No ide hard drive was found so we must have scsi drive. Set the drive to sda
if [[ $found_ide_drive = "false" ]]
echo "part /boot --fstype ext3 --size 100 -- > /tmp/part-include
echo "part / --fstype ext3 --size 1 -- --grow" >> /tmp/part-include
echo "part swap --size 3072 -- >> /tmp/part-include
NIC=`ifconfig|grep eth|awk '{ print $1 }'`
echo "network --device $NIC --onboot yes --bootproto dhcp " > /tmp/nic-include
Good luck.

From: kickstart-list-bounces redhat com [mailto:kickstart-list-bounces redhat com] On Behalf Of Zheng, Shaohui
Sent: Thursday, April 26, 2007 1:21 AM
To: kickstart-list redhat com
Subject: How to use kickstart when I have 2 network card

Hi all

       I meet problems when I use kickstart to do a full automation installation. I try to install the OS from a NFS server, all the ISO files and kickstart configuration files are in network. It works well if we have one network card only, but if some machine have 2 network card, it can not do it automatically. The kickstart manual says that if we have two network card, we must put the kickstart configuration file in local file system. Does it mean we do not have any other solution if we put the configuration file in network? If you know how to do it, would you please tell me, your suggestion is helpful for me, thanks so much.



Best Regards


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]