I really hate dnsmasq. every once in a while I have a problem and some Linux guy tells me "just use PXE bro" and then I spend a hour configuring PXE that doesn't fucking work without displaying a single debug print and all of this is a complete waste of time.

the UI of dnsmasq is atrocious; if I wanted to be able to tweak every DHCP option I would use my TCP/IP stack to answer DHCP queries. just give me something that can boot a machine without four hours of twiddling with options that are required for correct operation yet nobody bothers to give them names better than "66"

I don't think there's been a single time in my life when I successfully PXE-booted something outside of a perfectly-controlled, utility-free environment with a crossover Ethernet cable

this time I can't even get it to boot in a completely artificial environment. the PXE boot ROM doesn't log anything to the display and when it errors out it shows the error for like 100 milliseconds before switching to the next boot option

fucking useless technology

anyway if you ever recommend anybody use PXE for anything who isn't being paid a salary or a consulting rate for setting this up: don't.
@whitequark as someone who's paid a salary to do this: it's just as awful. It really is this buggy and you constantly fight against insane software/firmware bugs...
@manawyrm but at least you're being paid for it!

@whitequark but if you are required to get it to work and giving up is not an option and you'll then have to tell ASRock, ASUS, Dell, etc.
"Hey, trashing the stack when returning from a function call really isn't cool and a bug, pls fix" and they look at you like???
you really are in a bad situtation and well, it's frustrating :P

If you ever do want to try again:
tftpd-hpa and iPXE as a second stage loader work well. OpenWRT as a configurable DHCP server also works well.

@manawyrm @whitequark it works as long as the vendor doesn’t fuck up the MSI-X / IRQ interrupts or uses an ancient EDK2 base
@wyldtom @whitequark … or the customers want legacy boot or you need IPv6 or or or or or….
@manawyrm @whitequark Ah yes: Once had a server that for some reason appended a 0xff byte to the pxelinux filename it got via DHCP. Solved it by renaming the file on the TFTP server to include the 0xff byte at the end 🫠
@manawyrm @whitequark Reminds me that one day where I tried to boot a laptop from PXE, but it couldn't connect to the server. After rmuch digging around and wiresharking, I found out that the DHCP client in the PXE ROM had an "off by one" bug, that caused it to read an extra nul character from the "next server" address, thus trying to resolve an invalid domain. Fun times!
@whitequark did you try UEFI HTTP boot? ( https://www.ytvwld.de/blog/netboot.html ) In my experience this is harder to setup on the client but way easier to setup on the server.
How (not) to netboot

HTTP is cool – if it works

ytvwld.de
@ytvwld no... because I've no storage on this machine on which to put the ESP. but I might have to solve that first
@whitequark depending on the firmware you might not need to, just putting a url in a boot option might be enough if your system is new enough

@whitequark IIRC I once tried PXEbooting the Debian installer (it's just a DHCP option and some files on TFTP, how hard could it be?), gave up, and burned the CD instead.

(Lots of single-use CDs were burned at that job, I was trying to reduce that slightly. I guess these days you'd stick it on a flash drive which is a lot less wasteful.)

@whitequark hard agree, as someone who routinely sets up various network boot environments for cash money.

It’s the Linux of network booting technology - whoever designed PXE looked at everything else in the market and decided to try being everything to everyone instead of just doing one thing simply using standardised configuration options.

@whitequark At one point, I did have PXE working on my home network. I even used it regularly for booting my diskless media player (with NFS root). I also had it set up with Debian install media. So I can confirm that it _can_ be made to work, but I'd think twice about setting it up again.

I probably still have the DNS/DHCP entries set up to point at a non-existent TFTP service (which has caused me trouble more recently).