andig2
Posts: 51
Joined: Wed Oct 31, 2012 9:34 pm

[help] Raspi3 fails to boot from network

Sat Aug 26, 2017 12:18 pm

I've received a new raspi3 that I'm trying to prepare for network boot following https://www.raspberrypi.org/documentati ... utorial.md. Client config has been completed, so has server config.

Upon booting, I can see the raspi's request:

Code: Select all

[email protected]:~ $ sudo tcpdump -i eth0 port bootpc
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes
14:23:22.075517 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 80:1f:02:a1:92:5e (oui Unknown), length 300
14:23:22.078019 IP fritz.box.bootps > 255.255.255.255.bootpc: BOOTP/DHCP, Reply, length 548
and

Code: Select all

tail -F /var/log/daemon.log

Aug 26 13:24:14 keller dhcpcd[1390]: eth0: Router Advertisement from fe80::....
Aug 26 13:27:40 keller dhcpcd[1390]: eth0: Router Advertisement from fe80::....
Aug 26 13:32:15 keller dhcpcd[1390]: eth0: Router Advertisement from fe80::....
Aug 26 13:32:44 keller dnsmasq-dhcp[556]: 653460281 available DHCP subnet: 192.168.0.255/255.255.255.0
Aug 26 13:32:44 keller dnsmasq-dhcp[556]: 653460281 vendor class: PXEClient:Arch:00000:UNDI:002001
Aug 26 13:32:44 keller dnsmasq-dhcp[556]: 653460281 PXE(eth0) b8:27:eb:9d:c1:5a proxy
Aug 26 13:32:44 keller dnsmasq-dhcp[556]: 653460281 tags: eth0
Aug 26 13:32:44 keller dnsmasq-dhcp[556]: 653460281 broadcast response
Aug 26 13:32:44 keller dnsmasq-dhcp[556]: 653460281 sent size:  1 option: 53 message-type  2
Aug 26 13:32:44 keller dnsmasq-dhcp[556]: 653460281 sent size:  4 option: 54 server-identifier  192.168.0.48
Aug 26 13:32:44 keller dnsmasq-dhcp[556]: 653460281 sent size:  9 option: 60 vendor-class  50:58:45:43:6c:69:65:6e:74
Aug 26 13:32:44 keller dnsmasq-dhcp[556]: 653460281 sent size: 17 option: 97 client-machine-id  00:44:44:44:44:44:44:44:44:44:44:44:44:44...
Aug 26 13:32:44 keller dnsmasq-dhcp[556]: 653460281 sent size: 32 option: 43 vendor-encap  06:01:03:0a:04:00:50:58:45:09:14:00:00:11...
This repeats for some time then stops. The raspi does not ask for `bootcode`.

Two things may be special for my setup:

a) A fritzbox router is alrady serving DHCP in the local network and needs to continue doing so.
b) Instead of using debian networking on the server I've kept DHCP as the server already re-obtains its IP.

Any idea why the raspi3 is not asking for its boot files (of course with SD removed)?

Thanks,
Andreas

andig2
Posts: 51
Joined: Wed Oct 31, 2012 9:34 pm

Re: [help] Raspi3 fails to boot from network

Sat Sep 02, 2017 10:52 am

For anybody coming here I've opened two issues:

https://github.com/raspberrypi/firmware/issues/862 for Raspi not connecting to TFTP without SD card and
https://github.com/raspberrypi/firmware/issues/863 for Raspi not able to mount root filesystem over NFS

The latter- not mentioned in the tutorial- can be fixed by adding `,vers=3` to the mount option. Problem seems to be that Raspbian stretch no longer supports NFSv2, though this change is not documented.

I got my raspi booting now but only if SD card contains `BOOTCODE.BIN`.

Still looking for true network boot via firmware. :geek:

Hope this helps,
Andreas

beta-tester
Posts: 1236
Joined: Fri Jan 04, 2013 1:57 pm
Location: de_DE

Re: [help] Raspi3 fails to boot from network

Sat Sep 02, 2017 1:58 pm

is your client RPi3 set up for network booting?
if not, the RPi3 does not request any file from network automatically.
what do you get, when you execute the folowing command on the client RPi3:

Code: Select all

[email protected]:~$ vcgencmd otp_dump | grep 17:
17:3020000a
did you followed that part of the instructions, to enable the client for network booting:
Client configuration
Before a Raspberry Pi will network boot, it needs to be booted from an SD card with a config option to enable USB boot mode. This will set a bit in the OTP (One Time Programmable) memory in the Raspberry Pi SoC that enables network booting. Once this is done, the SD card is no longer required.
Install Raspbian Lite (or Raspbian with PIXEL) on the SD card in the normal way See here.
Program USB Boot Mode
First, prepare the /boot directory with the latest boot files:

Code: Select all

sudo apt-get update && sudo apt-get upgrade
Now, enable USB boot mode with the following command:

Code: Select all

echo program_usb_boot_mode=1 | sudo tee -a /boot/config.txt
This adds program_usb_boot_mode=1 to the end of /boot/config.txt. Reboot the Raspberry Pi with sudo reboot. Once the client Raspberry Pi has rebooted, check that the OTP is has been programmed with:

Code: Select all

$ vcgencmd otp_dump | grep 17:
17:3020000a
Ensure the output 0x3020000a is correct.
The client configuration is almost done. The final thing to do is to remove the program_usb_boot_mode line from config.txt (make sure there is no blank line at the end). You can do this with sudo nano /boot/config.txt, for example. Finally, shut the client Raspberry Pi down with sudo poweroff.
{ I only give negative feedback }
RPi Model B (rev1, 256MB) & B (rev2, 512MB) & B+, RPi2B, RPi3B, RPi3B+, RPiZeroW, ...

Return to “Troubleshooting”