Is it possible to set up openwrt to serve a recovery file to my NAS? I hosed the system and need to repair it.
I know can use dnsmasq as a tftp server but it is not clear to me if it can be configured to identify a machine by MAC, assign an IP address and then feed a file to the machine requiring repair. I.e., dhcpd would be configured as:
Yes, but you will need dnsmasq-full, rather than the normal dnsmasq package (or atftpd). While you'll only need a tiny subset of https://openwrt.org/docs/guide-user/services/tftp.pxe-server that guide should have most of the required information.
I guess that should be possible, indirectly, see adding a custom dhcp option for my SIP phone(s) as example (I personally use tftpd-hpa myself though).
config host
option name 'cp-7962g'
option dns '1'
option mac 'ac:a0:16:xx:xx:xx'
option ip '192.168.x.x'
config mac
option mac 'ac:a0:16:xx:xx:xx'
option networkid 'cisco-sip'
list dhcp_option '66,192.168.x.x'