Sunday, December 22, 2013

Linux, reboot --force

If you cannot reboot your system (e.g. cannot umount some device due to its malfunction or network loss during work with remote hard drive) use Magic SysRq key
The magic SysRq key is a key combination understood by the Linux kernel, which allows the user to perform various low level commands regardless of the system's state.
Kernel must have been compiled with CONFIG_MAGIC_SYSRQ
cat /boot/config-`uname -r` | grep CONFIG_MAGIC_SYSRQ
CONFIG_MAGIC_SYSRQ=y
To actually reboot
echo 1 > /proc/sys/kernel/sysrq
echo b > /proc/sysrq-trigger

No comments:

Post a Comment