# [PXE Boot Server] Configuring dnsmasq

## treefinger

Hello, I currently have a hardware router running gentoo that serves as a dhcp server using dnsmasq.

How can I configure dnsmasq so it will serve as a boot server.

I am trying to install Linux on a new Netbook of mine.

I have configured dnsmasq correctly but when restarting i get an error because i am trying to use the tftp server that is included with dnsmasq but i don't believe the flags were to include it at compilation time.

----------

## Paczesiowa

is there any special reason for using dnsmasq? I use it only for dns, dhcp and pxe things are provided by dhcpd and tftp-hpa

----------

## treefinger

 *Paczesiowa wrote:*   

> is there any special reason for using dnsmasq? I use it only for dns, dhcp and pxe things are provided by dhcpd and tftp-hpa

 

nope, i just figured it would be easier since it is already installed.

----------

## Paczesiowa

well, I had my share of problems with dnsmasq as dhcp server (and I'm not the only one). besides dhcpd and tftp-hpa are more widely used, so you'll have more help available.

----------

## treefinger

well, the router guide i followed that I believed is maintained by the community of gentoo told me that dnsmasq was cool. so thats what i have right now.

i think it would be better for my system to just get the version of dnsmasq with the tftp server enabled...

I am guessing I need to read the man page on emerge to compile a new version of dnsmasq?

----------

## solamour

I've been using dnsmasq, dnsmasq's built-in tftp, and pxelinux to boot via network. If I remember correctly, I just followed "Diskless Nodes with Gentoo" (http://www.gentoo.org/doc/en/diskless-howto.xml); look for "About PXELINUX" section.

dnsmasq needs to have "tftp" USE flag.

```
[ebuild   R   ] net-dns/dnsmasq-2.52  USE="dhcp ipv6 nls tftp -dbus" 298 kB
```

And here is the relevant section of dnsmasq.

```
/etc/dnsmasq.conf:

dhcp-boot=pxelinux.0

enable-tftp

tftp-root=/var/tftp

```

A virtual machine in VirtualBox was especially useful when testing.

__

sol

----------

