Freebsd – how to reboot a frozen FreeBSD server from the serial console

freebsdmagic-sysrqrebootserial-console

Linux has the "magic sysrq key" to reboot frozen machines remotely, and it works over the serial console, but what about FreeBSD? Is there a way to send a "control-alt-delete" to FreeBSD servers on serial consoles?

Best Answer

Assuming you have a kernel with the debugger option compiled in you can use ControlAltEscape. From there you can call boot(0) or panic.

Chapter 10 of the FreeBSD developers handbook explains this in a lot more detail.

So much for more or less the same as SysReq via a keyboard. On the serial console, you need to send the break signal and have the options BREAK_TO_DEBUGGER enabled. But "it is not the default since there are a lot of serial adapters around that gratuitously generate a BREAK condition, for example when pulling the cable".