Bug 97571

Summary: kickstart %pre poorly documented
Product: Red Hat Enterprise Linux 2.1 Reporter: Travis Crawford <travis_b_crawford>
Component: anacondaAssignee: Tammy Fox <tammy.c.fox>
Status: CLOSED NEXTRELEASE QA Contact: Mike McLean <mikem>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.1   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2003-08-19 15:40:30 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Travis Crawford 2003-06-17 20:31:39 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.3.1) Gecko/20030425

Description of problem:
Use of the %pre directive is poorly documented, especially with regard to how it
interacts with the rest of the install process. The %include directive in more
recent versions of anaconda fixes this shortcoming, but it doesn't really help
when working with the current version of AS.

Specifically, documenting how a %pre script can (if it can) modify the kickstart
file. An example would be determining the hardware type (with dmidecode), and
loading the appropriate driver (such as a scsi controller driver that was
unsupported when AS 2.1 initially shipped).

Thanks.

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. Search for %pre information in places such as the mailing list, google, etc.
2. Find hardly anything.

Additional info:

Comment 1 Jeremy Katz 2003-06-17 20:47:05 UTC
You can't do this in 2.1 (it's why the %include directive was added).  

Assigning to Tammy to double-check what's currently there for the next release.

Comment 3 Tammy Fox 2003-06-17 22:03:43 UTC
The latest step of docs for kickstart show how to use the %pre section to
determine information and then include it later in the kickstart file. Like
Jeremy said, the %include directive was added after RHEL 2.1. Is this the type
of example you are looking for?

Comment 4 Travis Crawford 2003-06-18 12:08:07 UTC
In the kickstart-mailing list there have been reports of regenerating an entire
kickstart file in the %pre section, and writing it to /tmp/ks.cfg so that the
new version will be reread after %pre. grep'ing through /usr/lib/anaconda does
not find that string, but I did find /tmp/anaconda-ks.cfg. So I tried writing to
both of these locations in %pre but without success. Is regenerating the entire
kickstart file in %pre possible in AS 2.1?

Thanks.

Comment 5 Tammy Fox 2003-08-19 15:40:30 UTC
The next version will include %include, and the next version of the docs will
include an example of how to use %pre to create a file and include it with %include.