Skip to content

Output init progress to /dev/kmsg

Reid Rankin requested to merge github/fork/reidrankin/dev-kmsg-progress into master

This enables debug of early-init problems via the use of the earlyprintk kernel parameter.

I recently tried to debug an issue with Hyper-V and the use of a certain kernel with Alpine. Unfortunately, the kernel in question had the Hyper-V framebuffer and keyboard drivers compiled as modules, which refused to load for certain complicated and irrelevant reasons. This left the system apparently hung, with no visible output post-bootloader.

In the course of debugging this issue, I discovered that the kernel option earlyprintk=efi,keep made it possible to watch the kernel logs, but I found it quite difficult to figure out where in the Alpine init process things weren't working. After some research, I devised this fairly soft-touch technique.

Even if you aren't interested in debugging early boot like I was, writing init progress to /dev/kmsg adds some useful context to your dmesg dumps, so I feel this patch would be a good candidate for inclusion upstream.

Merge request reports