LiamLeane / Foreman-ESXi

Foreman provisioning templates & guide for ESXi 6
Apache License 2.0
20 stars 6 forks source link

KERNEL undionly.kpxe does not work any longer #3

Open edestecd opened 8 years ago

edestecd commented 8 years ago

Newer versions of PXELinux barf with "Invalid or corrupt kernel image" here: https://github.com/LiamLeane/Foreman-ESXi/blob/master/PXELinux.erb#L12

As indicated here, you need to switch to PXE or build the actual ipxe kernel image. I had no success with using PXE undionly.kpxe as the APPEND was ignored resulting in a loop. http://forum.ipxe.org/archive/index.php/thread-7951.html

I suggest changing the instructions to build the bin/ipxe.lkrn and updating the template:

git clone git://git.ipxe.org/ipxe.git
sed -i "s/MAX_MODULES 8/MAX_MODULES 100/g" ipxe/src/arch/x86/image/multiboot.c
echo "#define IMAGE_COMBOOT" >> ipxe/src/config/local/general.h
cd ipxe/src
make bin/ipxe.lkrn
cp bin/ipxe.lkrn /var/lib/tftpboot
DEFAULT linux
LABEL linux
KERNEL ipxe.lkrn
APPEND dhcp && chain <%= foreman_url('iPXE') %>
IPAPPEND 2

These changes got us working with ESXi 6.0 update 1

edestecd commented 8 years ago

Pull requests are forth coming, after we are up in production and confirmed!