Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm currently trying to figure out a smart way to set IP, hostname, gateway and DNS settings during a kickstart (with user input during the kickstart). Doing this with firstboot after the install is not acceptable, so this must be done during %post.

I've tried to run the system-config-network tool during post in tty6:

chvt 6  
exec < /dev/tty6 > /dev/tty6  

This doesn't work since for some reason I'm unable to catch user input.

I would prefer to use built in tools to change this during post, rather than write my own bash script to do this, since using the provided tools is less likely to break anything.

Does someone done anything like this or similar, and made it work?


share|improve this question
Is it a text mode install or a graphical one? – Mircea Vutcovici May 4 '10 at 12:55
Text mode. Don't see why you should use graphical? – tore- May 4 '10 at 19:44
up vote 1 down vote accepted

Well this is stupid. I use cobbler which already have support for setting hostname, ip, subnet and dns information. You have to add it as a system, like this:

cobbler system add --name=[...] --profile=[...]--ip= --gateway= --name-servers="" --static=true --mac=00:50:56:af:56:22

Cobbler then have a snippet that applies this for you, called "post_install_network_config". Let me know if anyone have any questions.

share|improve this answer

I know this is an old question, but I wanted to contribute this answer for any one finding this by search:

Starting at CentOS 5, there a undocumented option that enable a prompt asking for network configuration during the installation. At the network statement, put the query keyword at the --bootproto= networking configuration, as we see below:

network --device=eth0 --bootproto=query

CentOS Wiki: Tips and tricks for anaconda and kickstart

share|improve this answer

I am downloading a script with wget and add the script to /etc/rc.d/rc.local. Inside the script I am commenting the entry in rc.local so it does not run at further boots. In this script I am doing all the stuff I had in %post.

In %post section of the KickStart script I have:

wget -O /etc/  
echo ". /etc/" >>/etc/rc.d/rc.local

So I do not have to connect on the machine that I am installing. Only on the KickStart server I will do the changes. On the KickStart server I have an apache and is the IP address of the KickStart server.

Have you tried to use open?

chroot /mnt/sysimage
open /usr/bin/system-config-network
share|improve this answer
I think thats a bad solution since it requires me to have access to the given host. Also, I could just pipe that information into rc.local during deployment. But thanks for the suggestion :) – tore- May 4 '10 at 7:08

It looks like you're trying to set them with static values. If possible, use DHCP to set these items instead.

You mentioned trying to do user interaction during kickstart. I don't think that is possible, although I could be wrong. I do know that user interaction during RPM installations is impossible; this would make it impossible to script. The same could(and if I were the head architect , would) be impossible and for the same reasons. Instead, place these values on a floppy disk.

share|improve this answer
This still doesn't address my main issue. DHCP is out of the question, so is floppy. Using either of these will complicate the setup, which in it self isn't a problem, but when you scale out a setup like this things can and will break. Keep it simple. – tore- May 5 '10 at 8:10

Your Answer


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.