<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML xmlns="http://www.w3.org/TR/REC-html40" xmlns:o = 
"urn:schemas-microsoft-com:office:office" xmlns:w = 
"urn:schemas-microsoft-com:office:word"><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.3059" name=GENERATOR>
<STYLE>@font-face {
        font-family: 宋
}
@font-face {
        font-family: Trebuchet MS;
}
@font-face {
        font-family: @宋体;
}
@font-face {
        font-family: Comic Sans MS;
}
@page Section1 {size: 595.3pt 841.9pt; margin: 72.0pt 90.0pt 72.0pt 90.0pt; layout-grid: 15.6pt; }
P.MsoNormal {
        TEXT-JUSTIFY: inter-ideograph; FONT-SIZE: 10.5pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"; TEXT-ALIGN: justify
}
LI.MsoNormal {
        TEXT-JUSTIFY: inter-ideograph; FONT-SIZE: 10.5pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"; TEXT-ALIGN: justify
}
DIV.MsoNormal {
        TEXT-JUSTIFY: inter-ideograph; FONT-SIZE: 10.5pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"; TEXT-ALIGN: justify
}
A:link {
        COLOR: blue; TEXT-DECORATION: underline
}
SPAN.MsoHyperlink {
        COLOR: blue; TEXT-DECORATION: underline
}
A:visited {
        COLOR: purple; TEXT-DECORATION: underline
}
SPAN.MsoHyperlinkFollowed {
        COLOR: purple; TEXT-DECORATION: underline
}
SPAN.EmailStyle17 {
        FONT-WEIGHT: normal; COLOR: windowtext; FONT-STYLE: normal; FONT-FAMILY: "Trebuchet MS"; TEXT-DECORATION: none; mso-style-type: personal-compose
}
DIV.Section1 {
        page: Section1
}
</STYLE>
</HEAD>
<BODY lang=ZH-CN style="TEXT-JUSTIFY-TRIM: punctuation" vLink=purple link=blue>
<DIV dir=ltr align=left><SPAN class=728004512-26042007><FONT face=Arial 
color=#0000ff size=2>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.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=728004512-26042007><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=728004512-26042007><FONT face=Arial 
color=#0000ff size=2>Using the pre-execution section you can create a couple of 
include files which replace the actual section in the ks 
file.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=728004512-26042007><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=728004512-26042007><FONT face=Arial 
color=#0000ff size=2>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</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=728004512-26042007><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=728004512-26042007><FONT face=Arial 
color=#0000ff size=2>i.e.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=728004512-26042007><FONT face=Arial 
color=#0000ff size=2>%pre<BR>#sleep 30s</FONT></SPAN></DIV>
<DIV> </DIV>
<DIV dir=ltr align=left><SPAN class=728004512-26042007><FONT face=Arial 
color=#0000ff size=2>#!/bin/sh</FONT></SPAN></DIV>
<DIV> </DIV>
<DIV dir=ltr align=left><SPAN class=728004512-26042007><FONT face=Arial 
color=#0000ff size=2># Pre-installation determine if we have an ide drive or a 
scsi drive.<BR># Append hard drive partition commands to a file. This file is 
included<BR># above in the disk partitioning section for use during hard drive 
partitioning.</FONT></SPAN></DIV>
<DIV> </DIV>
<DIV dir=ltr align=left><SPAN class=728004512-26042007><FONT face=Arial 
color=#0000ff size=2>found_ide_drive=false</FONT></SPAN></DIV>
<DIV> </DIV>
<DIV dir=ltr align=left><SPAN class=728004512-26042007><FONT face=Arial 
color=#0000ff size=2># If the ide directory exists, loop through all "hd" 
entries looking for "disk"<BR># in the media file. When a "disk" entry is first 
found set the install drive to this<BR># this drive.<BR>if [[ -d /proc/ide 
]]<BR>then<BR>   cd /proc/ide<BR>   for which_drive in `ls 
-d hd*`<BR>   do<BR>      if [[ `grep disk 
$which_drive/media` && $found_ide_drive != "true" 
]]<BR>      
then<BR>         
drive=$which_drive<BR>         
found_ide_drive=true<BR>      fi<BR>   
done<BR>fi</FONT></SPAN></DIV>
<DIV> </DIV>
<DIV dir=ltr align=left><SPAN class=728004512-26042007><FONT face=Arial 
color=#0000ff size=2># No ide hard drive was found so we must have scsi drive. 
Set the drive to sda<BR>if [[ $found_ide_drive = "false" 
]]<BR>then<BR>   drive=sda<BR>fi</FONT></SPAN></DIV>
<DIV> </DIV>
<DIV dir=ltr align=left><SPAN class=728004512-26042007><FONT face=Arial 
color=#0000ff size=2>echo "part /boot --fstype ext3 --size 100 --ondisk=$drive" 
> /tmp/part-include<BR>echo "part / --fstype ext3 --size 1 --ondisk=$drive 
--grow" >> /tmp/part-include<BR>echo "part swap --size 3072 
--ondisk=$drive" >> /tmp/part-include</FONT></SPAN></DIV>
<DIV> </DIV>
<DIV dir=ltr align=left><SPAN class=728004512-26042007><FONT face=Arial 
color=#0000ff size=2>NIC=`ifconfig|grep eth|awk '{ print $1 
}'`</FONT></SPAN></DIV>
<DIV> </DIV>
<DIV dir=ltr align=left><SPAN class=728004512-26042007><FONT face=Arial 
color=#0000ff size=2>echo "network --device $NIC --onboot yes --bootproto dhcp " 
> /tmp/nic-include</FONT></SPAN></DIV>
<DIV><SPAN class=728004512-26042007><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=728004512-26042007><FONT face=Arial color=#0000ff size=2>Good 
luck.</FONT></SPAN></DIV>
<DIV><SPAN class=728004512-26042007><FONT face=Arial color=#0000ff 
size=2>Jack</DIV>
<DIV dir=ltr align=left><BR></DIV></FONT></SPAN><BR>
<BLOCKQUOTE dir=ltr 
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
  <DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
  <HR tabIndex=-1>
  <FONT face=Tahoma size=2><B>From:</B> kickstart-list-bounces@redhat.com 
  [mailto:kickstart-list-bounces@redhat.com] <B>On Behalf Of </B>Zheng, 
  Shaohui<BR><B>Sent:</B> Thursday, April 26, 2007 1:21 AM<BR><B>To:</B> 
  kickstart-list@redhat.com<BR><B>Subject:</B> How to use kickstart when I have 
  2 network card<BR></FONT><BR></DIV>
  <DIV></DIV>
  <DIV class=Section1 style="LAYOUT-GRID:  15.6pt none">
  <P class=MsoNormal><FONT face="Trebuchet MS" size=2><SPAN lang=EN-US 
  style="FONT-SIZE: 10pt; FONT-FAMILY: 'Trebuchet MS'">Hi 
  all<o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face="Trebuchet MS" size=2><SPAN lang=EN-US 
  style="FONT-SIZE: 10pt; FONT-FAMILY: 'Trebuchet MS'">       
  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.<o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face="Trebuchet MS" size=2><SPAN lang=EN-US 
  style="FONT-SIZE: 10pt; FONT-FAMILY: 'Trebuchet MS'"><o:p> </o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face="Comic Sans MS" color=silver size=2><SPAN 
  lang=EN-US 
  style="FONT-SIZE: 10pt; COLOR: silver; FONT-FAMILY: 'Comic Sans MS'">Shaohui</SPAN></FONT><SPAN 
  lang=EN-US><o:p></o:p></SPAN></P>
  <P class=MsoNormal><FONT face="Comic Sans MS" color=silver size=2><SPAN 
  lang=EN-US 
  style="FONT-SIZE: 10pt; COLOR: silver; FONT-FAMILY: 'Comic Sans MS'">Best 
  Regards</SPAN></FONT><SPAN lang=EN-US><o:p></o:p></SPAN></P>
  <P class=MsoNormal><FONT face="Times New Roman" size=2><SPAN 
  lang=EN-US><o:p> </o:p></SPAN></FONT></P></DIV></BLOCKQUOTE></BODY></HTML>