-
-
Notifications
You must be signed in to change notification settings - Fork 698
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Example DHCP server config doesn't work #1093
Comments
I re-installed my Armbian Focal (20.04) running TV box (X96 Air) today and
I tried unsuccessfully to get dnsmasq to work with the netboot docker container EDIT That will most likely be because I hadn't disabled port 69 on the docker container so the TFTP port would've clashed with the one from dnsmasq. I have yet to try dnsmasq again with the docker container. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
I've noticed the netboot docs contain an example UEFI and Legacy boot DHCP config but I've not yet tried translating that to regular |
The exact and specific problem is the web page https://netboot.xyz/docs/docker Suggests an isc DHCP server config, including, in parts: } elsif option arch = 00:00 { And the docker image ships with no netboot.xyz.pxe file. You can verify as follows: docker logs netbootxyz and notice there are repeated errors along the lines of RRQ for netboot.xyz.pxe followed by error messages about no file. Well, OK then, I tried with command line tftp and yes indeed that file does not exist although I have no trouble downloading netboot.xyz.efi and netboot.xyz.kpxe using a CLI tftp client. Then scroll down to the big table "The following bootfile names can be set as the boot file in the DHCP configuration. They are baked into the Docker image:" and node the docker image intentionally does not ship with a netboot.xyz.pxe All you need do is remove that "if" lines for the .pxe file and then I can boot into the menu just fine, run my memtest and all that. Everything else about the docs seems OK? OPs solution of complete rewrite works also, of course, although all you really need to do is remove the reference to the non-existent .pxe file. |
Hi vince Can you please be more verbose in your solution? Please paste your working dhcp server config in full. Are you claiming that your dhcp server config works with both BIOS and UEFI machines? |
Yes I made a VMware image and forced it to legacy and netbooted it and it runs great and I have a physical hardware (admittedly, older) supermicro server that's set up to UEFI and it's netbooting Ubuntu while I type this in... I have two DHCP servers both running up to date FreeBSD. They are set up primary/secondary and have hundreds of static assignments so I'm not going to cut and paste "everything" but heres the most of /usr/local/etc/dhcpd.conf:
Comments: "option arch code 93" I know not what this incantation means, but it seems required The next paragraph is pretty standard network stuff, what is my DNS search string, what are my DNS servers, etc. The next paragraph is a pretty typical primary side config for a dual-server cluster probably not very relevant to the netboot problem. My IP address scheme is of the order of 10.vlan.0.0/16, so VLAN number 10 uses IP addresses 10.10.0.0/16 I don't use DHCP on my other VLANs (long story). next-server is the ip address of my Docker install of netboot.xyz My if options are just a cut down version of the web page docs. If I log into my docker server and run a "docker logs netbootxyz" I see this kind of stuff for legacy:
If I boot a UEFI I see this kind of stuff for EFI boots:
It all works fine... |
As a follow up I was thinking at lunch it would be hilarious to have two DHCP servers a primary and a secondary and only configure netboot correctly on one of the DHCP servers, then only about half the time would netboot work or maybe only on half the ip addresses or similar. That would be sooooooo hilarious, especially if I were copy-pasting from the bad config, so I double checked my work. I keep both my servers DHCP config in the same git repo, so I can, and just did, "diff" the two files, and they are essentially identical other than the primary/secondary part of the config. So yeah, verified that the above config is good working although I only cut and pasted from one of my two servers in the cluster. Anyway good luck with this all. |
I checked portainer and I'm running "build_version netboot.xyz version: 0.6.7-nbxyz7 Build-date: 2022-05-24T04:40:18" I got that by installing the latest tag as per https://github.com/netbootxyz/docker-netbootxyz/pkgs/container/netbootxyz that is 11 days old, so I have the most recent netbootxyz docker image installed. If you want to verify my claim that the Docker netboot container ships without netboot.xyz.pxe, all you need do is connect to the shell in the docker container, run "ps aux | grep tftpd" and you'll see the command line for tftpd looks like
Then cd /config/menus and ls netboot.* and
Then look at the webpage https://netboot.xyz/docs/docker/ ISC-DHCP sample config which contains in part
Well thats not going to work as you can see above that file isn't in the tftpd directory so it'll never be able to download it, which is why every time I'd boot I'd see an error in the tftpd logs complaining about that file not existing and the boot would fail. So I just rewrote the DHCPD server config as seen above and it just works. Theoretically either the docker image needs to have netboot.xyz.pxe added or the sample config should not reference that file or completely rewrite it like I did, either of the three options "should" work. |
Updated docs to drop the pxe file as we don't currently build or bundle it in the image. |
Sorry for the delay in getting back to you on this. I've got this working now and I'm ready to update the Docker docs page with all the missing details to get a container installed and get DHCP set up etc but I don't know how to fetch/update the docs. I've cloned the netboot.xyz-docs repo then I tried:
Nor can I see the source for the docker page in that repo. I've never used yarn before so I'm a bit stuck. Whats the easiest way to update the docs? Also, on a bit of a tangent, is it not possible to boot into netboot when secure boot is enabled? I've not been able to do that but BIOS and UEFI w/o secure boot are working now. |
If you want to submit a PR for the Docker README, you can do it here: https://github.com/netbootxyz/docker-netbootxyz/blob/master/README.md in markdown. Yeah, secure boot does not work with iPXE, it would require getting the binaries signed by MS: https://ipxe.org/appnote/etoken |
I have created this PR which addresses most of my gripes about the current netboot docker docs |
@antonym has merged my PR but https://netboot.xyz/docs/docker/ hasn't been updated yet to mirror the state of the updated docker-netbootxyz README and I suspect this is because the https://github.com/netbootxyz/docker-netbootxyz page says the build is currently failing. I don't think my markdown changes could cause the build to fail could it? There are a few more changes I want to make (or would like to see someone else make) to the netboot.xyz docs:
netbootxyz/docker-netbootxyz#24 As I say in that ticket, I think I'm not using the right docker command option or path. Has anyone here tested using local assets with their own netboot server? Maybe its an unfinished feature?
|
The DHCP config has been updated on the main Docker page so I'm closing this. I'm going to open another ticket for al the other minor issues I have with the current docs. |
The example dhcpd config given on https://netboot.xyz/docs/docker doesn't work. When I try using that config (or something like it) I get the errors:
Here is a working config albeit one that doesn't try to detect the platform, hence why I'm not submitting a PR to update the docs.
The text was updated successfully, but these errors were encountered: