6

Is there a script or another way to automatically generate a kickstart configuration file from the system state of an existing server so that the file can be use to replicate (not clone) the configuration of the system in another install?

I know that the anaconda-ks.cfg file is stored on the /root dir. but the system in question have been extensively changed since it's installation, and the file is of no use now.

ÜMineiro
  • 63
  • 1
  • 1
  • 5

2 Answers2

4

This is one approach I know of. To my knowledge, there is no method to automatically generate a Kickstart file based on system state.

Run rpm -qa --qf '%{NAME}\n' and add to the %packages section in the Kickstart.

Nevertheless, this is not a comprehensive solution for maintaining system standards and builds. This is a more comprehensive answer I wrote on the subject:

Managing an application across multiple servers, or PXE vs cfEngine/Chef/Puppet

Warner
  • 24,174
  • 2
  • 63
  • 69
4

Just to add on the Warner's answer. While the rpm query will give you a list of installed packages, it won't help you construct a kickstart file that is close to your system configuration.

Red Hat provides a tool called "system-config-kickstart" which will allow you to use an Anaconda like wizard to create a kickstart file. You could use the tool to configure partitioning information, network, timezone, etc.

Adding the both togther will perhaps help you create a kickstart that is close to your original system.

katriel
  • 4,547