I am trying to network boot Raspberry Pi from my desktop PC with Gentoo Linux.I followed the instructions from Raspberry Pi, with relevant changes for my Gentoo installation.Below are the steps I followed.

  1. I have burned the latest image of Raspbian and booted the Raspberry PI.I ran the update and upgrade using below command

    sudo apt-get update && sudo apt-get upgrade

  2. Enabled the USB boot mode using below command

    echo program_usb_boot_mode=1 | sudo tee -a /boot/config.txt

  3. Rebooted and verified the boot flag

    sudo reboot

After reboot

$ vcgencmd otp_dump | grep 17:
17:3020000a

4. I removed the line that was added in step 2 above and powered off the raspberry pi, sudo poweroff

  1. Removed the sd card and inserted it into PC and copied the root file system

    sudo mkdir -p /nfs/client1

    sudo rsync -xa --progress /mnt/sdcard/root /nfs/client1

  2. Added dnsmasq configuration as below

sunils@sunils-pc ~/Downloads $ cat /etc/dnsmasq.conf

port=0
dhcp-range=192.168.0.255,proxy
log-dhcp
enable-tftp
tftp-root=/tftpboot
pxe-service=0,"Raspberry Pi Boot   "
dhcp-boot=bootcode.bin,192.168.0.11
  1. Created the tftpboot directory

    sudo mkdir /tftpboot

    sudo chmod 777 /tftpboot

  2. copied the boot files

    cp -r /mnt/sdcard/boot/* /tftpboot

  3. Enabled the NFS support on Gentoo.

10 Updated the cmdline.txt on boot partition to point to correct network root

sunils@sunils-pc ~/Downloads $ cat /tftpboot/cmdline.txt 
dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1
root=192.168.0.11:/nfs/client1,vers=3 rw ip=dhcp rootwait elevator=deadline

After following these steps I expect the Raspberry PI to discover the service but it fails to boot,

DHCP Dump:- https://pastebin.com/75LmwrVi

tcp Dump :- https://www.cloudshark.org/captures/cf8ea3d1cce4

TCP boot log

sunils@sunils-pc ~ $ sudo tcpdump -i br0 port bootpc
Password: 
Sorry, try again.
Password: 
dropped privs to tcpdump
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on br0, link-type EN10MB (Ethernet), capture size 262144 bytes
11:52:15.067794 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from b8:27:eb:d8:79:03 (oui Unknown), length 320
11:52:15.068344 IP 192.168.0.11.bootps > 255.255.255.255.bootpc: BOOTP/DHCP, Reply, length 317
11:52:15.068498 IP domain.name.dlink.com.bootps > 255.255.255.255.bootpc: BOOTP/DHCP, Reply, length 548
11:52:19.811136 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from b8:27:eb:d8:79:03 (oui Unknown), length 320
11:52:19.811621 IP 192.168.0.11.bootps > 255.255.255.255.bootpc: BOOTP/DHCP, Reply, length 317
11:52:19.811872 IP domain.name.dlink.com.bootps > 255.255.255.255.bootpc: BOOTP/DHCP, Reply, length 548

Can someone help me regarding this.

Update#2:

When I set the dhcp-reply-delay=5 it looks like raspberry pi starts the download of the files but it stops at fixup.dat

20:56:51.358927 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from b8:27:eb:f8:ce:34 (oui Unknown), length 320
20:56:51.359668 IP domain.name.dlink.com.bootps > 255.255.255.255.bootpc: BOOTP/DHCP, Reply, length 548
20:56:52.949466 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from b8:27:eb:f8:ce:34 (oui Unknown), length 320
20:56:52.952963 IP domain.name.dlink.com.bootps > 255.255.255.255.bootpc: BOOTP/DHCP, Reply, length 548
20:56:54.356403 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from b8:27:eb:f8:ce:34 (oui Unknown), length 320
20:56:54.357205 IP domain.name.dlink.com.bootps > 255.255.255.255.bootpc: BOOTP/DHCP, Reply, length 548
20:56:56.365508 IP 192.168.0.11.bootps > 255.255.255.255.bootpc: BOOTP/DHCP, Reply, length 317
20:56:56.365990 IP 192.168.0.55.49152 > 192.168.0.11.tftp:  21 RRQ "bootcode.bin" octet
20:56:56.398538 IP 192.168.0.55.49152 > 192.168.0.11.tftp:  20 RRQ "bootsig.bin" octet
20:56:58.151047 IP 192.168.0.11.bootps > 255.255.255.255.bootpc: BOOTP/DHCP, Reply, length 317
20:56:59.219859 IP 192.168.0.55.49154 > 192.168.0.11.tftp:  29 RRQ "autoboot.txt" octet tsize 0
20:57:00.154023 IP 192.168.0.11.bootps > 255.255.255.255.bootpc: BOOTP/DHCP, Reply, length 317
20:57:01.154462 IP 192.168.0.55.49155 > 192.168.0.11.tftp:  27 RRQ "config.txt" octet tsize 0
20:57:02.962337 IP 192.168.0.55.49156 > 192.168.0.11.tftp:  29 RRQ "recovery.elf" octet tsize 0
20:57:03.962358 IP 192.168.0.55.49157 > 192.168.0.11.tftp:  26 RRQ "start.elf" octet tsize 0
20:57:05.389190 IP 192.168.0.55.49158 > 192.168.0.11.tftp:  26 RRQ "fixup.dat" octet tsize 0

DNSMASQ logs

Feb 22 20:56:51 sunils-pc dnsmasq-dhcp[1163]: 653460281 available DHCP subnet: 192.168.0.255/255.255.255.0
Feb 22 20:56:51 sunils-pc dnsmasq-dhcp[1163]: 653460281 vendor class: PXEClient:Arch:00000:UNDI:002001
Feb 22 20:56:51 sunils-pc dnsmasq-dhcp[1163]: 653460281 PXE(br0) b8:27:eb:f8:ce:34 proxy
Feb 22 20:56:51 sunils-pc dnsmasq-dhcp[1163]: 653460281 tags: br0
Feb 22 20:56:51 sunils-pc dnsmasq-dhcp[1163]: 653460281 reply delay: 5
Feb 22 20:56:56 sunils-pc dnsmasq-dhcp[1163]: 653460281 bootfile name: bootcode.bin
Feb 22 20:56:56 sunils-pc dnsmasq-dhcp[1163]: 653460281 broadcast response
Feb 22 20:56:56 sunils-pc dnsmasq-dhcp[1163]: 653460281 sent size:  1 option: 53 message-type  2
Feb 22 20:56:56 sunils-pc dnsmasq-dhcp[1163]: 653460281 sent size:  4 option: 54 server-identifier  192.168.0.11
Feb 22 20:56:56 sunils-pc dnsmasq-dhcp[1163]: 653460281 sent size:  9 option: 60 vendor-class  50:58:45:43:6c:69:65:6e:74
Feb 22 20:56:56 sunils-pc dnsmasq-dhcp[1163]: 653460281 sent size: 17 option: 97 client-machine-id  00:44:44:44:44:44:44:44:44:44:44:44:44:44...
Feb 22 20:56:56 sunils-pc dnsmasq-dhcp[1163]: 653460281 sent size: 35 option: 43 vendor-encap  06:01:03:0a:04:00:50:58:45:09:17:00:00:14...
Feb 22 20:56:56 sunils-pc dnsmasq-dhcp[1163]: 653460281 available DHCP subnet: 192.168.0.255/255.255.255.0
Feb 22 20:56:56 sunils-pc dnsmasq-dhcp[1163]: 653460281 vendor class: PXEClient:Arch:00000:UNDI:002001
Feb 22 20:56:56 sunils-pc dnsmasq-dhcp[1163]: 653460281 PXE(br0) b8:27:eb:f8:ce:34 proxy
Feb 22 20:56:56 sunils-pc dnsmasq-dhcp[1163]: 653460281 tags: br0
Feb 22 20:56:56 sunils-pc dnsmasq-dhcp[1163]: 653460281 reply delay: 5
Feb 22 20:56:56 sunils-pc dnsmasq-tftp[1163]: file /tftpboot/bootsig.bin not found
Feb 22 20:56:56 sunils-pc dnsmasq-tftp[1163]: sent /tftpboot/bootcode.bin to 192.168.0.55
Feb 22 20:56:58 sunils-pc dnsmasq-dhcp[1163]: 653460281 bootfile name: bootcode.bin
Feb 22 20:56:58 sunils-pc dnsmasq-dhcp[1163]: 653460281 broadcast response
Feb 22 20:56:58 sunils-pc dnsmasq-dhcp[1163]: 653460281 sent size:  1 option: 53 message-type  2
Feb 22 20:56:58 sunils-pc dnsmasq-dhcp[1163]: 653460281 sent size:  4 option: 54 server-identifier  192.168.0.11
Feb 22 20:56:58 sunils-pc dnsmasq-dhcp[1163]: 653460281 sent size:  9 option: 60 vendor-class  50:58:45:43:6c:69:65:6e:74
Feb 22 20:56:58 sunils-pc dnsmasq-dhcp[1163]: 653460281 sent size: 17 option: 97 client-machine-id  00:44:44:44:44:44:44:44:44:44:44:44:44:44...
Feb 22 20:56:58 sunils-pc dnsmasq-dhcp[1163]: 653460281 sent size: 35 option: 43 vendor-encap  06:01:03:0a:04:00:50:58:45:09:17:00:00:14...
Feb 22 20:56:58 sunils-pc dnsmasq-dhcp[1163]: 653460281 available DHCP subnet: 192.168.0.255/255.255.255.0
Feb 22 20:56:58 sunils-pc dnsmasq-dhcp[1163]: 653460281 vendor class: PXEClient:Arch:00000:UNDI:002001
Feb 22 20:56:58 sunils-pc dnsmasq-dhcp[1163]: 653460281 PXE(br0) b8:27:eb:f8:ce:34 proxy
Feb 22 20:56:58 sunils-pc dnsmasq-dhcp[1163]: 653460281 tags: br0
Feb 22 20:56:58 sunils-pc dnsmasq-dhcp[1163]: 653460281 reply delay: 5
Feb 22 20:57:00 sunils-pc dnsmasq-dhcp[1163]: 653460281 bootfile name: bootcode.bin
Feb 22 20:57:00 sunils-pc dnsmasq-dhcp[1163]: 653460281 broadcast response
Feb 22 20:57:00 sunils-pc dnsmasq-dhcp[1163]: 653460281 sent size:  1 option: 53 message-type  2
Feb 22 20:57:00 sunils-pc dnsmasq-dhcp[1163]: 653460281 sent size:  4 option: 54 server-identifier  192.168.0.11
Feb 22 20:57:00 sunils-pc dnsmasq-dhcp[1163]: 653460281 sent size:  9 option: 60 vendor-class  50:58:45:43:6c:69:65:6e:74
Feb 22 20:57:00 sunils-pc dnsmasq-dhcp[1163]: 653460281 sent size: 17 option: 97 client-machine-id  00:44:44:44:44:44:44:44:44:44:44:44:44:44...
Feb 22 20:57:00 sunils-pc dnsmasq-dhcp[1163]: 653460281 sent size: 35 option: 43 vendor-encap  06:01:03:0a:04:00:50:58:45:09:17:00:00:14...

I already tried replacing bootcode.bin from next branch. Any help is much appreciated

Raspberry pi version: Raspberry PI 3 Model B v1.2

  • @jsotola raspberry pi 3 – Xinus Feb 19 at 0:27
  • @jsotola Raspberry pi 3 Model B v1.2 to be specific – Xinus Feb 19 at 7:06
  • you have not updated the post ... do not put additional information into comments – jsotola Feb 19 at 7:14

Your Answer

 
discard

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.