Unique kickstart file for every host

Issues related to applications and software problems
nishanth9042
Posts: 4
Joined: 2016/03/15 21:06:41

Unique kickstart file for every host

Postby nishanth9042 » 2017/12/29 07:17:50

Hello Team,

I have a requirement of automating installations in my lab environment. I am able to do unattended installation of centos 6.5 but the requirement is to use unique kickstart files for every host because each have different requirements.

Currently I am using the following in menu

menu label ^1) Install Centos 6 64 Bit i
kernel centos6_64/images/pxeboot/vmlinuz append initrd=centos6_64/images/pxeboot/initrd.img ks=http://192.168.1.70/ks.cfg

Can some one please guide me on how to use different kickstart files for different servers.

Thanks.

User avatar
TrevorH
Forum Moderator
Posts: 21492
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Unique kickstart file for every host

Postby TrevorH » 2017/12/29 10:38:26

Just change the name of the kickstart file you point to.

Since you're using PXE, it retrieves the menu file based on the requesting MAC address so you can tailor the menu per ethernet card.

Also, please don't use CentOS 6.5. It was released in December 2013 and is now more than 4 years out of date. The current CentOS 6 version is 6.9 and there are critical patches to go on top of that too. Run yum update to get up to date.
CentOS 5 died in March 2017 - migrate NOW!
Full time Geek, part time moderator. Use the FAQ Luke

nishanth9042
Posts: 4
Joined: 2016/03/15 21:06:41

Re: Unique kickstart file for every host

Postby nishanth9042 » 2017/12/29 11:30:25

Hi Trevor,

Thanks for the reply. I have 100 servers in my environment and I want to use individual kickstart files for many of them. Is there a way to tag each kickstart file to the host ?

I am just testing on Cent OS 6.5.

I think there should be a way to automatically download the kickstart file based on mac address.

User avatar
TrevorH
Forum Moderator
Posts: 21492
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Unique kickstart file for every host

Postby TrevorH » 2017/12/29 11:36:43

Read the file /usr/share/doc/syslinux-4.05/pxelinux.txt and it tells you the various different menu files that a PXE target will request from the server. The last one tried is pxelinux.cfg/default which is probably the one you're using now as the catch-all drop through that everything uses. You can use a file per PXE client based on the MAC address of the requester and specify a different kickstart file in each one (there is no requirement that it be called ks.cfg, you can call it whatever you want).
CentOS 5 died in March 2017 - migrate NOW!
Full time Geek, part time moderator. Use the FAQ Luke

nishanth9042
Posts: 4
Joined: 2016/03/15 21:06:41

Re: Unique kickstart file for every host

Postby nishanth9042 » 2017/12/29 11:47:13

Thanks let me go through it and get back to you.

User avatar
avij
Forum Moderator
Posts: 2234
Joined: 2010/12/01 19:25:52
Location: Helsinki, Finland
Contact:

Re: Unique kickstart file for every host

Postby avij » 2017/12/29 23:06:34

Another option would be to move the logic to the web server. The kickstart parameter does not need to point to a static file. It could just as well point to some sort of a script that generates the kickstart file on the fly, based on the source IP address (MAC addresses are more difficult with this approach). If you are so inclined, you could even set up a fancy web user interface for that kickstart management.

User avatar
TrevorH
Forum Moderator
Posts: 21492
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Unique kickstart file for every host

Postby TrevorH » 2017/12/29 23:16:39

See cobbler.
CentOS 5 died in March 2017 - migrate NOW!
Full time Geek, part time moderator. Use the FAQ Luke

nishanth9042
Posts: 4
Joined: 2016/03/15 21:06:41

Re: Unique kickstart file for every host

Postby nishanth9042 » 2017/12/30 18:30:20

Thanks Avij , Can you please guide me if there is any documentation for that. I have tried Trevor's suggestion but it is not working. Let me try and get back.