[Dnsmasq-discuss] RaspberryPi PCAP file Was: tftp hook for "not found"

Carl Karsten carl at nextdayvideo.com
Fri Dec 3 23:19:49 UTC 2021


wget http://now.zapto.org/temp/RPI3bp13.pcap
97mb
client Raspberry Pi 3 Model B Plus Rev 1.3

I scripted your instructions

#!/bin/bash -ex
# verify parameters and collect traffic

eth=eth-local
mac=b8:27:eb:6d:27:f6

# on client
# cat /sys/firmware/devicetree/base/model"
# Raspberry Pi 3 Model B Plus Rev 1.3
# RPI3bp1.3
pcf_name=RPI3bp13.pcap

echo "should show Bootp requests or DHCP requests"
tcpdump -ni ${eth} port bootpc

echo "should show Bootp requests or DHCP requests"
tcpdump -ni ${eth} ether host ${mac}

echo "create libpcap file (show nothing)"
tcpdump -ni ${eth} -w ${pcf_name} ether host ${mac}

I'm sure you will react to the amount of errors in the netbotting.
This seems to be typical, so I'm not too worried about it.
for those that are wondering, my server log from one boot:

Dec  3 16:51:43 rpi-cb-1f-f7 dnsmasq-dhcp[1584]:
DHCPDISCOVER(eth-local) b8:27:eb:6d:27:f6
Dec  3 16:51:43 rpi-cb-1f-f7 dnsmasq-dhcp[1584]: DHCPOFFER(eth-local)
10.21.0.162 b8:27:eb:6d:27:f6
Dec  3 16:51:43 rpi-cb-1f-f7 dnsmasq-tftp[1584]: file
/srv/tftp/bootsig.bin not found
Dec  3 16:51:43 rpi-cb-1f-f7 dnsmasq-tftp[1584]: sent
/srv/tftp/bootcode.bin to 10.21.0.162
Dec  3 16:51:43 rpi-cb-1f-f7 dnsmasq-dhcp[1584]:
DHCPDISCOVER(eth-local) b8:27:eb:6d:27:f6
Dec  3 16:51:43 rpi-cb-1f-f7 dnsmasq-dhcp[1584]: DHCPOFFER(eth-local)
10.21.0.162 b8:27:eb:6d:27:f6
Dec  3 16:51:43 rpi-cb-1f-f7 dnsmasq-tftp[1584]: error 0 Early
terminate received from 10.21.0.162
Dec  3 16:51:43 rpi-cb-1f-f7 dnsmasq-tftp[1584]: failed sending
/srv/tftp/7a6d27f6/start.elf to 10.21.0.162
Dec  3 16:51:43 rpi-cb-1f-f7 dnsmasq-tftp[1584]: file
/srv/tftp/7a6d27f6/autoboot.txt not found
Dec  3 16:51:43 rpi-cb-1f-f7 dnsmasq-tftp[1584]: error 0 Early
terminate received from 10.21.0.162
Dec  3 16:51:43 rpi-cb-1f-f7 dnsmasq-tftp[1584]: failed sending
/srv/tftp/7a6d27f6/start.elf to 10.21.0.162
Dec  3 16:51:43 rpi-cb-1f-f7 dnsmasq-tftp[1584]: sent
/srv/tftp/7a6d27f6/config.txt to 10.21.0.162
Dec  3 16:51:43 rpi-cb-1f-f7 dnsmasq-tftp[1584]: file
/srv/tftp/7a6d27f6/recovery.elf not found
Dec  3 16:51:47 rpi-cb-1f-f7 dnsmasq-tftp[1584]: sent
/srv/tftp/7a6d27f6/start.elf to 10.21.0.162
Dec  3 16:51:47 rpi-cb-1f-f7 dnsmasq-tftp[1584]: sent
/srv/tftp/7a6d27f6/fixup.dat to 10.21.0.162
Dec  3 16:51:48 rpi-cb-1f-f7 dnsmasq-tftp[1584]: file
/srv/tftp/7a6d27f6/recovery.elf not found
Dec  3 16:51:48 rpi-cb-1f-f7 dnsmasq-tftp[1584]: error 0 Early
terminate received from 10.21.0.162
Dec  3 16:51:48 rpi-cb-1f-f7 dnsmasq-tftp[1584]: failed sending
/srv/tftp/7a6d27f6/config.txt to 10.21.0.162
Dec  3 16:51:48 rpi-cb-1f-f7 dnsmasq-tftp[1584]: sent
/srv/tftp/7a6d27f6/config.txt to 10.21.0.162
Dec  3 16:51:48 rpi-cb-1f-f7 dnsmasq-tftp[1584]: file
/srv/tftp/7a6d27f6/dt-blob.bin not found
Dec  3 16:51:48 rpi-cb-1f-f7 dnsmasq-tftp[1584]: file
/srv/tftp/7a6d27f6/recovery.elf not found
Dec  3 16:51:48 rpi-cb-1f-f7 dnsmasq-tftp[1584]: error 0 Early
terminate received from 10.21.0.162
Dec  3 16:51:48 rpi-cb-1f-f7 dnsmasq-tftp[1584]: failed sending
/srv/tftp/7a6d27f6/config.txt to 10.21.0.162
Dec  3 16:51:48 rpi-cb-1f-f7 dnsmasq-tftp[1584]: sent
/srv/tftp/7a6d27f6/config.txt to 10.21.0.162
Dec  3 16:51:48 rpi-cb-1f-f7 dnsmasq-tftp[1584]: file
/srv/tftp/7a6d27f6/bootcfg.txt not found
Dec  3 16:51:48 rpi-cb-1f-f7 dnsmasq-tftp[1584]: error 0 Early
terminate received from 10.21.0.162
Dec  3 16:51:48 rpi-cb-1f-f7 dnsmasq-tftp[1584]: failed sending
/srv/tftp/7a6d27f6/initrd.img-5.10.63-v8+ to 10.21.0.162
Dec  3 16:52:04 rpi-cb-1f-f7 dnsmasq-tftp[1584]: sent
/srv/tftp/7a6d27f6/initrd.img-5.10.63-v8+ to 10.21.0.162
Dec  3 16:52:04 rpi-cb-1f-f7 dnsmasq-tftp[1584]: error 0 Early
terminate received from 10.21.0.162
Dec  3 16:52:04 rpi-cb-1f-f7 dnsmasq-tftp[1584]: failed sending
/srv/tftp/7a6d27f6/bcm2710-rpi-3-b-plus.dtb to 10.21.0.162
Dec  3 16:52:04 rpi-cb-1f-f7 dnsmasq-tftp[1584]: sent
/srv/tftp/7a6d27f6/bcm2710-rpi-3-b-plus.dtb to 10.21.0.162
Dec  3 16:52:04 rpi-cb-1f-f7 dnsmasq-tftp[1584]: error 0 Early
terminate received from 10.21.0.162
Dec  3 16:52:04 rpi-cb-1f-f7 dnsmasq-tftp[1584]: failed sending
/srv/tftp/7a6d27f6/overlays/overlay_map.dtb to 10.21.0.162
Dec  3 16:52:04 rpi-cb-1f-f7 dnsmasq-tftp[1584]: sent
/srv/tftp/7a6d27f6/overlays/overlay_map.dtb to 10.21.0.162
Dec  3 16:52:04 rpi-cb-1f-f7 dnsmasq-tftp[1584]: error 0 Early
terminate received from 10.21.0.162
Dec  3 16:52:04 rpi-cb-1f-f7 dnsmasq-tftp[1584]: failed sending
/srv/tftp/7a6d27f6/config.txt to 10.21.0.162
Dec  3 16:52:04 rpi-cb-1f-f7 dnsmasq-tftp[1584]: sent
/srv/tftp/7a6d27f6/config.txt to 10.21.0.162
Dec  3 16:52:04 rpi-cb-1f-f7 dnsmasq-tftp[1584]: error 0 Early
terminate received from 10.21.0.162
Dec  3 16:52:04 rpi-cb-1f-f7 dnsmasq-tftp[1584]: failed sending
/srv/tftp/7a6d27f6/overlays/vc4-kms-v3d.dtbo to 10.21.0.162
Dec  3 16:52:04 rpi-cb-1f-f7 dnsmasq-tftp[1584]: sent
/srv/tftp/7a6d27f6/overlays/vc4-kms-v3d.dtbo to 10.21.0.162
Dec  3 16:52:04 rpi-cb-1f-f7 dnsmasq-tftp[1584]: error 0 Early
terminate received from 10.21.0.162
Dec  3 16:52:04 rpi-cb-1f-f7 dnsmasq-tftp[1584]: sent
/srv/tftp/7a6d27f6/cmdline.txt to 10.21.0.162
Dec  3 16:52:04 rpi-cb-1f-f7 dnsmasq-tftp[1584]: sent
/srv/tftp/7a6d27f6/cmdline.txt to 10.21.0.162
Dec  3 16:52:04 rpi-cb-1f-f7 dnsmasq-tftp[1584]: file
/srv/tftp/7a6d27f6/recovery8.img not found
Dec  3 16:52:04 rpi-cb-1f-f7 dnsmasq-tftp[1584]: error 0 Early
terminate received from 10.21.0.162
Dec  3 16:52:04 rpi-cb-1f-f7 dnsmasq-tftp[1584]: failed sending
/srv/tftp/7a6d27f6/kernel8.img to 10.21.0.162
Dec  3 16:52:04 rpi-cb-1f-f7 dnsmasq-tftp[1584]: file
/srv/tftp/7a6d27f6/armstub8.bin not found
Dec  3 16:52:04 rpi-cb-1f-f7 dnsmasq-tftp[1584]: error 0 Early
terminate received from 10.21.0.162
Dec  3 16:52:04 rpi-cb-1f-f7 dnsmasq-tftp[1584]: failed sending
/srv/tftp/7a6d27f6/kernel8.img to 10.21.0.162
Dec  3 16:52:04 rpi-cb-1f-f7 dnsmasq-tftp[1584]: error 0 Early
terminate received from 10.21.0.162
Dec  3 16:52:04 rpi-cb-1f-f7 dnsmasq-tftp[1584]: failed sending
/srv/tftp/7a6d27f6/kernel8.img to 10.21.0.162
Dec  3 16:52:16 rpi-cb-1f-f7 dnsmasq-tftp[1584]: sent
/srv/tftp/7a6d27f6/kernel8.img to 10.21.0.162
Dec  3 16:52:37 rpi-cb-1f-f7 dnsmasq-dhcp[1584]:
DHCPDISCOVER(eth-local) b8:27:eb:6d:27:f6
Dec  3 16:52:37 rpi-cb-1f-f7 dnsmasq-dhcp[1584]: DHCPOFFER(eth-local)
10.21.0.162 b8:27:eb:6d:27:f6
Dec  3 16:52:37 rpi-cb-1f-f7 dnsmasq-dhcp[1584]:
DHCPREQUEST(eth-local) 10.21.0.162 b8:27:eb:6d:27:f6
Dec  3 16:52:37 rpi-cb-1f-f7 dnsmasq-dhcp[1584]: DHCPACK(eth-local)
10.21.0.162 b8:27:eb:6d:27:f6
Dec  3 16:52:39 rpi-cb-1f-f7 dnsmasq-dhcp[1584]:
DHCPDISCOVER(eth-local) b8:27:eb:6d:27:f6
Dec  3 16:52:39 rpi-cb-1f-f7 dnsmasq-dhcp[1584]: DHCPOFFER(eth-local)
10.21.0.162 b8:27:eb:6d:27:f6
Dec  3 16:52:39 rpi-cb-1f-f7 dnsmasq-dhcp[1584]:
DHCPREQUEST(eth-local) 10.21.0.162 b8:27:eb:6d:27:f6
Dec  3 16:52:39 rpi-cb-1f-f7 dnsmasq-dhcp[1584]: DHCPACK(eth-local)
10.21.0.162 b8:27:eb:6d:27:f6
Dec  3 16:52:39 rpi-cb-1f-f7 rpc.mountd[1807]: authenticated mount
request from 10.21.0.162:935 for /srv/nfs/rpi/bullseye/root/merged
(/srv/nfs/rpi/bullseye/root/merged)

docs and scripts I used to build the server:
https://github.com/CarlFK/pici/blob/main/setup.md

On Fri, Dec 3, 2021 at 12:50 PM Geert Stappers via Dnsmasq-discuss
<dnsmasq-discuss at lists.thekelleys.org.uk> wrote:
>
> On Thu, Dec 02, 2021 at 10:02:27PM +0000, Simon Kelley wrote:
> In-Reply-To: <e6dfc893-f741-9b2f-eae2-bf8cc24ea9a6 at thekelleys.org.uk>
> > On 02/12/2021 16:00, Carl Karsten wrote:
> >
> > > for more details on what it does:
> > > it first does many ftp get /<filenam> and it isn't clear what files it
> > > needs from the boot partition.if t can't find the file in / then it
> > > tries /<serial>/<filename>
> > > so I could put all 41 files in /srv/tftp ... but that makes me grumpy.
>
> The 'it' is time is a RaspberryPi, probably version 3.
> Posting https://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/2021q4/015957.html
> is vague about it. ( There is no clear "Version X is being used" )
>
>
> > I've not played with Pi, but assuming it's some variety of the PXE
> > protocol, that usually tries  pathnames constructed from the MAC
> > address, then the IP address with decreasing specificity (Ie
> > 192.168.1.100, then 192.168.1, then 192.168, then 192) and finally it
> > tries a fixed pathname. If you don't want to have machine-specific boot
> > files, just don't provide those files and the boot process will drop
> > though top the generic ones.
>
>
> What would help is providing a fairly complete  network packet capture
> of a Raspi attempting to netboot.  'fairly' because it is OK if the
> capture stops at the point of requesting /srv/tftp/7a6d27f6/autoboot.txt
> 'complete' for aiming to providing the "whole picture".
>
> What follows is describing the "how". Probably too detailed and surely
> untested. You are invited to translate the procedure to your setup.
>
> * Have two computers, one being client, a Raspi.  The other being a
>   server.
> * On the server
>   * Running dnsmasq
>   * Being DHCP server
>   * Being TFTP server
>   * Having configuration that tells the client to come to this server
>   * Having installed tcpdump
>   * Known the name of the network interface connected to the client.
>     Let's assume it is 'eth3'
> * Invoke `sudo /sbin/tcpdump -ni eth3 port bootpc` on the server
> * Netbook the Raspi
> * At the server should tcpdump show Bootp requests or DHCP requests
> * Stop tcpdump with Control-C so we can go the next step
> * Invoke `sudo /sbin/tcpdump -ni eth3 ether host dc:a6:32:05:7f:03`
>   where 'dc:a6:32:05:7f:03' is the MAC of the Raspi.
> * Netbook the Raspi
> * At the server should tcpdump show Bootp requests or DHCP requests
>   of the Raspi we are testing. And only from that client.
> * Stop tcpdump with Control-C so we can go the next step
> * Invoke `sudo /sbin/tcpdump -ni eth3 -w raspiModelFoo.pcap ether host dc:a6:32:05:7f:03`
> * Netbook the Raspi
> * tcpdump wil not show anything
> * Give the Raspi to (attempt to) netboot
> * Stop tcpdump with Control-C so we can go the next step
> * There is a libpcap file  'raspiModelFoo.pcap'  (ModelFoo replaced with
>   your actual model of RaspberryPI
> * Save the .pcap somewhere on the Internet where it can be fetched.
> * Share the URL with the mailinglist. Karma bonus points for an URL
>   that can be used with `wget`.
>
>
> Groeten
> Geert Stappers
> --
> Silence is hard to parse
>
> _______________________________________________
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss at lists.thekelleys.org.uk
> https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss



-- 
Carl K



More information about the Dnsmasq-discuss mailing list