Using variables in sections or command inside a Kickstart file

Hi !

I couldn’t use successfully variables in the following sections or command inside a kickstart file to be parsed by Anaconda:

%pre or %post sections
creating variables is possible in theses script sections but can not be exported.
export variable does not make $variable usable in other sections of the kickstart file

ignoredisk --only-use=sda does not accept a syntax like: ignoredisk --only-use=$variable

part /boot/efi --fstype="efi" --ondisk=sda does not accept a syntax like part /boot/efi --fstype="efi" --ondisk=$variable

and so on…

Does anyone have hints on how to use variables inside a kickstart file ?

Did you see the doc and the example:
Kickstart Syntax Reference :: Fedora Docs

Did you not forget to put the
#!/bin/xxx while using the export command?

Thanks @ilikelinux !
#!/bin/xxx is indeed present.

I’ll certainly look into your reference :slight_smile:

Would you know where the logs during an Ananconda install are stored when a Kickstart file is executed ?
Thus I can insert in %pre section commands to save the logfiles and understand what is wrong between to boots ?

Your questions would be obsolete if you just would have a look to the example file I linked you.
And by the way, the reference is not mine … it is the official documentation made by the community … it is also yours :grin: