kickstart: %include
Last week I started playing with kickstart. You can read more about it in the howto section of my blog.
Today I was testing the %include command but every file and every path I tried gave me a file not found error.
It appears that just the specific kickstart config file is copied to /tmp and the other content of my usb-disk is nowhere to find. This explains why my included files can’t be found.
The solution is to make your included files available during the %pre-section. This is possible because anaconda will parse the ks.cfg file 2 times. The first time it won’t complain about included files that can’t be found and only the %pre section is executed. The second time it will complain if an include file is missing.
This is how I made my includes work:
* mount the usb-drive during the %pre section
%pre
mkdir -p /tmp/usb-disk-mount/
mount /dev/sda1 /tmp/usb-disk-mount/
* include the files
%include /tmp/usb-disk-mount/partition/base
%include /tmp/usb-disk-mount/network/dummy
February 1st, 2007
[...] a previous post I mentioned how you can mount your usb-drive. As you can see sda1 is hard-coded which isn’t [...]
December 24th, 2008
Oh, man, I can’t thank you enough. I was really frustrated trying to figure out how to include files from the USB drive. These instructions *really* saved me a lot of trouble.