How to view all boot messages in Linux after booting?
So your console has two types of messages:
- generated by the kernel (via printk);
- generated by userspace (usually your init system).
Kernel messages are always stored in the kmsg buffer, visible via dmesg
. They're also often copied to your syslog. (This also applies to userspace messages written to /dev/kmsg
, but those are fairly rare.)
Meanwhile, when userspace writes its fancy boot status text to /dev/console
or /dev/tty1
, it's not stored anywhere at all. It just goes to the screen and that's it. So I think pretty much any solution – except for Rowan's serial console suggestion – will end up being either very distro-specific (due to each init system performing logging differently) or an "invasive hack" that involves strace or kernel hacking or such.
In the best case, your init system will itself log all important events to the syslog (/var/log/messages or such). For example:
systemd[1]: Starting BIRD routing daemon...
bird[478296]: /etc/bird.conf, line 2: syntax error
systemd[1]: bird.service: Control process exited, code=exited status=1
systemd[1]: Failed to start BIRD routing daemon.
(systemd and upstart also log the services' stdout/stderr as well; many other init systems just redirect it to the console or nowhere.)
One suggestion is to have another laptop film the boot screen with high resolution and frame rates then slow play the resulting (MOV - MP4 - AVI) - maybe not the best solution but simply to deploy and its for debugging anyway right ? Just an Idea ...