Siduction Forum
Siduction Forum => Software - Support => Topic started by: sunrat on 2019/03/11, 01:45:31
-
I haven't had to do an emergency shutdown/reboot on my siduction system for as long as I can remember, but a post in another forum (MX) got me to check its status out of curiosity:
$ cat /proc/sys/kernel/sysrq
0
which is disabled. Is that default in siduction or have I changed it somehow?
-
it should be default - one can change it. Thank you for pointing to it, i was about to enable the recommend setting by default but are not sure if i really implement it for the next release, anyway, it would be nice to have.
On my system
% cat /proc/sys/kernel/sysrq
1
EDIT:
Kernel documentation: https://www.mjmwired.net/kernel/Documentation/sysrq.txt
my /etc/sysctl.conf
###################################################################
# Magic system request Key
# 0=disable, 1=enable all, >1 bitmask of sysrq functions
# See https://www.kernel.org/doc/html/latest/admin-guide/sysrq.html
# for what other values do
#kernel.sysrq=438
# ^^^ default
###################################################################
# Alf seine Settings
###################################################################
# 64 = 0x40 - enable signalling of processes (term, kill, oom-kill)
# 128 = 0x80 - allow reboot/poweroff
# 256 = 0x100 - allow nicing of all RT tasks
kernel.sysrq=438
# swappiness 0 was a bad idea times ago
vm.swappiness=5
As i'm not eager to patch default debian files i out it into sysctl.d
cat x01-sysrequest.conf
#
# /etc/sysctl.conf - Configuration file for setting system variables
# See /etc/sysctl.d/ for additional system variables.
# See sysctl.conf (5) for information.
#
###################################################################
# Magic system request Key
# 0=disable, 1=enable all
# Debian kernels have this set to 0 (disable the key)
# See https://www.kernel.org/doc/Documentation/sysrq.txt
# for what other values do
kernel.sysrq=1
I guess i should put the modified file with mask 438 into our default configuration for the next release - the 438 is a mask that don't allow the most destructive things and is recommended in common ;)
-
Interesting. I note that 438 disables the E and I of the commonly recommended REISUB sequence. An interesting answer at StackExchange proposes that only the U and B of that sequence are essential to reboot cleanly anyway, and that U executes the function of S initially making it redundant.
https://unix.stackexchange.com/questions/106094/how-long-should-i-wait-between-keystrokes-when-doing-sysrq-reisub (https://unix.stackexchange.com/questions/106094/how-long-should-i-wait-between-keystrokes-when-doing-sysrq-reisubInteresting) Interesting contentions and discussion. It seems 438 would be fine.
This article explains the bitmask clearly:
https://superuser.com/questions/375816/how-to-check-which-sysrq-functions-are-enabled (https://superuser.com/questions/375816/how-to-check-which-sysrq-functions-are-enabled)