Force Reboot Linux Remotely

I have a cubieboard set up at a friend’s house as a VPN and a backup target. I went to SSH into it the other day and found that almost every command I entered returned “Input/output error”. So I did the obvious and attempted a reboot, however both commands “reboot” and “init 6” returned “Segmentation fault” and did nothing. So I set out to find the most generic way to force reboot any linux distro regardless of systemd, kernel version or any other variable, and I found it! The method reminded me a lot of ALT + SysRq + REISUB only not as gentle considering the only signal it sends is a reboot. Maybe it can be modified to include the REIS & U, but here is the command I used in case someone else out there is in a hurry to get back online without concern for a safe shutdown!

echo 1 > /proc/sys/kernel/sysrq
echo b > /proc/sysrq-trigger

Leave a Reply

Your email address will not be published. Required fields are marked *