Kickstart %include can’t open file

anacondacentos7kickstartrhel7

I want to break out my kickstart user definitions into a separate file.

Trying to pull that file in with %include, I get an error that breaks the install:

Unable to open input kickstart file: curl#37 – "Couldn't open file
/whatever/path/itry/user_section-ks.cfg"

This doc
and this doc
both say I can use it like this: %include /path/to/file

RH gives this example:

/usr/share/anaconda/user_section-ks.cfg

I've seen google results here and there, people using /tmp and file:///
I tried 'em both.

I've checked every name, checked permissions and se contexts run ksvalidator and … I'm stumped! Don't know what I don't know 🙁

Best Answer

I'm assuming you've placed a file you want to include on the same DVD or USB media from which you are trying to install RHEL.

The key here is that the installation media is not mounted at / when you boot into it. Rather, / is mounted from the read-only filesystem image /LiveOS/squashfs.img on the installation media.

The DVD/USB media itself gets mounted at /run/install/repo in RHEL 7. So if you placed a file mystuff.ks in the top level directory of the installation media, you will find it at /run/install/repo/mystuff.ks.