One thing I found is that trying to set up networking related stuff in the 
"%pre" section is likely not going to work.  The snippet of the 
"/tmp/anaconda.log" file below shows that it is trying to start the network and 
pick the interface it's going to use before the "%pre" section actually gets 
processed.  In my case, I was trying to take the MAC address from the kernel 
append parameters and parse the output of "ifconfig" to determine the device 
name for the MAC address.  Then I could write the "network --device=ethX 
--ip=X.X.X.X ..." line to "/tmp/network" and do an "%include /tmp/network".  I 
found that, even though I did this, it was still prompting me for which 
interface to use.  This was because it was trying to start the network before 
the "%pre" section even ran.
 
Luckily, Joseph gave me the workaround of "ksdevice=XX:XX:XX:XX:XX:XX" in the 
kernel append parameters.
 
I figured I'd just mention this to Tim so that he knows ahead of time that 
putting stuff in the "%pre" section may not always work as expected, but it 
depends on what someone is trying to do.  I'm not a Kickstart expert, however, 
so it's always worth experimenting.
 
13:43:57 INFO    : getting kickstart file
13:43:57 INFO    : getting kickstart file from first CDROM
13:43:57 INFO    : getFileFromBlockDevice(scd0, 
/0000001cc4de5dca0000000300000061)
13:43:57 INFO    : Searching for file on path 
/tmp/mnt//0000001cc4de5dca0000000300000061
13:43:57 INFO    : file copied to /tmp/ks.cfg
13:43:57 INFO    : setting up kickstart
13:43:57 INFO    : kickstartFromUrl
13:43:57 INFO    : results of url ks, url http://<my_ip>:60000/os/RHEL5U2-i386
13:43:57 DEBUG   : going to set language to en_US.UTF-8
13:43:57 INFO    : setting language to en_US.UTF-8
13:43:57 INFO    : need to set up networking
13:43:57 INFO    : going to pick interface
13:43:57 INFO    : going to do getNetConfig
13:43:57 INFO    : doing kickstart... setting it up
13:43:57 DEBUG   : waiting for link eth1...
13:44:01 DEBUG   :    4 seconds.
13:44:01 DEBUG   : sleep (nicdelay) for 0 secs first
13:44:01 DEBUG   : continuing...
13:44:01 ERROR   : no DNS servers, can't look up hostname
13:44:01 INFO    : starting to STEP_URL
13:44:01 INFO    : URL_STAGE_MAIN - url is http://<my_ip>:60000/os/RHEL5U2-i386
13:44:01 DEBUG   : url address <my_ip>:60000
13:44:01 DEBUG   : url prefix /os/RHEL5U2-i386
13:44:01 INFO    : trying to mount CD device scd0
13:44:01 INFO    : transferring 
http://<my_ip>:60000//os/RHEL5U2-i386/images/updates.img to a fd
13:44:04 INFO    : transferring 
http://<my_ip>:60000//os/RHEL5U2-i386/disc1/images/updates.img to a fd
13:44:06 INFO    : transferring 
http://<my_ip>:60000//os/RHEL5U2-i386/images/product.img to a fd
13:44:06 INFO    : transferring 
http://<my_ip>:60000//os/RHEL5U2-i386/disc1/images/product.img to a fd
13:44:06 INFO    : 3368284 kB are available
13:44:06 INFO    : transferring 
http://<my_ip>:60000//os/RHEL5U2-i386/images/stage2.img to a fd
13:44:07 DEBUG   : copied 86671360 bytes to /tmp/ramfs/stage2.img (complete)
13:44:07 INFO    : mntloop loop0 on /mnt/runtime as /tmp/ramfs/stage2.img fd is 
15
13:44:07 INFO    : got url http://<my_ip>:60000/os/RHEL5U2-i386
...
13:44:26 INFO    : Running kickstart %%pre script(s)
13:45:08 INFO    : All kickstart %%pre script(s) have been run

 
Rigoberto
 


--- On Thu, 3/19/09, Olt, Joseph <[email protected]> wrote:

From: Olt, Joseph <[email protected]>
Subject: RE: [rhelv5-list] Include statements in Kickstart files over NFS
To: "[email protected]" <[email protected]>, "Red Hat Enterprise Linux 5 
(Tikanga) discussion mailing-list" <[email protected]>
Date: Thursday, March 19, 2009, 7:15 AM








Tim,
 
As Rigoberto has indicated, you will need to do some %pre processing.  Either 
having the %pre script create the template_stuff.ks or you need to “mkdir 
/something” and “mount -r -o nolock <serverIP>:/share /something”.  Then you 
could access template_stuff.ks.  The problem you have is that the kickstart 
script is retrieved.  Once retrieved, you cannot reference that location 
directly.
 
Regards,
 
Joseph
 




From: [email protected] [mailto:[email protected]] On 
Behalf Of Rigoberto Corujo
Sent: Thursday, March 19, 2009 7:02 AM
To: Red Hat Enterprise Linux 5 (Tikanga) discussion mailing-list
Subject: Re: [rhelv5-list] Include statements in Kickstart files over NFS
 





Where are you creating the "template_stuff.ks" file?  In the "%pre" section?

 

Rigoberto

--- On Thu, 3/19/09, Tim Edwards <[email protected]> wrote:

From: Tim Edwards <[email protected]>
Subject: [rhelv5-list] Include statements in Kickstart files over NFS
To: " Red Hat Enterprise Linux 5 (Tikanga) discussion mailing-list" 
<[email protected]>
Date: Thursday, March 19, 2009, 5:09 AMHi,  Has anyone used include statements 
in kickstart files that are sharedover NFS. I've tried both relative and 
absolute paths:%include ../somedir/template_stuff.ks%include 
/full/path/template_stuff.ks  However in both cases the information from 
template_stuff.ks is notadded into the kickstart file and it prompts me.  Tim  
_______________________________________________rhelv5-list mailing 
[email protected]https://www.redhat.com/mailman/listinfo/rhelv5-list
 


      
_______________________________________________
rhelv5-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/rhelv5-list

Reply via email to