Found: <https://gist.github.com/bijanebrahi...how-to-panic-on-demand-when-system-is-freezed>
The head of my /usr/share/syscons/keymaps/uk.iso.kbd:
The manual page for kbdmap(1) is emphatic – Use the ISO standard version if available! – however when I run
– a map file for which does not exist:
The manual page for keymap(5) suggests
From the manual page for vt(4) I see that I can also
I can
I can panic on demand, using the key chord, with
How can I avoid the need to manually use kbdcontrol(1)?
Is kbdmap bugged?
<https://www.freebsd.org/cgi/man.cgi?query=kbdcontrol&sektion=1&manpath=FreeBSD+13.0-RELEASE>
<https://www.freebsd.org/cgi/man.cgi?query=kbdmap&sektion=1&manpath=FreeBSD+13.0-RELEASE>
<https://www.freebsd.org/cgi/man.cgi?query=keymap&sektion=5&manpath=FreeBSD+13.0-RELEASE>
<https://www.freebsd.org/cgi/man.cgi?query=vt&sektion=4&manpath=FreeBSD+13.0-RELEASE>
Notes to self
<https://cgit.freebsd.org/src/commit/?id=43d7128c1450d36af259094b7cf39c0c4d17908c>
Debugging FreeBSD Kernel · GitHub ▶ How to panic on-demand when system is freezed
The head of my /usr/share/syscons/keymaps/uk.iso.kbd:
Code:
# $FreeBSD$
# alt
# scan cntrl alt alt cntrl lock
# code base shift cntrl shift alt shift cntrl shift state
# ------------------------------------------------------------------
000 nop nop nop nop nop nop nop nop O
001 esc boot esc esc esc esc debug panic O
The manual page for kbdmap(1) is emphatic – Use the ISO standard version if available! – however when I run
kbdmap -d
there's no ISO variant for the UK, the closest I can find in the list is simply United Kingdom, which results in:keymap="uk.kbd"
– a map file for which does not exist:
Code:
% file /usr/share/syscons/keymaps/uk.kbd
/usr/share/syscons/keymaps/uk.kbd: cannot open `/usr/share/syscons/keymaps/uk.kbd' (No such file or directory)
% ls -l /usr/share/syscons/keymaps/uk* | sort
-r--r--r-- 1 root wheel 7581 8 Jul 09:12 /usr/share/syscons/keymaps/uk.cp850-ctrl.kbd
-r--r--r-- 1 root wheel 7581 8 Jul 09:12 /usr/share/syscons/keymaps/uk.cp850.kbd
-r--r--r-- 1 root wheel 7581 8 Jul 09:12 /usr/share/syscons/keymaps/uk.iso-ctrl.kbd
-r--r--r-- 1 root wheel 7581 8 Jul 09:12 /usr/share/syscons/keymaps/uk.iso.kbd
-r--r--r-- 1 root wheel 7649 8 Jul 09:12 /usr/share/syscons/keymaps/uk.dvorak.kbd
%
The manual page for keymap(5) suggests
sysctl machdep.enable_panic_key=1
, which is consistent with what I found in GitHub.From the manual page for vt(4) I see that I can also
sysctl kern.vt.kbd_panic=1
, no mention of this in GitHub.I can
kbdcontrol -l /usr/share/syscons/keymaps/uk.iso.kbd
at e.g. ttyv1 however when I try the same in a desktop environment:
Code:
root@mowa219-gjp4-8570p:~ # kbdcontrol -l /usr/share/syscons/keymaps/uk.iso.kbd
kbdcontrol: setting keymap: Inappropriate ioctl for device
root@mowa219-gjp4-8570p:~ #
I can panic on demand, using the key chord, with
machdep.enable_panic_key
disabled (0). So, what's the purpose of this sysctl variable?How can I avoid the need to manually use kbdcontrol(1)?
Is kbdmap bugged?
<https://www.freebsd.org/cgi/man.cgi?query=kbdcontrol&sektion=1&manpath=FreeBSD+13.0-RELEASE>
<https://www.freebsd.org/cgi/man.cgi?query=kbdmap&sektion=1&manpath=FreeBSD+13.0-RELEASE>
<https://www.freebsd.org/cgi/man.cgi?query=keymap&sektion=5&manpath=FreeBSD+13.0-RELEASE>
<https://www.freebsd.org/cgi/man.cgi?query=vt&sektion=4&manpath=FreeBSD+13.0-RELEASE>
Notes to self
<https://cgit.freebsd.org/src/commit/?id=43d7128c1450d36af259094b7cf39c0c4d17908c>
Expand kdb_alt_break a little, most commonly used with the option ALT_BREAK_TO_DEBUGGER. In addition to "Enter ~ ctrl-B" (to enter the debugger), there is now "Enter ~ ctrl-P" (force panic) and "Enter ~ ctrl-R" (request clean reboot, ala ctrl-alt-del on syscons). …