
Re: pxe install with custom files
jeronimo wrote:
But yes please, let us know how you do it so we can discuss.
Sorry for the delay. Vacation...

We install using PXE boot. So you have to install an DHCP Server which informs the client about the bootserver and TFTP filename to fetch:
Code:
next-server 1.1.1.1;
filename "pxelinux.0";
In the TFTP root we have the usual pxelinux environment and a directory "esxi41u1", containing all the files from the installation CD.
Code:
16M cim.vgz
7.1M ienviron.vgz
295M imagedd.bz2
4.0K imagedd.md5
952K install.vgz
4.0K ks.cfg
4.8M oem.tgz
70M sys.vgz
48K vmkboot.gz
2.4M vmkernel.gz
You do not need to patch them in any way - not even repack the imagedd.bz2 file! Into this directory we copy
our version of the oem.tgz file plus our ks.cfg:
Code:
accepteula
autopart --firstdisk --overwritevmfs
install url http://1.1.1.1/esxi41u1/
keyboard German
network --bootproto=dhcp
reboot
rootpw --iscrypted XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
serialnum --esx=XXXXX-XXXXX-XXXXX-XXXXX-XXXXX
%post --unsupported --interpreter=busybox --ignorefailure=true
cd /tmp
wget -q http://1.1.1.1/esxi41u1/oem.tgz
mv -f oem.tgz /vmfs/volumes/Hypervisor1/
sync
sleep 10
%firstboot --unsupported --interpreter=busybox
sed -i 's/^#ssh/ssh/' /etc/inetd.conf
kill -HUP $(pidof inetd)
To enable this kickstart script, we configured the section for the ESXi 4.1 U1 setup as follows:
Code:
LABEL esxi41u1ks
MENU LABEL VMware ESXi 4.1 Update 1 by ^KS script
KERNEL mboot.c32
APPEND esxi41u1/vmkboot.gz ks=http://1.1.1.1/esxi41u1/ks.cfg --- esxi41u1/vmkernel.gz --- esxi41u1/sys.vgz --- esxi41u1/cim.vgz --- esxi41u
1/ienviron.vgz --- esxi41u1/oem.tgz --- esxi41u1/install.vgz
IPAPPEND 2
The postinstall part fetches
http://1.1.1.1/esxi41u1/oem.tgz with `wget´ and puts it into the Hypervisor1 partition of the
installed ESXi host - so you don't need to patch it into the installation files.
We use a webserver to transfer the oem.tgz file and to the ks.cfg script by HTTP, because of it's simplicity. We made a symlink from WWW root "esxi41u1" to TFTP root "esxi41u1" (and of course enabled symlinks in the Apache config).
The "firstboot" section of the kickstart script enables SSH on the host.
It works perfectly. When we need another driver, we simply add it to our version of the oem.tgz file and on goes the next setup.
