0

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.

0

One way would be to create a syslinux simple boot menu,

https://www.syslinux.org/doc/menu.txt

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.