From e3299fcb3bdd6ec7cf42c5f1c619e3be28bc3386 Mon Sep 17 00:00:00 2001 From: Aaron Ball Date: Wed, 20 Jan 2021 19:15:09 -0700 Subject: Some tweaks to linux manual restart with sysrq trigger --- posts/linux:manual_restart_with_sysrq-trigger.rst | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/posts/linux:manual_restart_with_sysrq-trigger.rst b/posts/linux:manual_restart_with_sysrq-trigger.rst index 6923536..cead23f 100644 --- a/posts/linux:manual_restart_with_sysrq-trigger.rst +++ b/posts/linux:manual_restart_with_sysrq-trigger.rst @@ -32,18 +32,18 @@ within a terminal emulator. That said, execute the following command to find out all of the options available to you from sysrq. -:: +.. code-block:: sh - # echo h > /proc/sysrq-trigger + echo h > /proc/sysrq-trigger If you don't see output from that, either sysrq isn't enabled, or you aren't executing from within a tty. To check if it is enabled, ensure that the following command yields a ``1``. -:: +.. code-block:: sh - # cat /proc/sys/kernel/sysrq + cat /proc/sys/kernel/sysrq @@ -65,29 +65,28 @@ possible. Here is the list of commands that should be sent to sysrq-trigger, in order, for both a shutdown and a reboot. -* ``echo r > /proc/sysrq-trigger``: (un**R**aw) Takes back control of keyboard +* ``echo r > /proc/sysrq-trigger``: (unRaw) Takes back control of keyboard from X -* ``echo e > /proc/sysrq-trigger``: (t**E**rminate) Send SIGTERM to all +* ``echo e > /proc/sysrq-trigger``: (tErminate) Send SIGTERM to all processes. If you aren't familiar with process signals, this is basically a friendly kill command for every process. -* ``echo i > /proc/sysrq-trigger``: (k**I**ll) Send SIGKILL to all processes. +* ``echo i > /proc/sysrq-trigger``: (kIll) Send SIGKILL to all processes. If you aren't familiar with process signals, this is basically a kill -9 command for every remaining process. -* ``echo s > /proc/sysrq-trigger``: (**S**nc) Sync all cached disk operations - to disk +* ``echo s > /proc/sysrq-trigger``: Sync all cached disk operations to disk -* ``echo u > /proc/sysrq-trigger``: (**U**mount) Umounts all mounted partitions +* ``echo u > /proc/sysrq-trigger``: (Umount) Umounts all mounted partitions The previous commands all get us to a ready to shutdown or reboot state. To shutdown or reboot, execute one of the following. -``echo o > /proc/sysrq-trigger``: (p**O**weroff) Powers off the system +``echo o > /proc/sysrq-trigger``: (pOweroff) Powers off the system -``echo b > /proc/sysrq-trigger``: (re**B**oot) Reboots the system +``echo b > /proc/sysrq-trigger``: (reBoot) Reboots the system The entire list in order, using the reboot command... -- cgit v1.2.3