Earlier to this we seen setting up a pxe boot server in network environment and installing Linux operating system, tools like gparted  etc...


Now we'll configure our pxe boot server to install ESXi 5. Preparing a pxe server to install ESXi 5 is very simple only thing you have to concentrat is directory paths and pxelinux.cfg/default, boot.cfg files as shown below. Let get started first have a look at pre requistes.

Pre requistes:

Make sure pxe boot server up and running (dhcp and tftp settings) and configured properly. See here how to set up a pxe boot server.

Default root dir for lftp is /var/lib/tftpboot so create a folder esxi5. Mount esxi5.iso and extract content to /var/lib/tftpboot/esxi5 as shown below

[root@pxe ~]# mount -o loop /root/Downloads/ESXI5.iso /media
[root@pxe ~]# rsync -av /media/ /var/lib/tftpboot/esxi5/
[root@pxe ~]# chmod 777 /var/lib/tftpboot/esxi5/

Now edit the boot.cfg file, original file looks like below,

[root@pxe ~]# vim /var/lib/tftpboo/esxi5/boot.cfg

bootstate=0
title=Loading ESXi installer
kernel=/tboot.b00
kernelopt=runweasel
modules=/b.b00 --- /useropts.gz --- /k.b00 --- /a.b00 --- /ata-pata.v00 --- /ata-pata.v01 --- /ata-pata.v02 --- /ata-pata.v03 --- /ata-pata.v04 --- /ata-pata.v05 --- /ata-pata.v06 --- /ata-pata.v07 --- /block-cc.v00 --- /ehci-ehc.v00 --- /s.v00 --- /weaselin.i00 --- /ima-qla4.v00 --- /ipmi-ipm.v00 --- /ipmi-ipm.v01 --- /ipmi-ipm.v02 --- /misc-cni.v00 --- /misc-dri.v00 --- /net-be2n.v00 --- /net-bnx2.v00 --- /net-bnx2.v01 --- /net-cnic.v00 --- /net-e100.v00 --- /net-e100.v01 --- /net-enic.v00 --- /net-forc.v00 --- /net-igb.v00 --- /net-ixgb.v00 --- /net-nx-n.v00 --- /net-r816.v00 --- /net-r816.v01 --- /net-s2io.v00 --- /net-sky2.v00 --- /net-tg3.v00 --- /ohci-usb.v00 --- /sata-ahc.v00 --- /sata-ata.v00 --- /sata-sat.v00 --- /sata-sat.v01 --- /sata-sat.v02 --- /sata-sat.v03 --- /scsi-aac.v00 --- /scsi-adp.v00 --- /scsi-aic.v00 --- /scsi-bnx.v00 --- /scsi-fni.v00 --- /scsi-hps.v00 --- /scsi-ips.v00 --- /scsi-lpf.v00 --- /scsi-meg.v00 --- /scsi-meg.v01 --- /scsi-meg.v02 --- /scsi-mpt.v00 --- /scsi-mpt.v01 --- /scsi-mpt.v02 --- /scsi-qla.v00 --- /scsi-qla.v01 --- /uhci-usb.v00 --- /tools.t00 --- /imgdb.tgz --- /imgpayld.tgz
build=
updated=0

/ indicates root directory of tftp which is "/var/lib/tftpboot". As per above file we have to copy paste the content of ESXI5.iso image to /var/lib/tftpboot, but we do have other dir like centos and gparted folders, in the same way we created esxi5 folder in /var/lib/tftpboot so edit boot.cfg file and replace "/" with "/var/lib/tftpboot/esxi5". After modification our file should look like below. And also don't forget to add theline prefix=esxi5/ which is name of the dir we created.

bootstate=0
title=Loading ESXi installer
kernel=tboot.b00
prefix=esxi5/
kernelopt=runweasel
modules=/esxi5/b.b00 --- /esxi5/useropts.gz --- /esxi5/k.b00 --- /esxi5/a.b00 --- /esxi5/ata-pata.v00 --- /esxi5/ata-pata.v01 --- /esxi5/ata-pata.v02 --- /esxi5/ata-pata.v03 --- /esxi5/ata-pata.v04 --- /esxi5/ata-pata.v05 --- /esxi5/ata-pata.v06 --- /esxi5/ata-pata.v07 --- /esxi5/block-cc.v00 --- /esxi5/ehci-ehc.v00 --- /esxi5/s.v00 --- /esxi5/weaselin.i00 --- /esxi5/ima-qla4.v00 --- /esxi5/ipmi-ipm.v00 --- /esxi5/ipmi-ipm.v01 --- /esxi5/ipmi-ipm.v02 --- /esxi5/misc-cni.v00 --- /esxi5/misc-dri.v00 --- /esxi5/net-be2n.v00 --- /esxi5/net-bnx2.v00 --- /esxi5/net-bnx2.v01 --- /esxi5/net-cnic.v00 --- /esxi5/net-e100.v00 --- /esxi5/net-e100.v01 --- /esxi5/net-enic.v00 --- /esxi5/net-forc.v00 --- /esxi5/net-igb.v00 --- /esxi5/net-ixgb.v00 --- /esxi5/net-nx-n.v00 --- /esxi5/net-r816.v00 --- /esxi5/net-r816.v01 --- /esxi5/net-s2io.v00 --- /esxi5/net-sky2.v00 --- /esxi5/net-tg3.v00 --- /esxi5/ohci-usb.v00 --- /esxi5/sata-ahc.v00 --- /esxi5/sata-ata.v00 --- /esxi5/sata-sat.v00 --- /esxi5/sata-sat.v01 --- /esxi5/sata-sat.v02 --- /esxi5/sata-sat.v03 --- /esxi5/scsi-aac.v00 --- /esxi5/scsi-adp.v00 --- /esxi5/scsi-aic.v00 --- /esxi5/scsi-bnx.v00 --- /esxi5/scsi-fni.v00 --- /esxi5/scsi-hps.v00 --- /esxi5/scsi-ips.v00 --- /esxi5/scsi-lpf.v00 --- /esxi5/scsi-meg.v00 --- /esxi5/scsi-meg.v01 --- /esxi5/scsi-meg.v02 --- /esxi5/scsi-mpt.v00 --- /esxi5/scsi-mpt.v01 --- /esxi5/scsi-mpt.v02 --- /esxi5/scsi-qla.v00 --- /esxi5/scsi-qla.v01 --- /esxi5/uhci-usb.v00 --- /esxi5/tools.t00 --- /esxi5/imgdb.tgz --- /esxi5/imgpayld.tgz

build=
updated=0

Now /var/lib/tftpboot/pxelinux.cfg/default and add menu for esxi5, my file does have menu for CentOS and gParted, so i'll add new entry at the bottom

[root@pxe ~]# vim /var/lib/tftpboot/pxelinux.cfg/default

#############################
default menu.c32
prompt 0
timeout 300
ONTIMEOUT local


MENU TITLE GEEK IN LINUX PXE BOOT SERVER

#############################

LABEL CentOS 6.3
        MENU LABEL CentOS 6.3
        KERNEL image/vmlinuz
         APPEND initrd=image/initrd.img ramdisk_size=100000 method=nfs:nas.gil.com:/var/storage/Centos-6.3/

#############################

LABEL   Gparted
        MENU LABEL Gparted
        KERNEL gparted/live/vmlinuz
        append  initrd=gparted/live/initrd.img  boot=live config union=aufs noswap noprompt vga=normal fetch=tftp://nas.gil.com/gparted/live/filesystem.squashfs

#############################

LABEL ESXi 5
        MENU LABEL ESXi-5.0.0
        KERNEL esxi5/mboot.c32
        APPEND -c esxi5/boot.cfg

#############################

LABEL local
        MENU LABEL Boot Hard Drive
        localboot

In the above default file we just mention directory name and path for mboot.c32 and boot.cfg since this menu searches root folder it self which is /var/lib/tftpboot.



Thats it you are done, simply restart tftp service and dhcp service then check booting the client machine in pxeboot mode.

gil...