I have a full working PXE server and multiple Raspberry Pi 3b+ running on read only.
My problem come from an issue we can face anytime, a connection loss.
If we lose connection with the NFS server, the Raspberry Pi will lose its root directory. So it can't run anything and will only react with RAM loaded applications.
We tried a script witch found the connection lost, write a log but can't launch "reboot" command.
We tried to put echo b > /proc/sysrq-trigger
but we need and root authorisation and crontab script and so one always ask for password.
We also tried to put a line on rc.local
but, the process is killed after a while.
This project is an automatic booting kiosk which got no input at all.
while true; do if tail /var/log/messages | grep 'server 10.10.52.3 not responding'; then echo b > /proc/sysrq-trigger; fi; done;
We don't want to ping anything or surcharge Raspberry Pi. The monitoring is already heavy and we got GPIO reader too.