I'm using Kickstart to automate a CentOS 7 installation and I'd like to create a common Kickstart file so I can %include it. After some testing it seems like some commands (like text) cannot be included, but I can't find any official documentation which lists them.

I found a Kickstart file in a mailing list thread which says:

# These five entries must be contained in this file to be initially parsed.
lang en_US.UTF-8
keyboard us
nfs --server server.my.com --dir /var/ftp/pub/kickstartes5/Redhat/

I read that Anaconda parses the Kickstart file, runs the %pre script, and then re-parses the file. I also found this in the pykickstart documentation on %pre:

You can add commands to run on the system immediately after the ks.cfg has been parsed and the lang, keyboard, and url options have been processed.

It looks like Anaconda uses Dracut to do some Kickstart parsing as well, but I'm not sure what the implications are for a Kickstart file author... there's some code that says:

dracutCmds = {
    'cdrom': Cdrom,
    'harddrive': HardDrive,
    'nfs': NFS,
    'url': URL,
    'updates': Updates,
    'mediacheck': MediaCheck,
    'driverdisk': DriverDisk,
    'network': Network,
    'cmdline': DisplayMode,
    'graphical': DisplayMode,
    'text': DisplayMode,
    'bootloader': Bootloader,

1 Answer 1


Some kickstart commands represent setup tasks that have to be handled before the main installer can start, so they're only handled inside dracut. The ones I know of are:

  • Set display mode: text, graphical, cmdline
  • Load driver disks: driverdisk
  • Load installer updates: updates
  • Check install media: mediacheck

So those probably won't work in an %include, unless the %include target is visible inside dracut (like, say, if you injected it into the initrd, or put it on the same device as the kickstart..)

If you need to use one of those but it can't be in the main kickstart, you could try using the corresponding boot options instead:

  • Set display mode: inst.text, inst.graphical, inst.cmdline
  • Load driver disks: inst.dd=<url>
  • Load installer updates: inst.updates=<url>
  • Check install media: rd.live.check

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .