Pxe net install Centos with Static IP

Posted by Stu2000 on Server Fault See other posts from Server Fault or by Stu2000
Published on 2012-12-14T13:44:17Z Indexed on 2012/12/14 17:05 UTC
Read the original article Hit count: 300

Filed under:
|
|

I seem to be unable to perform a kickstart installation of centos5.8 with a netinstall. It correctly gets into the text installer, but keeps sending out a request for the dhcp server and failing. I have tried to manually set the IP everywhere. Here is my pxelinux.cfg file

DEFAULT menu
PROMPT 0
MENU TITLE Ubuntu MAAS
TIMEOUT 200
TOTALTIMEOUT 6000
ONTIMEOUT local

LABEL centos5.8-net
        kernel /images/centos5.8-net/vmlinuz
        MENU LABEL centos5.8-net
        append initrd=/images/centos5.8-net/initrd.img ip=192.168.1.163 netmask=255.255.255.0 hostname=client101 gateway=192.168.1.1 ksdevice=eth0 dns=8.8.8.8 ks=http://192.168.1.125/cblr/svc/op/ks/profile/centos5.8-net

MENU end

and here is my kickstart file:

# Kickstart file for a very basic Centos 5.8 system
# Assigns the server ip: 192.211.48.163
# DNS 8.8.8.8, 8.8.4.4
# London TZ

install
url --url http://mirror.centos.org/centos-5/5.8/os/i386
lang en_US.UTF-8
keyboard us
network --device=eth0 --bootproto=static --ip=192.168.1.163 --netmask=255.255.255.0 --gateway=192.168.1.1 --nameserver=8.8.8.8,8.8.4.4 --hostname=client1-server --onboot=on
rootpw --iscrypted $1$Snrd2bB6$CuD/07AX2r/lHgVTPZyAz/
firewall --enabled --port=22:tcp
authconfig --enableshadow --enablemd5
selinux --enforcing
timezone --utc Europe/London
bootloader --location=mbr --driveorder=xvda --append="console=xvc0"
# The following is the partition information you requested
# Note that any partitions you deleted are not expressed
# here so unless you clear all partitions first, this is
# not guaranteed to work
part /boot --fstype ext3 --size=100 --ondisk=xvda
part pv.2 --size=0 --grow --ondisk=xvda
volgroup VolGroup00 --pesize=32768 pv.2
logvol swap --fstype swap --name=LogVol01 --vgname=VolGroup00 --size=528 --grow --maxsize=1056
logvol / --fstype ext3 --name=LogVol00 --vgname=VolGroup00 --size=1024 --grow

%packages
@base
@core
@dialup
@editors
@text-internet
keyutils
iscsi-initiator-utils
trousers
bridge-utils
fipscheck
device-mapper-multipath
sgpio
emacs

Here is my dhcp file:

ddns-update-style interim;

allow booting;
allow bootp;

ignore client-updates;
set vendorclass = option vendor-class-identifier;

subnet 192.168.1.0 netmask 255.255.255.0 {
        host tower {
                hardware ethernet          50:E5:49:18:D5:C6;
                fixed-address              192.168.1.163;
                option routers             192.168.1.1;
                option domain-name-servers 8.8.8.8,8.8.4.4;
                option subnet-mask         255.255.255.0;
                filename                   "/pxelinux.0";
                default-lease-time         21600;
                max-lease-time             43200;
                next-server                192.168.1.125;
        }
}

Is it impossible to prevent it asking for a dynamic ip before trying to install from the net? Perhaps there is an error in of my files?

My dhcp server is set to ignore client-updates, and is set to only works with one mac address whilst testing.

© Server Fault or respective owner

Related posts about centos

Related posts about pxeboot