0

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
1

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 you killall -HUP xinetd, restart xinetd, 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 for tftp? (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:

APPEND ... inst.stage2=http://192.168.1.50/pub

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 at http://192.168.1.50/pub/.treeinfo if the URL option of your ks.cfg file is correctly set.

I guess manipulating the .treeinfo file might allow putting the squashfs.img file to a different path, but I have not tested it.

  • Nothing is in hosts.allow and deny. I may have restarted xinetd before but Ive just checked now and its running and enabled. Please see my other edits and info above, not sure if they will help. What should BOOTPROTO= be btw? I tried changing it from none to dhcp but it didnt help. For now I just want to do this with VMs as just learning it really. – goblin_rocket May 15 '18 at 8:44
  • hang on, I got a step further now, it looks like when I checked the status of vsftpd it also started it (maybe wasnt running before?) and I just tired again with a launch and I got to the install menu and it did start. Now getting a 'Warning: anaconda failed to fetch stage2' imgur.com/a/RbDotSI and now booted to dracut so I guess its crashed but made some progress – goblin_rocket May 15 '18 at 8:52
  • 1
    Definitely progress. As a next step, Anaconda wants the stage2 file, and currently it is expecting to get it at ftp://192.168.1.50/LiveOS/squashfs.img. Your ks.cfg should be defining parameters for the network connections, something like network --bootproto=dhcp --device=enp0s3 --ipv6=auto --activate to make the installer start up the NIC. – telcoM May 15 '18 at 9:12
  • 1
    Oh, and the BOOTPROTO= setting just specifies which protocol, if any, is used to determine the IP address of a particular network interface in the server that has the configuration file. Despite the name, it is unrelated to PXE booting other hosts. – telcoM May 15 '18 at 9:32
  • thanks, tried adding that to the ks.cfg file but it didnt work and its still looking in that wrong place. I have a rule for the url location in that file pointing to 192.168.1.50/pub but should I point it here instead? 192.168.1.50/pub/images/pxeboot or some other location? – goblin_rocket May 15 '18 at 9:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.