Vindieselwalker Posted May 1, 2019 Posted May 1, 2019 Anybody know a way to reset board (OPI PC) immediatly not going through shutdown process? I'm already logged in (ssh session). I've overwritten SD card by mistake, whole fs has gone, and I cant perform reboot or shutdown command (not found)
JMCC Posted May 1, 2019 Posted May 1, 2019 If you overwrote your SD card by mistake, the only solution is to power off the system and re-flash it. You will need physical access to the board for that, of course.
JMCC Posted May 1, 2019 Posted May 1, 2019 But, just for the records, provided that you have root access, you can hard reboot a board running Armbian by issuing echo b > /proc/sysrq-trigger
windysea Posted May 1, 2019 Posted May 1, 2019 Beware that 'b' will literally trigger an immediate reboot without even attempting to sync the disks. That is possible, and even likely in some cases, to cause corruption. For the OP case this would not be an issue since it looks like the root filesystem is already trashed, though perhaps there may have been others? A sync may be triggered similarly, however, just before the reboot: root@host# echo s > /proc/sysirq-trigger root@host# echo b > /proc/sysirq-trigger The 's' can also be handy when /bin/sync is also missing, to help prevent corruption on additional filesystems that may be mounted when faced with forced poweroff/reboot. For the OP: If your disk is already overwritten then simply removing and re-applying power should not be an issue, unless you don't have physical access. If /bin/systemctl exists (it sounds like it may not here), you can try 'systemctl reboot --force'. That is the "modern" systemd replacement for 'reboot -f' Otherwise the step noted above using /proc/sysirq-trigger would be the next option, followed by just pulling the power. 1
Recommended Posts