I've modified a CentOS net install image to load my kickstart file over http. This works great when running on a network that has a DHCP server. Obviously, without DHCP this fails because the installer can't acquire an IP.

So, my question is what do I need to modify in order to set a static IP?


You will need to pass the static IP options to the kernel so that the kickstart process can locate your ks.cfg. As you know, by default the net install looks for a dhcp address. You can set a static address by passing at a minimum ip and optionally gw & dns at the boot prompt.

linux ks= ip= gw= dns=

You can optionally specify the device to use in one of 5 ways.

  • the device name of the interface, for example, eth0
  • the MAC address of the interface, for example, 00:12:34:56:78:9a
  • the keyword link, which specifies the first interface with its link in the up state
  • the keyword bootif, which uses the MAC address that pxelinux set in the BOOTIF variable. Set IPAPPEND 2 in your pxelinux.cfg file to have pxelinux set the BOOTIF variable.
  • the keyword ibft, which uses the MAC address of the interface specified by iBFT

There are many many options you can pass for a kickstart boot. You can get a full list of the boot and kickstart script options for RHEL/CentOS 6 here.

  • Thanks! This is exactly what I needed. Do you know if you can also specify what device you want to use? – Chris Charge Apr 27 '12 at 12:06
  • Sure can. See my edit. – George M Apr 27 '12 at 12:30
  • 2
    This is great info uther. I also really appreciate you linking to the RHEL documentation. I had googled around but never came across it. – Chris Charge Apr 27 '12 at 13:09

There is some ways that on a CentOS system you can set IP addresses staticlly, I mention two of these:

1) using command-line:

/sbin/ifconfig eth1 netmask broadcast

in this command you can set your intended static ip address in place of, netmask in place of and broadcast in place of .

2)GUI-based: enter the following command as root:


now you see a window, select the interface you want to set a static IP to it (e.g. eth0) then press the "Edit" key. now another window will open, in this one select "Staticlly Set IP Addresses" radio button, then fill "IP address", "Subnet Mask", "Default Gateway Address" fields as you want. then press OK to save changes.

  • Thanks for the extra info. I wasn't familiar with neat. Good to know. – Chris Charge Apr 28 '12 at 19:42
  • 2
    As I said its a GUI-based utility, no familiarity is needed, enter the above command, and set IP. – Sam Apr 29 '12 at 5:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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