Anyone got any idea why it didn't work in %pre?
The %pre section runs after the kickstart file is read but before it is
fully parsed. The main purpose for it is to fine-tune the kickstart
file. For example, before cobbler, I use it to set a random root
password, to generate a static network configuration for my servers, and
to specify a partition layout (using %include).
The %post section happens after the system has been installed, and is an
ideal place to customize the system configuration before rebooting.
Chris