I have been following a tutorial on how to set up a PXE boot server for kickstart automated installs. Im pretty sure I have set everything up correctly but when I launch the second server and the automation starts it fails (details below).
Here are my configurations as well as some screenshots of the errors when trying to boot the new server (this is with Virtualbox btw)
/etc/dhcp/dhcpd.conf – https://pastebin.com/NjeuQvjH
/var/ftp/pub/ks.cfg – https://pastebin.com/MHCdvKrh
/tftpboot/pxelinux.cfg/default – https://imgur.com/a/cxewtC1
/etc/sysconfig/network-scripts/ifcfg-enp0s3 – https://pastebin.com/r3UUVumb
ifconfig output:
enp0s3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.50 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fe80::c4da:66e1:b02f:9ec prefixlen 64 scopeid 0x20<link>
ether 08:00:27:74:4c:65 txqueuelen 1000 (Ethernet)
RX packets 2463 bytes 507124 (495.2 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 1406 bytes 238379 (232.7 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 1 bytes 76 (76.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 1 bytes 76 (76.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
screenshots (2 launch attempts) – https://imgur.com/a/v087Luq
This is in Virtualbox with 2 Centos7 VMs btw.
I should add that I can access ftp://192.168.1.50/pub/ just fine via my browser and see all files there on the VM.
For Virtualbox & VM settings I have network boot order as the priority along with bridged adapter option (Im using a USB device) I have promiscuous mode set to 'Allow all' for both VMs and for the second one its set to the 'server' adapter type in advanced as advised by the video.
Edit: After going through the video Ive been following I noticed that I had forgot to change the 'disabled' option from yes to no in /etc/xinetd.d/tftp but that hasnt helped anything.
Edit2:
This is the contents of /etc/xinetd.d/tftp also – https://pastebin.com/E1Zaa0Xb
I also have a directory setup /tftpboot which has various files copied from /usr/share/syslinux as was instructed in the tutorial:
chain.c32 mboot.c32 memdisk menu.c32 netboot pxelinux.0 pxelinux.cfg
and /tftpboot/netboot with files copied from the mounted Centos iso image:
initrd.img vmlinuz
xinetd, dhcpd and vsftpd are all running and enabled.
Contents of /mnt/.treeinfo
[general]
name = CentOS-7
family = CentOS
timestamp = 1525379658.57
variant =
version = 7
packagedir =
arch = x86_64
[stage2]
mainimage = LiveOS/squashfs.img
[images-x86_64]
kernel = images/pxeboot/vmlinuz
initrd = images/pxeboot/initrd.img
boot.iso = images/boot.iso
[images-xen]
kernel = images/pxeboot/vmlinuz
initrd = images/pxeboot/initrd.img
Best Answer
The first attempt is failing because the TFTP connection attempt by the PXE firmware times out. TFTP is not FTP, but an entirely separate service. The TFTP service in UDP port 69 of 192.168.1.50 did not respond.
For the second attempt, only the
next-server
option was provided by the DHCP server, but the boot filename was not. Both are needed. As a result, iPXE outputs a "nothing to boot" error.After enabling
/etc/xinetd.d/tftp
, did youkillall -HUP xinetd
, restartxinetd
, or cause it to actually re-read its configuration in any other way? Does your/etc/hosts.allow
and/or/etc/hosts.deny
include any restrictions that would be applicable fortftp
? (For example,ALL: ALL
as the last line of/etc/hosts.deny
would block it unless there were more specific settings to allow it.)Note that VirtualBox's PXE boot firmware is actually iPXE from http://ipxe.org which can also use HTTP. It can accept an URL as a boot filename, so you could avoid the need for TFTP if you only work with VirtualBox VMs. But your aim is to eventually PXE boot real hardware, then you'll need to get TFTP working.
To specify the location of the stage2 file, add a boot option to the APPEND line of
/tftpboot/pxelinux.cfg/default
:The installer will automatically add
/LiveOS/squashfs.img
suffix to it. It gets that suffix by reading the.treeinfo
file of the installation set, which should be athttp://192.168.1.50/pub/.treeinfo
if the URL option of yourks.cfg
file is correctly set.I guess manipulating the
.treeinfo
file might allow putting thesquashfs.img
file to a different path, but I have not tested it.