PXE Booting environment for Gargoyle

General discussion about Gargoyle, OpenWrt or anything else even remotely related to the project

Moderator: Moderators

Post Reply
stuartbh
Posts: 76
Joined: Sun Oct 20, 2019 4:18 pm

PXE Booting environment for Gargoyle

Post by stuartbh »

Gargoyle users:

I recently became interested in trying to setup a PXE boot environment via my Gargoyle installation on my router.

The first issue I ran into is that the USB Storage option does not work properly on Gargoyle unless you have already formatted the USB disk (I tried to do it via the GUI and it claimed the password was wrong, despite my knowing I typed it correctly). However, running fdisk and mkfs.ext4 from the command line does not escape my capabilities so I have a functioning USB Storage on Gargoyle now.

I saw a posting showing several statements that needed to be added to the /etc/config/dhcp file for PXE booting to work but not much else more than that for how to get it going on Gargoyle.

I know that TFTP service is required for PXE booting and I'd like to setup a TFTP server on my Gargoyle router anyway (for booting Cisco IP Phones). So I'd imagine that would be the first thing I'd need help to get running on Gargoyle.

If anyone else has guidance on setting up a PXE server on Gargoyle I'd surely appreciate it.

Thanks in advance.
Very Respectfully,

Stuart, N3GWG
Computer Scientist

ispyisail
Moderator
Posts: 5185
Joined: Mon Apr 06, 2009 3:15 am
Location: New Zealand

Re: PXE Booting environment for Gargoyle

Post by ispyisail »

As a rule any questions outside the GUI are better asked at OpenWRT (you can still ask here if you want)

Just think of Gargoyle as a GUI for OpenWRT.

(This statement is true at a basic level but when you get into it Gargoyle is a little more than a GUI)

ispyisail
Moderator
Posts: 5185
Joined: Mon Apr 06, 2009 3:15 am
Location: New Zealand

Re: PXE Booting environment for Gargoyle

Post by ispyisail »

To be honest i'm not sure why you aren't using OpenWRT instead of Gargoyle.

OpenWRT is for power users like yourself

stuartbh
Posts: 76
Joined: Sun Oct 20, 2019 4:18 pm

Re: PXE Booting environment for Gargoyle

Post by stuartbh »

ispyisail wrote:To be honest i'm not sure why you aren't using OpenWRT instead of Gargoyle.

OpenWRT is for power users like yourself
Simple reason is your OpenVPN worked easily and theirs did not! :)

I also thought the GUI of Gargoyle was well done.

But, I am open to trying OpenWRT again perhaps.
Very Respectfully,

Stuart, N3GWG
Computer Scientist

ispyisail
Moderator
Posts: 5185
Joined: Mon Apr 06, 2009 3:15 am
Location: New Zealand

Re: PXE Booting environment for Gargoyle

Post by ispyisail »

Having said that we do need more power users like yourself at Gargoyle :)

stuartbh
Posts: 76
Joined: Sun Oct 20, 2019 4:18 pm

Re: PXE Booting environment for Gargoyle

Post by stuartbh »

ispyisail wrote:Having said that we do need more power users like yourself at Gargoyle :)
I almost feel bad, as if I am creating work for you...but I think that this would be an easy option to add to Gargoyle and one that would add to Gargoyle's value!

Adding TFTP capability to Gargoyle

dnsmasq is inclusive of TFTP service and literally to get Gargoyle to become a TFTP server requires zero additional software! It would only need some screens (GUIization) to be added to allow someone to provide the options needed for the configuration.

dnsmasq (the /etc/dnsmasq.conf file specifically) needs only these two lines to enable TFTP service!

enable-tftp
tftp-root=/tmp/usb_mount/baddadbed69-01

Of course the tftp-root directory could be anywhere someone preferred. In my case (not those hexadecimal numbers), but the ones pointing to my 32GB USB stick are there.

Option 150 is something I added to my /etc/config/dhcp file to allow my Cisco 7940 IP Phone to be DHCPed a TFTP address for it to use to get its configuration files. A menuized way of setting that up would be wonderful too. In fact, the TFTP address it was providing originally was a virtual machine on my network which is now being transitioned to Gargoyle. I am going to decommission that VM now.

list dhcp_option '150,192.168.x.x,192.168.x.y'

In my case the first IP address is the IP address of the router (as a TFTP server) and the second IP is the VM TFTP server I mentioned earlier.

This was all it took (except setting up an USB Storage drive and using its path and a tftproot directory as part of the 'tftp-root=' option above) to get it all working. I installed no additional software!

I would envision adding something to the DHCP menu (like the Basic menu has for adding custom DNS server) to allow one to add a couple of custom TFTP server IP addresses that could be specified as above as an 'option 150'.

Perhaps the TFTP enable checkbox and a TFTP directory path box could be put on the basic page or maybe all of them together on a TFTP configuration page.

Getting TFTP working is my first step in getting PXE Boot working too. I wanted to be sure to share what I figured out for others as I did not really find a lot of good documentation on TFTP configuration on dnsmasq.
Very Respectfully,

Stuart, N3GWG
Computer Scientist

Post Reply