%pre
The pre-install is not inside a chroot environment, so whatever variables you set or export are only available for use outside of a chroot. And that’s the problem with the post install by default.
%post
The post-install is inside a chroot by default. If you attempt to use variables set in the %pre section, you will find they’re not set. If you add –nochroot to the %post declaration, you can share things between the two sections of your kickstart file.
You can also write out to a file in the %pre and read from it in the %post. Just don’t forget files on the newly installed disk such as /etc/fstab are actually /mnt/sysimage/etc/fstab once you’re outside the chroot.

Posted by admica @ 6 August 2010