Relevant questions are:
Where Linux places the messages of boot?
Name of log file where boot process is logged
However, these do not answer this question. This question is concerned with how all the boot messages can be viewed.
This is for Gentoo, OpenRC, modern kernels, 4.9.6 if you want to get specific. A generic solution that works for all distributions would however be preferable.
The problem is that sometimes an error or warning will scroll by so quickly that it cannot be seen. Nor is it always possible to simply scroll up for two reasons (even with --noclear in inittab): when switching to the framebuffer scrolling up to the point before the switch too place is no longer possible, and second, that after X starts, switching to console and trying to scroll up doesn't allow scrolling at all until new text is added to the buffer. Sometimes, certain messages are simply not found in dmesg nor /var/log/messages.
How can I view all the messages?
I see someone here https://www.linuxquestions.org/questions/linux-newbie-8/please-how-to-pause-scrolling-messages-at-boot-323772/ suggesting that pressing scroll lock might pause it. However, this is a not very elegant solution at best -- some messages will scroll by too quickly, systems can suddenly churn out a lot of text these days when booting.
This is what I ideally want:
- A dmesg | less type solution, if possible, or some other way of single stepping through the boot process.
- A way to ensure that everything printed on the screen also gets logged.
Is there a straightforward way to achieve either of these?
I know of one solution:
CONFIG_BOOT_PRINTK_DELAY: Delay each boot printk message by N milliseconds
Strangely I don't seem allowed to even select BOOT_PRINTK_DELAY in my menuconfig, I can find it when searching for it, but under Kernel hacking -> printk and dmesg options ->, I only have "Show timing information on printks" and "Default message log level". Where is the printk delay option? Do I need to enable something else first to make it visible? What? It would be nice to have this as part of an answer, if anyone knows.
But anyway this requires a kernel recompilation which makes this an ugly and invasive hack for a seemingly trivial task. A proper way of doing this would be very much welcome.