Tuesday, March 02, 2021

REISUB - for restarting linux machines which are unresponsive

From http://blog.kember.net/articles/reisub-the-gentle-linux-restart/

https://en.wikipedia.org/wiki/Magic_SysRq_key
says that on linux mint, it is Ctrl Alt PrtScr, and then - slowly - 

Alt + REISUO to shut down, REISUB to reboot.

  • Switch from RAW to XLATE
  • Send Sigterm
  • Send Sigkill
  • Sync all mounted filesystems
  • remount in read-only
  • Shutdown.

Running Linux Mint 20 on a Lenovo B460 laptop, on hitting Ctrl Alt F2 and seeing the 2nd terminal, 
R
E
I
show "This SysReq is disabled."

has details on the bitmask etc. 

cat /proc/sys/kernel/sysrq

"0 - disable every SysRq function.
1 - enable every SysRq function.
2 - enable control of console logging level
4 - enable control of keyboard (SAK, unraw)
8 - enable debugging dumps of processes etc.
16 - enable sync command
32 - enable remount read-only
64 - enable signalling of processes (term, kill, oom-kill)
128 - allow reboot/poweroff
256 - allow nicing of all RT tasks
438 = 2 + 4 + 16 + 32 + 128 + 256, so only the functions associated with those numbers are allowed. Read all about it in the documentation."

No comments:

Post a Comment