Page 1 of 1

netboot works but reboot doesn't

Posted: Wed Mar 21, 2018 11:33 pm
by JohnFH
I've recently got the new Raspberry Pi 3 Model B+ and I've managed to get netboot working but with the annoying exception that on reboot it fails to come back up. I have dnsmasq configured to assign an IP address and to be the TFTP server and it works consistently from a cold boot state, ie. pull the power cable and re-insert it - works every time. When I login via ssh and do a reboot it fails every time. This is what is in syslog when it fails:

Code: Select all

Mar 21 08:59:13 nas1 dnsmasq-dhcp[11949]:  653460281 available DHCP subnet: 192.168.1.255/255.255.255.0                                                                                                              
Mar 21 08:59:13 nas1 dnsmasq-dhcp[11949]:  653460281 vendor class: PXEClient:Arch:00000:UNDI:002001                                                                                                                  
Mar 21 08:59:13 nas1 dnsmasq-dhcp[11949]:  653460281 DHCPDISCOVER(br0) b8:27:eb:12:45:bf                                                                                                                             
Mar 21 08:59:13 nas1 dnsmasq-dhcp[11949]:  653460281 tags: known, br0                                                                                                                                                
Mar 21 08:59:13 nas1 dnsmasq-dhcp[11949]:  653460281 DHCPOFFER(br0) 192.168.1.26 b8:27:eb:12:45:bf                                    
Mar 21 08:59:13 nas1 dnsmasq-dhcp[11949]:  653460281 requested options: 43:vendor-encap, 60:vendor-class, 67:bootfile-name,                                             
Mar 21 08:59:13 nas1 dnsmasq-dhcp[11949]:  653460281 requested options: 128, 129, 130, 131, 132, 133, 134, 135, 66:tftp-server,
Mar 21 08:59:13 nas1 dnsmasq-dhcp[11949]:  653460281 requested options: 1:netmask, 3:router                                                  
Mar 21 08:59:13 nas1 dnsmasq-dhcp[11949]:  653460281 next server: 192.168.1.10                                                          
Mar 21 08:59:13 nas1 dnsmasq-dhcp[11949]:  653460281 sent size:  1 option: 53 message-type  2                                                                                                                        
Mar 21 08:59:13 nas1 dnsmasq-dhcp[11949]:  653460281 sent size:  4 option: 54 server-identifier  192.168.1.10                           
Mar 21 08:59:13 nas1 dnsmasq-dhcp[11949]:  653460281 sent size:  4 option: 51 lease-time  infinite   
Mar 21 08:59:13 nas1 dnsmasq-dhcp[11949]:  653460281 sent size:  4 option:  1 netmask  255.255.255.0
Mar 21 08:59:13 nas1 dnsmasq-dhcp[11949]:  653460281 sent size:  4 option: 28 broadcast  192.168.1.255                
Mar 21 08:59:13 nas1 dnsmasq-dhcp[11949]:  653460281 sent size:  4 option:  3 router  192.168.1.10
Mar 21 08:59:13 nas1 dnsmasq-dhcp[11949]:  653460281 sent size:  9 option: 60 vendor-class  50:58:45:43:6c:69:65:6e:74
Mar 21 08:59:13 nas1 dnsmasq-dhcp[11949]:  653460281 sent size: 17 option: 97 client-machine-id  00:...            
Mar 21 08:59:13 nas1 dnsmasq-dhcp[11949]:  653460281 sent size: 32 option: 43 vendor-encap  06:01:03:0a:04:00:50:58:45:09:14:00:00:11...
Mar 21 08:59:13 nas1 dnsmasq-tftp[11949]:  sent /media/TFTP/jupiter/boot/bootcode.bin to 192.168.1.26
Mar 21 08:59:13 nas1 dnsmasq-tftp[11949]:  file /media/TFTP/jupiter/boot/bootsig.bin not found                                                                                                                       
Mar 21 08:59:13 nas1 dnsmasq-tftp[11949]:  file /media/TFTP/jupiter/boot/a21245bf/start.elf not found
and there it stops. So the bootcode.bin is requested then sent by the TFTP server and then nothing else happens.

All my questions are related to this behaviour:
  1. As an ugly workaround, is there a way to simulate a cold boot from the command line? I assume this is entirely safe anyway since there's no SD card in sight?
  2. Since the bootcode.bin is the same file that is used on each successful cold boot what is different on a reboot? Or could it be that it isn't received? I can tell it has been sent and therefore requested but can I assume that it has been received?

My dnsmasq configuration (I'm offering a static address although I don't need to as I've tried DHCP, proxy, etc.), all with the same behaviour:

Code: Select all

port=0
dhcp-host=b8:27:eb:xx:xx:xx,192.168.1.26,jupiter,infinite
dhcp-range=192.168.1.255,static
dhcp-ignore=tag:!known
log-dhcp
enable-tftp
tftp-root=/media/TFTP/jupiter/boot
pxe-service=0,"Raspberry Pi Boot"

Re: netboot works but reboot doesn't

Posted: Thu Mar 22, 2018 1:48 pm
by epoch1970
Mhh.
Have you tried various flavors of "reboot": reboot, shutdown -r now, systemctl whatever...
If you're using watchdog, you could check if it can reboot the machine successfully.

Re: netboot works but reboot doesn't

Posted: Thu Mar 22, 2018 8:19 pm
by JohnFH
Yes I've tried shutdown -r , etc. but with the same behaviour. I just don't get it because there shouldn't be any difference in behaviour at that stage between a cold boot and a reboot.

Re: netboot works but reboot doesn't

Posted: Fri Mar 23, 2018 5:27 pm
by ShiftPlusOne
We've noticed this as well and it's on the list of things too look into. Although it wouldn't hurt to report it on github as well so that it doesn't get lost.

Re: netboot works but reboot doesn't

Posted: Mon Mar 26, 2018 1:35 pm
by jeromecandau
Hi everybody ! I have exactly the same problem... The only way to restart de RPi3B+ after netbooting is to power off/on. I'm using the last version of raspbian stretch lite where I picked the files. Except this, booting on tftp/nfs server without uSD card works well and is very usefull. With RPi-B+, RPi2 and even RPi3 I'd have to put an SD card with bootcode.bin.

Re: netboot works but reboot doesn't

Posted: Mon Mar 26, 2018 2:21 pm
by jeromecandau
Hi again... same problem : cold boot on RPi3B+ is OK. After reboot command (or shutdown -r now), the Pi tries to boot : it loads the bootcode.bin file but, after that, don't read the first block that the tftp server sends to him for start.elf file (the query for start.elf is OK and the RPi acknowledges the "tsize" response) . So after five retry from tftp server, the Pi freezes and the green led blinks with 3 flashes... It would be great to solve this issue to be able to make "hot reboot" because powering off/on is not always possible... thanks

Re: netboot works but reboot doesn't

Posted: Thu Apr 19, 2018 1:23 pm
by Danara
I'm not even getting that far with the 3b+

With a rpi 3, it boots and reboots from the piserver every time.

Using the same setup, a 3b+ gives me nothing but red led + 4 green led flashes.

The piserver sees the 3b+ mac address (which was added in piserver), but nothing else seems to work on the 3b+

Any suggestions?

Re: netboot works but reboot doesn't

Posted: Sun Apr 22, 2018 4:52 am
by rprr
Danara --

Have you tried netbooting with an SD card with just bootcode.bin on it?

I am having similar problems both with Pi 3B and 3B+, netbooting fails to happen a majority of the time. The behaviour seems to depend to some extent on the network hardware in between the piserver and the client pis. But if I put an SD card on the pi with just bootcode.bin, it works every single time. This is certainly an annoying issue. Wish there was a fix?