Using recent distros and systems, for the default setup and also when setting the kernel command line to have console=tty0
there is no output on the console when the kernel panics.
With a CentOS 7 system, I get panic output on the console.
This is seen on VMs and on two different bare metal systems.
On the one system, I was able to see the panic output using its Serial Over Lan (SOL, via BMC on a Supermicro system). I’d guess an actual serial line would work too but that system doesn’t have one.
I’m able to get console output via echo p > /proc/sysrq-trigger
and echo 9 > /proc/sysrq-trigger
or by echoing directly to the /dev/tty devices.
But then a crash / panic induced via echo c > /proc/sysrq-trigger
has no output, and I have one system that is likely panicing but I’m just not seeing it on the console. (The system that is panicing / hung takes 6 – 40 hours before it panics, it’s been frustrating to finally figure out it’s probably panic, and at this time I no longer have access to the system for further testing – when I do I’ll set it up to use the SOL).
Is there some kernel command line setting change I need to use?
Did the kernel console code change so that it can no longer output to the console during a panic?
The only old kernel I tried on CentOS 7 was 3.10.0-1160.114.2.el on both bare metal and in a virtualbox VM, and they get panic output on the console.
These failed to output on the console on panic:
Ubuntu 20.04 bare metal Supermicro and Intel systems, kernel 5.8.0-55-generic Ubuntu 22.04, kernels 5.15.0-119-generic, 6.8.0-38-generic, 6.8.0-40-generic on bare metal and virtualbox VM Rockylinux 8 / 9, not sure of kernel versions on virtualbox VM