Sample Header Ad - 728x90

How to ensure SysRq is always enabled regardless of the kernel.sysrq setting?

6 votes
1 answer
5630 views
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).
Asked by user306023
Sep 7, 2018, 01:55 AM
Last activity: Jul 13, 2023, 04:40 PM