How to use different kickstart files for different servers?

General support questions
Post Reply
hoanganhsvtech
Posts: 4
Joined: 2019/07/16 07:56:09

How to use different kickstart files for different servers?

Post by hoanganhsvtech » 2019/07/16 08:18:49

Hello,

I have requirement to use unique kickstart files for every host because each host have different kickstart config file.
I have 10 hosts.

I am using the following in menu:

label linux
menu label ^Kickstart install Centos 7.6
menu default
kernel netboot/vmlinuz
append initrd=netboot/initrd.img inst.repo=ftp://10.1.22.170/pub/centos7 ks=ftp://10.1.22.170/pub/ks.cfg

Currently I need to edit the ks.cfg file for each different host.
Could some one please guide me on how to use different kickstart files for different servers.

Thanks in advance.

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: How to use different kickstart files for different servers?

Post by TrevorH » 2019/07/16 12:06:13

The easy way to do that is by PXE itself. When a request comes into your PXE server, it attempts to fetch a filename based on its MAC address and if none of the attempts it makes is successful then it drops through and uses the file "default". Read the file /usr/share/doc/syslinux-4.05/pxelinux.txt and search for "MAC" and you'll see a section telling you the filenames it attempts to fetch.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

hoanganhsvtech
Posts: 4
Joined: 2019/07/16 07:56:09

Re: How to use different kickstart files for different servers?

Post by hoanganhsvtech » 2019/07/17 06:46:32

hi TrevorH,

Thank you for your help. i'll try it.

hoanganhsvtech
Posts: 4
Joined: 2019/07/16 07:56:09

Re: How to use different kickstart files for different servers?

Post by hoanganhsvtech » 2019/07/17 07:36:40

TrevorH wrote:
2019/07/16 12:06:13
The easy way to do that is by PXE itself. When a request comes into your PXE server, it attempts to fetch a filename based on its MAC address and if none of the attempts it makes is successful then it drops through and uses the file "default". Read the file /usr/share/doc/syslinux-4.05/pxelinux.txt and search for "MAC" and you'll see a section telling you the filenames it attempts to fetch.
Hi Trevor,

Thank you so much.

It work for me. :D :D

Post Reply