2

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.

Programster
  • 495
  • 1
  • 13
  • 22
  • Once the centos installer is running, do you have the option to drop to a shell and test if eth0 exists? It's possible the installer doesn't support your NIC. – 1.618 Dec 14 '12 at 16:09
  • Sorry 1.618 I didn't see your comment earlier it was hidden. You were on the right track. It turns out that my server had two ethernet cards, and one of them would not be 'recognized' by Centos. I get the message 'unable to find any devices of the type needed for this installation' when I tried to manually do it with http install, however it was able to pxe boot to that. I am going to try again with using the other card, and changing the MAC to match. I will have to probably change some eth0s to eth1s. – Programster Dec 14 '12 at 16:32

2 Answers2

1

Based on my experience there are two common issues that cause this.

1) You may find in the console output that your boot device has not been released by the installer prior to the second phase of the install where a second DHCP request is initiated. Some hardware vendors have released BIOS updates to address this. You will see a message in the console output that explicitly states it could not use that interface if this is the case.

2) If your interface is auto-duplex and the switch is not set for "portfast" (Cisco specific term), then kickstart may not be waiting long enough before attempting to send the DHCP request. Even if portfast is enabled, the server/switch combination may just be taking too long to negotiate.

You could try adding this to your tftp boot file:

dhcptimeout=180 nicdelay=50 linksleep=50
Aaron
  • 2,859
  • 2
  • 12
  • 30
0

try pinging the ip you are setting, you can also set ksdevice=eth0 (if that's where the appropriate network cable is plugged) try switching them, they might be coming up in a different order.

As far as I know you can't explicitly disable DHCP, DHCP will fallback if for some reason the static setup fails. If it can't reach the kickstart file, it will assume the interface isn't up, it'll fallback.

Ben Lutgens
  • 351
  • 1
  • 4
  • Thanks Ben, it did turn out to be the fact that the network device was not recognized in centos 5.8 (see my earlier comment under the question) but was pxe booted from into the installer. Strangest issue ever for me. Unfortunately the other NIC is not pxe bootable. Is there a way to mark this question as 'solved'? I apologize for the fact that it turned out to just be a hardware issue and not a software configuration. – Programster Dec 15 '12 at 15:54