Hi Martin, Well, that went quick! Thanks for your reply. I found the problem. I notice that your example is on RHEL4, and the the other example I have is in RHEL 3 documentation. Because of its small size, I develop with RHEL2.1 (it installs so quickly!). And thats the problem: RHEL 2.1 does not support the "%include" directive. I tested my Kickstart script with %include on RHEL 3 and 4, and there it works fine. Does anyone have a solution for dynamic partitioning under RHEL 2.1??? Mit freundlichen Grüßen, Christian Rohrmeier _________________ Christian Rohrmeier Schering AG Corporate IT - Infrastructure and Services Computer Systems and Operations System Administration - Research and Development Tel +49 30 468 15794 Fax +49 30 468 95794 Martin Høy <marhoy@xxxxxxxxx> Sent by: To: Discussion list about Kickstart <kickstart-list@xxxxxxxxxx> kickstart-list-bounces cc: @redhat.com Subject: Re: Kickstart %include directive and %pre script issues 21.04.2005 16:35 Please respond to martin.hoy; Please respond to Discussion list about Kickstart On 4/21/05, Christian.Rohrmeier@xxxxxxxxxxx <Christian.Rohrmeier@xxxxxxxxxxx> wrote: > Hello Dear Kickstarters, > > I'm running RHEL 2.1, 3, and 4, all of which need to be served by the > kickstart script in question. > > I have found a problem with the "%include" directive when including a file > that is created by the %pre script. > > What I want to do: dynamic disk partitioning. A great example of this can > be found on page 56 of the RHEL 3 System Administration Guide. The idea is, > in your %pre script you check out the disk situation, or ask the user > something, and write the apropriate kickstart partitioning commands (as > they would normally be found in the commands section of the kickstart > script) into a file. This file was already included (via the %include > directive) in the commands section of the kickstart file. > > And thats the catch: while anaconda parses the kickstart script, it > encounters the %include before it executes the the %pre script, and it dies > a horrible death, spewing python errors, because it can't get to those > precious "part" commands. I'm doing exactly that, and it works. The %pre-script checks the present partition layout, and decides wether it will re-use the existing partitions or create new ones. See the attached ks.cfg. Sorry about the mixed english/norwegian in the script. We're just - norwegian. Regards, Martin (See attached file: ks.cfg)_______________________________________________ Kickstart-list mailing list Kickstart-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/kickstart-list
Attachment:
ks.cfg
Description: Binary data