echo 1 > /proc/sys/kernel/sysrq
echo b > /proc/sysrq-trigger echo 1 > /proc/sys/kernel/sysrq
echo b > /proc/sysrq-triggerHow could that happen and leave your system in a state where it is still accessible and can be fixed by a reboot?
If you think you might face that kind of trouble you should keep a copy of Busybox and whatever other tools you might need on a RAM drive. You'd have an opportunity to figure out if rebooting would lead to a usable system.
There was a problem with the card or the driver as every so often something would go wrong and everything would stop responding again. The shell I left open revealed almost nothing as the root drive was gone, but it could be used to reboot the machine (thanks to the trick above), which would then be good again for another few days.
I now have / on a proper SSD...
Yes, it's exactly like pulling and replugging, which was exactly what I needed!
--edit-- is sync even a bash builtin? Looks like it's /bin/sync on my systems. / had been lost (it was on a usb stick on an internal header on an unreliable usb3 card, I later found out.)
--edit 2-- if you meant also echoing s to the sysrq-trigger, it seemed to kill the session