How to pass arguments to a kickstart installation procedure on CentOS 7?
I need to install multiple servers that have similar configuration except some differences that I would like to pass to kickstart before installation.
Server Fault is a question and answer site for system and network administrators. It only takes a minute to sign up.Sign up to join this community
One way would be to create a syslinux simple boot menu,
Based on the menu selection invoke kernel with different parameters, eg.
label foo kernel vmlinuz append initrd=initrd.img inst.ks=hd:LABEL=DATA:/path machinetype=foo label bar kernel vmlinuz append initrd=initrd.img inst.ks=hd:LABEL=DATA:/path machinetype=bar
This kernel param thus passed can be parsed in your kickstart file,
%post machinetype=$(grep -o machinetype=[a-zA-Z]* /proc/cmdline| cut -d '=' -f 2) # $machinetype now contains the input passed during boot.