Home » Interclypse Blog » Post
In the case when a system is inoperable or hung and needs to be rebooted you can use the Magic Sysrq key sequence from the system console. The only downside of this is that it must be activated before it can be accessed. To activate sysrq run the following command and add kernel.sysrq = 1 to /etc/sysctl.conf.
# sysctl -w kernel.sysrq=0
Now you can force a reboot using Sysrq:
- NOTE: The Sysrq key is the Prt Scr key
- Hit alt-sysrq-s. This will attempt to sync your mounted file systems so that changes to files get flushed to disk. You may hear or see disk activity. If you are looking at the console, the system should print the devices which were flushed.
- A few seconds later, hit alt-Sysrq-u. This will attempt to remount all your mounted file systems as read-only. You may hear or see disk activity. If you are looking at the console, the system should print the devices which were remounted.
- A few seconds later, use the alt-Sysrq-b to reboot the system