Hi, I've just set up a Ubunutu 16.04 virtual server to provide netboot services using BSDPy. I've used AutoDMG and AutoCasperNBI to build my netboot image from the offical 10.12.6 installer from the App Store, and I've followed Graham Gilbert's BDSPy blog post (https://grahamgilbert.com/blog/2015/04/22/getting-started-with-bsdpy-on-docker/) to set up Docker and the necessary containers.
The server is up and running, and the three containers loaded in Docker are macadmins/netboot-httpd, macadmins/tftpd and bruienne/bsdpy. The HTTPD service is bound to port 80, TFTPD is bound to port 69 and BSDPy is bound to port 67.
Here's my startup script below [edit: modified to include code to set blocksize for the TFTPD container, credit to Neil's post below]
#!/bin/bash
# BSDPy Startup Script
# Documentation - https://hub.docker.com/r/bruienne/bsdpy
# Script taken from - https://grahamgilbert.com/blog/2015/04/22/getting-started-with-bsdpy-on-docker/
# Pulls the tftpd, netboot-httpd and bsdpy repos from Docker
docker pull macadmins/tftpd
docker pull macadmins/netboot-httpd
docker pull bruienne/bsdpy
# Stops and removes any existing containers before attempting to run them
docker stop $(docker ps -a -q)
docker rm $(docker ps -a -q)
chmod -R 777 /usr/local/docker/nbi
IP=`ifconfig eth0 2>/dev/null|awk '/inet addr:/ {print $2}'|sed 's/addr://'`
echo $IP
docker run -d
-v /usr/local/docker/nbi:/nbi
--name web
--restart=always
-p 0.0.0.0:80:80
macadmins/netboot-httpd
docker run -d
-p 0.0.0.0:69:69/udp
-v /usr/local/docker/nbi:/nbi
--name tftpd
--restart=always
macadmins/tftpd
/usr/sbin/in.tftpd --listen --foreground --verbosity=10 --user user -B 1468 /nbi
docker run -d
-p 0.0.0.0:67:67/udp
-v /usr/local/docker/nbi:/nbi
-e BSDPY_IFACE=eth0
-e BSDPY_NBI_URL=http://$IP
-e BSDPY_IP=$IP
--name bsdpy
--restart=always
bruienne/bsdpy
My network team have added the server's IP address as a helper address to the subnets that require netbooting, and when I go into Startup Disk (or hold Alt while booting) I can see the 10.12.6AutoCasperNBI image available as a network disk, however when I attempt to load this, the machine hangs for 15-20 seconds and then boots back up to my desktop.
If I run "sudo docker logs bsdpy" I can see my machines are talking to the server, and I'm seeing the below;
08/16/2017 01:11:04 PM - DEBUG: -=========================================-
08/16/2017 01:11:04 PM - DEBUG: Got BSDP INFORM[LIST] packet:
08/16/2017 01:11:04 PM - DEBUG: Determining image list for system ID iMac12,1
08/16/2017 01:11:04 PM - DEBUG: Found enabled system ID iMac12,1 - adding "10.12.6AutoCasperNBI" to list
08/16/2017 01:11:04 PM - DEBUG: -=========================================-
08/16/2017 01:11:04 PM - DEBUG: Return ACK[LIST] to 10.9.251.2 on 721
08/16/2017 01:11:04 PM - DEBUG: Default boot image ID: [129, 0, 7, 25]
08/16/2017 01:11:06 PM - DEBUG: -=========================================-
08/16/2017 01:11:06 PM - DEBUG: Got BSDP INFORM[SELECT] packet:
08/16/2017 01:11:06 PM - DEBUG: Determining image list for system ID iMac12,1
08/16/2017 01:11:06 PM - DEBUG: Found enabled system ID iMac12,1 - adding "10.12.6AutoCasperNBI" to list
08/16/2017 01:11:06 PM - DEBUG: -->> Using HTTP URI: http://172.17.0.4/10.12.6AutoCasperNBI.nbi/NetBoot.dmg
08/16/2017 01:11:06 PM - DEBUG: ACK[SELECT] image ID: [129, 0, 7, 25]
08/16/2017 01:11:06 PM - DEBUG: -=========================================-
08/16/2017 01:11:06 PM - DEBUG: Return ACK[SELECT] to 10.9.251.2 on 721
08/16/2017 01:11:06 PM - DEBUG: TFTP path: /nbi/10.12.6AutoCasperNBI.nbi/i386/booter
However there's nothing more I can see in the logs to indicate a failure or anything. If I try browsing to http://172.17.0.4/10.12.6AutoCasperNBI.nbi/NetBoot.dmg it fails obviously, but if I change the IP address to the server's actual IP address rather than the Docker virtual IP address, it downloads the DMG with no issues, so as far as firewalls go and the HTTPD instance on the server, everything seems to be OK there.
I'm not sure where to go from here, can anyone please point me in the right direction?
Thanks
Gary
