Link to home
Start Free TrialLog in
Avatar of Indyrb
IndyrbFlag for United States of America

asked on

PXE boot for ESXi on CENTOS 7

I created the CENTOS tftp and dhcp
I created the pxelinix.cfg\default directory.
I placed ESXi image into Directory along with Kickstartfile=KS.cfg, boot.cfg, isolinux.cfg

I am getting an IP address from DHCP, however I get this error
TFTP prefix:
Trying to load: pxelinux.cfg\default

menu.C32: not a COM32R image
boot:
menu.C32: not a COM32R image
boot:
menu.C32: not a COM32R image
boot:
menu.C32: not a COM32R image
boot:

Open in new window

Avatar of Indyrb
Indyrb
Flag of United States of America image

ASKER

i copied usr/share/syslinux/*.32 into my folder and it appears to get the menu now.

But when I get my menu and push the enter key, it doesnt do anything.

Just says Press [TAB] to edit options
Starting Local System in 10 seconds
Avatar of Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)
Use Syslinux v4.07 from https://www.kernel.org/pub/linux/utils/boot/syslinux/

and these files

syslinux-4.07.zip\core\pxelinux.0
syslinux-4.07.zip\com32\chain\chain.c32
syslinux-4.07.zip\com32\menu\menu.c32
syslinux-4.07.zip\com32\menu\vesamenu.c32

Are you using WDS ?

what does your default menu file: look like ?

have you created one ?

DEFAULT      menu.c32
PROMPT       0
MENU TITLE Chris' WDS PXE Boot Menu (x86)
MENU AUTOBOOT Starting Local System in 10 seconds
 
# Option 1 - Exit WDS PXE Linux & Boot Normally
LABEL bootlocal
      MENU LABEL ^Boot Normally
      MENU default
      LOCALBOOT 0
      TIMEOUT 100
      TOTALTIMEOUT 9000

# Option 2 - Run WDS
LABEL wds
      MENU LABEL ^Windows Deployment Services Boot
      KERNEL pxeboot.0

# Option 3 - Install ESXi 5.5 Update 3b
LABEL ESXi5.5u3
      MENU label ^ESXi5.5 Update 3b - Build 3248547 Installer
      KERNEL /ESXi/5.5u3b/MBOOT.C32
      APPEND -c /ESXi/5.5u3b/BOOT.CFG

you will also need to edit the ESXi BOOT.CFG
Avatar of Indyrb

ASKER

closed out previous question will work from this one: (Thank you)

for default inside pxelinux.cfg is as follows:

DEFAULT menu.c32
MENU TITLE ESXi 6 Update 3 Boot Menu
MENU AUTOBOOT Starting Local System in 10 seconds
NOHALT 1
PROMPT 0
TIMEOUT 80
LABEL  ESXi 6 Install
  KERNEL /esxi6u3/mboot.c32
  APPEND -c /esxi6u3/boot.cfg ks=http://xxx.xxxx.local/KS/KS.cfg +++
  IPAPPEND 2
LABEL hddboot
  LOCALBOOT 0x80
  MENU LABEL ^4 Boot from local disk
  MENU LABEL +------------------------------------------------------+
LABEL comment2
  MENU LABEL |                ESXi 6.0u3                                     |
LABEL comment3
  MENU LABEL |                                     |
LABEL comment4
  MENU LABEL +G----------------------------------------------------S+

Open in new window


okay i moved mboot.c32 into esxi6u3 i was able to finally select the label
but now it says

Loading -c Failed..........
No files found!
boot:

Open in new window

Avatar of Indyrb

ASKER

boot.cfg inside /esxi6u3/boot.cfg

bootstate=0
title=Loading ESXi installer
timeout=5
kernel=tboot.b00
kernelopt=runweasel ks=http://xxxxxx.xxxxxxx.local/KS/KS.CFG +++
modules=b.b00 --- jumpstrt.gz --- useropts.gz --- k.b00 --- chardevs.b00 --- a.b00 --- user.b00 --- uc_intel.b00 --- uc_amd.b00 --- sb.v00 --- s.v00 --- net_tg3.v00 --- dell_eql.v00 --- net_igb.v00 --- net_ixgb.v00 --- mtip32xx.v00 --- 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 --- elxnet.v00 --- emulex_e.v00 --- weaselin.t00 --- esx_dvfi.v00 --- esx_ui.v00 --- ima_qla4.v00 --- ipmi_ipm.v00 --- ipmi_ipm.v01 --- ipmi_ipm.v02 --- lpfc.v00 --- lsi_mr3.v00 --- lsi_msgp.v00 --- lsu_hp_h.v00 --- lsu_lsi_.v00 --- lsu_lsi_.v01 --- lsu_lsi_.v02 --- lsu_lsi_.v03 --- lsu_lsi_.v04 --- misc_cni.v00 --- misc_dri.v00 --- net_bnx2.v00 --- net_bnx2.v01 --- net_cnic.v00 --- net_e100.v00 --- net_e100.v01 --- net_enic.v00 --- net_forc.v00 --- net_mlx4.v00 --- net_mlx4.v01 --- net_nx_n.v00 --- net_vmxn.v00 --- nmlx4_co.v00 --- nmlx4_en.v00 --- nmlx4_rd.v00 --- nvme.v00 --- ohci_usb.v00 --- qlnative.v00 --- rste.v00 --- sata_ahc.v00 --- sata_ata.v00 --- sata_sat.v00 --- sata_sat.v01 --- sata_sat.v02 --- sata_sat.v03 --- sata_sat.v04 --- scsi_aac.v00 --- scsi_adp.v00 --- scsi_aic.v00 --- scsi_bnx.v00 --- scsi_bnx.v01 --- scsi_fni.v00 --- scsi_hps.v00 --- scsi_ips.v00 --- scsi_meg.v00 --- scsi_meg.v01 --- scsi_meg.v02 --- scsi_mpt.v00 --- scsi_mpt.v01 --- scsi_mpt.v02 --- scsi_qla.v00 --- uhci_usb.v00 --- vsan.v00 --- vsanheal.v00 --- vsanmgmt.v00 --- xhci_xhc.v00 --- tools.t00 --- xorg.v00 --- imgdb.tgz --- imgpayld.tgz --- extras.tgz
build=
updated=0

Open in new window

Is that boot.cfg stock ? (it does need changing see below!)

looks like a path error.... in the menu

I would simplify the menu to test

DEFAULT      menu.c32
PROMPT       0
MENU TITLE WDS PXE Boot Menu (x86)
MENU AUTOBOOT Starting Local System in 10 seconds
 
# Option 1 - Exit WDS PXE Linux & Boot Normally
LABEL bootlocal
      MENU LABEL ^Boot Normally
      MENU default
      LOCALBOOT 0
      TIMEOUT 100
      TOTALTIMEOUT 9000

# Option 2 - Install ESXi 5.5 Update 3b
LABEL ESXi5.5u3
      MENU label ^ESXi5.5 Update 3b - Build 3248547 Installer
      KERNEL /ESXi/5.5u3b/MBOOT.C32
      APPEND -c /ESXi/5.5u3b/BOOT.CFG

check that your path for KERNEL and APPEND is correct.

Also you will need t edit the ESXi BOOT.CFG and make sure that file has the correct path o all the Vibs.

But you are not getting that far at present.
Avatar of Indyrb

ASKER

i saw an article that indicated to remove all the / with the sed command for the boot.cfg

The boot.cfg was stock with the ESXi build, but then altered to add the KS=http:///
and also remove all the / using the sed command.
I guess this is wrong?  or is this right?
Let's ignore boot.cfg at present because it's not booting or getting that far

Look at correct path in your default menu
Avatar of Indyrb

ASKER

okay.. so I placed the folders in my tftpboot directory.
/var/lib/tftpboot

there are folders as follows:
/esxi6u3
/esxi6u2
/pxelinux.cfg

My path seems right, unless it is not landing into /var/lib/tftpboot/

I thought I had a typo with case sensitivty and got all excited, but sadly this wasnt it, and received the same error:
Avatar of Indyrb

ASKER

and check systemctl status tftp -l

 tftp.service - Tftp Server
   Loaded: loaded (/usr/lib/systemd/system/tftp.service; enabled; vendor preset: disabled)
   Active: inactive (dead) since Wed 2017-04-26 15:08:02 EDT; 1h 24min ago
  Process: 1013 ExecStart=/usr/sbin/in.tftpd -c -s /var/lib/tftpboot (code=exited, status=0/SUCCESS)
 Main PID: 1013 (code=exited, status=0/SUCCESS)

Apr 26 14:53:02 hostname systemd[1]: Started Tftp Server.
Apr 26 14:53:02 hostname systemd[1]: Starting Tftp Server...

Open in new window

Avatar of Indyrb

ASKER

not WDS.. using centos 7 tftp/apache/dhcp
Any ideas?
Avatar of Indyrb

ASKER

whats wierd is I pulled up FileZilla. and quick connect to my CENTOS and it connected successfully.
However my directory is as follows for remote
/
 +/pub
    /pub/efi/
    /pub/ks
    /pub/upgrade

Open in new window


so maybe i have it all wrong, Use /pub ?
Avatar of Indyrb

ASKER

yea its definately not going where it needs to go. the FTP take me to an older ESXI folder.
ASKER CERTIFIED SOLUTION
Avatar of Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)
Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Indyrb

ASKER

same error

changed as follows:
# Option 1 - Run ESXi 6.0u3 Installer
LABEL ESXi 6.0u3 Scripted Install
      MENU LABEL ^1 ESXi Scripted Install
      KERNEL esxi6u3/mboot.c32
      APPEND -c esxi6u3/BOOT.CFG ks=http://xxx-xxxxx-xxxx.domain.local/KS/EXP.cfg +++

Open in new window


Getting same error:
Loading -c ... failed!
No files found!
boot:

Open in new window


Then it flashes away and in 10 seconds it does it again.
Avatar of Indyrb

ASKER

is there a conf file that I can edit to make sure directories is right... beside the default.
Its like I am landing somewhere and its not picking up the correct path.. Not sure though
Any test I can do to validate this?
Avatar of Indyrb

ASKER

TFTP config inside /etc/xinet.d/tftp is as follows:

# default: off
# description: The tftp server serves files using the trivial file transfer \
#	protocol.  The tftp protocol is often used to boot diskless \
#	workstations, download configuration files to network-aware printers, \
#	and to start the installation process for some operating systems.
service tftp
{
	socket_type		= dgram
	protocol		= udp
	wait			= yes
	user			= root
	server			= /usr/sbin/in.tftpd
	server_args		= -c -s /var/lib/tftpboot
	disable			= no
	per_source		= 11
	cps			= 100 2
	flags			= IPv4
}

Open in new window

SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Indyrb

ASKER

removing the KS= had no affect.  : (
ks=http://somehostname.domain.local/KS/KS.cfg +++

Open in new window

Avatar of Indyrb

ASKER

from /var/log/messages
Still getting the:
Loading -c ... Failed!
No file Found!
boot:

Open in new window


 systemd[1]: Starting Session 3 of user root.
 dbus[1032]: [system] Activating service name='org.freedesktop.problems' (using servicehelper)
 dbus-daemon[1032]: dbus[1032]: [system] Activating service name='org.freedesktop.problems' (using servicehelper)
 dbus[1032]: [system] Successfully activated service 'org.freedesktop.problems'
 dbus-daemon[1032]: dbus[1032]: [system] Successfully activated service 'org.freedesktop.problems'

Log statistics; processed='destination(d_spol)=0', processed='src.internal(s_sys#2)=267', stamp='src.internal(s_sys#2)=1493392391', processed='center(received)=267', processed='destination(d_mesg)=19460', processed='destination(d_mail)=2', processed='destination(d_auth)=158', processed='destination(d_mlal)=0', processed='center(queued)=20470', processed='src.none()=0', stamp='src.none()=0', processed='destination(d_cron)=623', processed='global(payload_reallocs)=282', processed='global(sdata_updates)=0', processed='destination(d_boot)=210', processed='destination(d_kern)=17', processed='global(msg_clones)=0', processed='source(s_sys)=267'
 in.tftpd[9236]: Client  finished menu.c32
 in.tftpd[9237]: Client  finished pxelinux.cfg/default
 in.tftpd[9238]: Client  finished esxi6u3/mboot.c32
 in.tftpd[9240]: Client  finished menu.c32
 in.tftpd[9241]: Client  finished pxelinux.cfg/default
 in.tftpd[9242]: Client  finished esxi6u3/mboot.c32
 in.tftpd[9244]: Client  finished menu.c32
 in.tftpd[9245]: Client  finished pxelinux.cfg/default

Open in new window

Avatar of Indyrb

ASKER

So i got it to boot into ESXi installer.

However now it just sits there at Loaded USER Successfully [locked up to be exact]

See attached
Untitled.jpg
what is your boot.cfg did you change it, so the path is relative to all the files?

it could be read fault, networking...

or incompatible host.
Avatar of Indyrb

ASKER

that would make sense, I did do a special boot for the dell offline image, and wanted to test on a VM inside VCENTER to test, since it isnt physical and I can reboot and test willy knilly.... But as far as reading the default file it works.
at that stage, everything has been read from source network, and is being read into memory.
Avatar of Indyrb

ASKER

okay, i tried on physical machine and it went past the Loaded USER Successfully
Avatar of Indyrb

ASKER

thank you so much Mr. Hancock, I posted a new question, after closing this one out. Hopefully you can give some insight
Awarded points per above issue. Now next issue :(

See question below:
https://www.experts-exchange.com/questions/29019701/vmware-pxe-boot-install.html