shermand100 / PiNodeXMR

Monero Node for Single Board Computers with Web Interface and additional tools pre-configured. Self Installing.
GNU General Public License v3.0
213 stars 41 forks source link

Possible permissions issue in scripts #23

Closed ChiefGyk3D closed 3 years ago

ChiefGyk3D commented 3 years ago

While working on Pull Request #22 I noticed the commands sudo sed -i '3d' /etc/fstab and sudo sed "2 a UUID=<string> /media/xmrblockchain udf noexec,defaults 0 2" -i /etc/fstab would not work direct from script which may be the source of earlier issues I also had with USB persistence. Not sure how to address this one personally. May need you recheck some scripts for the elevation requests @shermand100

ChiefGyk3D commented 3 years ago

seems original author also had some issues with running as sudo. Also looks like $SUDO may have needed to be used in script but that still didn't resolve anything

shermand100 commented 3 years ago

Since looking into this I've noticed that the mount command has been unreliable across hardware. Some devices it mounts, some it doesn't and I haven't put my finger on it yet. However I've had no issue (even with a cheap SSD that has the emulated 4k block size) of auto mounting on re-boot.

I've added that after the USB storage setup is completed a reboot is performed as a simple optimisation.

https://github.com/monero-ecosystem/PiNode-XMR/commit/7a6dc327d40887b2e833b0a7a287cfb328684e0b Raspbian format-udf script

https://github.com/monero-ecosystem/PiNode-XMR/commit/f5b75dce04f38f51274ebfb37c597b6d4006ea6b Raspbian setup-usb script

https://github.com/monero-ecosystem/PiNode-XMR/commit/a3563d73f965716a8dd8340b54147050d4fec22d Armbian combined edit of format-udf and setup-usb script

shermand100 commented 3 years ago

Additionally 'nofail' has been added to the mount command. This allows 90 seconds for device power up and mounting before continuing with boot. https://github.com/monero-ecosystem/PiNode-XMR/commit/afd87e94103c14ad257df297e1c03db2c2022226

And also the now well known issues with USB adaptors and Pi 4 performance with UAS will help diagnose USB data errors/freezing/failed mounts.

Closing this issue for now as systems are behaving as expected. Can re-open if a pattern of symptoms develop in future.