Some Linux distributions have kernel.sysrq=16
which means only SysRq + s (sync) is allowed. As an example: Fedora (25 and 28) has it set as such in /usr/lib/sysctl.d/50-default.conf
I had to create a file as /etc/sysctl.d/95-sysrq.conf
where I manually set kernel.sysrq=1
so it's available as soon as possible (but possibly not soon enough depending on situation):
$ grep -nHi sysrq /usr/lib/sysctl.d/* /etc/sysctl.d/*
/usr/lib/sysctl.d/50-default.conf:16:# Use kernel.sysrq = 1 to allow all keys.
/usr/lib/sysctl.d/50-default.conf:17:# See http://fedoraproject.org/wiki/QA/Sysrq for a list of values and keys.
/usr/lib/sysctl.d/50-default.conf:18:kernel.sysrq = 16
/etc/sysctl.d/95-sysrq.conf:1:kernel.sysrq=1
Is there a way to enable Sysrq from early boot, possibly also ignoring any setting for kernel.sysrq
?, for example adding a kernel boot parameter (e.g., cat /proc/cmdline
for current ones) such as from the Grub boot menu (or in xen.cfg
's kernel=
line).