Today I wanted to configure my router to support PXE-booting in my homenetwork. Herefore the following components are requeired:
- DHCP-server configured to distribute Bootserver
- TFTP-Server which provides the PXE
The DHCP-Server is running on a Draytek Vigor 2130n router. The configuration of the PXE-option is not available by the webinterface so we have to configure the option in the configfile of the DHCP-server itself. As a DHCP-server the Vigor is running DNSmasq. To configure the DNSmasq we have to log in on the router via ssh and edit /etc/dnsmasq.conf. At the end of the file the follwing line has to be appended:
[pastacode lang=”markup” message=”dnsmasq.conf” highlight=”” provider=”manual”]
dhcp-boot=/pxelinux.0,tftp-hostname,192.168.1.10
[/pastacode]
In my case I’m running the TFTP-server on my NAS which is reacheable by the 192.168.1.10 IP-address. In the appended Option we have to configure the bootfile which is used (in the case of pxelinux it’s pxelinux.0) the hostname of the system which is providing the TFTP-server and the IP-address of the system.
It’s also possible to configure iPXE or gPXE to boot from. Herefor the corresponding bootfile has to be changed.
On my NAS the TFTP-server has been enabled and the content of the example-zip was plaeced in the TFTP-root.
(The background image is not included in the package, but any png, jpg file with a resolution of 800×600 can be used. Otherwise the background image can be altered in the “menuoutline.cfg” configuration file.)
If everything was setup correctly a similar screen should appear:
I have a seperate tools menu in my PXE-menu to boot tools for HW-diagnosys, partitioning, backup and system rescue. An overview about some cool tools can be found in this blog post.
Additional informations and references:
This is exactly what I want to do as well. Once you’re in the router over SSH, how do you edit the dnsmasq.conf? I’m not really that familiar with the Draytek CLI. I only seem to get a limited set of commands when logged in as admin.
Hi Daniel,
there is an embedded linux on the router which support the use of vi/vim.
Sou you should be able to open the file with “vim /etc/dnsmasq.conf” and make your changes. Before the changes take effect you need to restart the dnsmasq-services with “/etc/init.d/dnsmasq restart”
Any input on how you got the root password, so you could vi into the dnsmasq.conf file? I have a 2925.
Hey, for me it worked with the admin user (Form the Webinterface). You should be able to shh to your router with admin:yourpwd. Once logged in the admin user should be able to open every file in vi. Für The 2130 this works quite well.