[Dnsmasq-discuss] Please consider clarifying the man page about the tftp service

Simon Kelley simon at thekelleys.org.uk
Mon Jan 27 15:58:31 GMT 2020

On 24/01/2020 21:49, Olivier Cailloux wrote:
> Dear list,
> I have been happy to use dnsmasq to install debian through network
> boot. However, it has taken a lot of trials and errors before I found
> the correct command line to use. I’d like to report my experience in
> hope that the man page be possibly improved, as the developers see fit.
> It was very unclear to me while reading the man page which options
> exactly need to be turned on to enable network boot. I tried the
> following commands:
> sudo /usr/sbin/dnsmasq --port=0 "--dhcp-range=, proxy" "
> --dhcp-boot=pxelinux.0,saucisson" --enable-tftp --log-dhcp
> sudo /usr/sbin/dnsmasq --port=0 "--dhcp-range=,proxy" "
> --dhcp-boot=pxelinux.0" --enable-tftp --log-dhcp --tftp-
> root=/home/olivier/netboot
> sudo /usr/sbin/dnsmasq --port=0 "--dhcp-range=,proxy" "
> --dhcp-boot=/pxelinux.0" --enable-tftp --log-dhcp --tftp-
> root=/home/olivier/netboot --dhcp-no-override
> before I finally found a correct one:
> sudo /usr/sbin/dnsmasq --port=0 "--dhcp-range=,proxy" "
> --dhcp-boot=pxelinux.0" --enable-tftp --log-dhcp --tftp-
> root=/home/olivier/netboot "--pxe-service=x86PC,Install Linux,
> pxelinux"
> (All this took a while because I did not even know the TFTP service was
> not activated with my first tries, so I thought the problem lied
> somewhere else.)
> The man page says: “If dnsmasq is providing a TFTP service (see --
> enable-tftp ) then only the filename is required here to enable network
> booting.” and also reading about the pxe-service option, I thought that
> it was unnecessary and was there just to allow for customizing the
> string that would display at start (which I thought I do not need).
> Please consider clarifying the man page concerning the relevant options
> to state which option is required exactly; and especially, please
> consider making dnsmasq tell something in the log file, or (better
> IMHO) refuse to start when the options it receives are incoherent. With
> the current behavior, it is very hard, when it’s the first time you do
> it, to even know that dnsmasq is not configured properly.

This is a laudible aim, the problem is that there's no such thing as
"which option is required exactly". Netboot is gnarly thicket of
different standards and different ways of doing things, and depending on
how you want to do things, and which standards the things you are trying
to boot support, then you need different options. For instance in your
case you presumably have another DHCP server on the network which is
dealing with handing out addresses, and you're relying on the
never-standardised "proxy DHCP" feature of PXE to do be able to do
netbooting without touching the configuration of that other DHCP server.
In fact if you use just one DHCP server which can be configured,
especially if it's running dnsmasq, netbooting is much simpler than the
way you've done it. A primer on netbooting with examples of dnsmasq
configurations would be a good thing to have, but it's place is not in
the dnsmasq man page.



More information about the Dnsmasq-discuss mailing list