[SOLVED] Kickstart network configuration on CentOS 6

Issues related to configuring your network
Post Reply
dj_judas21
Posts: 4
Joined: 2011/07/19 10:27:34
Location: UK
Contact:

[SOLVED] Kickstart network configuration on CentOS 6

Post by dj_judas21 » 2011/07/19 10:41:30

I've been using PXE boot and kickstart to build CentOS 5 servers for some time. At my organisation, servers have to be assigned static IP addresses manually, so in my kickstart file I had a line like this:

[code]network --bootproto=query[/code]

This caused it to PXE boot from DHCP with a temporary IP, and then immediately ask me to define a static IP. It then uses the properly defined static IP throughout the installation, and then retains it when it reboots and becomes a real server.

On CentOS 6, the "query" parameter superficially appears to work, and I get asked to set the static IP. Installation goes fine, but when the system reboots for production, it forgets the static IP I set, and picks up one of the DHCP PXE IPs.

I read [url=http://www.linuxtopia.org/online_books/rhel6/rhel_6_migration_guide/rhel_6_migration_ch02s02s02.html]here[/url] that the "query" parameter is deprecated in CentOS 6, and simply omitting the "network" command will cause the installer to prompt. I tried this, but instead it automatically uses DHCP for everything.

Am I doing something wrong, and is there a way of getting the installer to ask me for a static IP to use for evermore?

Cheers,
Jonathan

dj_judas21
Posts: 4
Joined: 2011/07/19 10:27:34
Location: UK
Contact:

Re: Kickstart network configuration on CentOS 6

Post by dj_judas21 » 2011/07/19 12:18:20

Answered my own question. It seems that

[code]
network --bootproto=query
[/code]
is no longer the best way to do this. Instead, I added "asknetwork" to the PXE boot line, like this:

[code]
APPEND ks=http://repo.resnet.bris.ac.uk/resnet/kickstart/centos6-64.ks \
initrd=images/centos/6.0/x86_64/initrd.img ramdisk_size=100000 \
asknetwork url --url=http://mirror.centos.org/centos-6/6.0/os/x86_64//
[/code]
This has the desired effect of asking me to set a static IP, and it keeps it throughout installation, and the finished system retains it too.

pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

[SOLVED] Kickstart network configuration on CentOS 6

Post by pschaff » 2011/07/19 21:36:54

Welcome to the CentOS fora. Please see the recommended reading for new users linked in my signature.

Thanks for reporting back with your own solution. Marking this thread [SOLVED] for posterity.

Post Reply

Return to “CentOS 6 - Networking Support”