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

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

 



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
 
i.e.
%pre
#sleep 30s
 
#!/bin/sh
 
# 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.
 
found_ide_drive=false
 
# 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 ]]
then
   cd /proc/ide
   for which_drive in `ls -d hd*`
   do
      if [[ `grep disk $which_drive/media` && $found_ide_drive != "true" ]]
      then
         drive=$which_drive
         found_ide_drive=true
      fi
   done
fi
 
# No ide hard drive was found so we must have scsi drive. Set the drive to sda
if [[ $found_ide_drive = "false" ]]
then
   drive=sda
fi
 
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.
Jack



From: kickstart-list-bounces@xxxxxxxxxx [mailto:kickstart-list-bounces@xxxxxxxxxx] On Behalf Of Zheng, Shaohui
Sent: Thursday, April 26, 2007 1:21 AM
To: kickstart-list@xxxxxxxxxx
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.

 

Shaohui

Best Regards

 


[Index of Archives]     [Red Hat General]     [CentOS Users]     [Fedora Users]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux