Specifying values dynamically using pre section
Jesse Keating
jkeating at j2solutions.net
Wed Sep 6 12:18:02 UTC 2006
On Wednesday 06 September 2006 06:03, Ajitabh Pandey wrote:
> I am sure there is a dynamic way of specifying such differences in the
> form of variables in the pre section of the kickstart. If yes, can
> someone give some examples. This will also help me in setting up the
> hostname, ip-address and so on dynamically.
We specificed the method at the bootloader time, not in the kickstart file.
From the PXE menu an installer could choose 'rhel464' which would pass the
correct kernel and a method=nfs:server:/path/to/64bit/tree. This way the
actual kickstart file can be arch agnostic and used for both arches.
The way I've found to pass data from %pre to the rest of the kickstart is to
process things such as kernel arguments (/proc/cmdline) and create kickstart
file stubs in /tmp/. Then in the kickstart file you can
do %include /tmp/stub to get your dynamic content. Using this usually left
us with pretty sparse base kickstart files and all the magic happening
in %pre to write out stubs to be included. Things were very arch agnostic
and even install type (full, special selection, partitioning, etc..)
agnostic. We could use the same base kickstart file for a plethora of
different installs due to the magic that would happen in %pre processing.
The key was specifying method at boot time (method can't be %included) and
smart scripting in %pre.
--
Jesse Keating RHCE (geek.j2solutions.net)
Fedora Legacy Team (www.fedoralegacy.org)
GPG Public Key (geek.j2solutions.net/jkeating.j2solutions.pub)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/kickstart-list/attachments/20060906/408215ea/attachment.sig>
More information about the Kickstart-list
mailing list