Tell me more ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

2 Answers

up vote 3 down vote accepted

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:

http://serverfault.com/questions/123144/managing-an-application-across-multiple-servers-or-pxe-vs-cfengine-chef-puppet/123153#123153

share|improve this answer
1  
It's not a perfect solution, but it did the trick. I only changed it a bit, using rpm -qa --qf '[%{INSTALLTIME}\t][%{INSTALLTIME:day} \t][%-40{GROUP}\t]%{NAME}\n'|sort -t \t -k 1,3 instead, so that I ended up with a list broken by date and groups, which gave-me a better understanding of how the system evolved and allowed to simplify the package selection by putting entire groups where it made sense. Thanks – ÜMineiro Jun 18 '10 at 14:41

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.

share|improve this answer
It can be of help, but since I do already have the original anaconda-ks.cfg, this kind of stuff is readily available. Thanks anyway. – ÜMineiro Jun 18 '10 at 13:31

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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