When I power-on Omnia it boots about one minute. Then I can connect via ssh and execute dmesg.
But after one minute first 20 seconds of kernel log are unavailable because of buffer size (they were overwritten).
I had to dump dmesg to temporary file in /etc/preinit to play with msata drive, but it is not a solution.
Is there any config option to increase size of this buffer without kernel rebuild?
You can use uboot (trough serial console is, I think, possible to add temporally any boot parameter) or recompile Turris OS. None of which is good option. But kernel log is also logged by syslog. So you should be able to found whole kernel log in /var/log/messages. You can get it with some grep command, such as grep "kernel\[\]:" /var/log/messages.
For even better option, see syslog-ng documentation and configure it so that kernel log is logged also to separate file.
All log entries created earlier are lost.
And when I run dmesg just after boot process completes, kernel logs start at abour 28 sec.
The part I was looking for was around 7 seconds from power-on, so it was unavailable without that hack in preinit script…
I see. It’s probably because we are using just /dev/log as source for syslog, we should probably at syslog-ng start also source /dev/kmsg. I will add it to my todo list, but I can’t promise that I will look in to it any time soon. So yes solution with syslog doesn’t work unless you do some syslog-ng configuration hacking.
Same for uboot-envtools. I added it to my todo list and will present it to colleague handling uboot. But can’t promise anything for now.
I read a little bit of kmsg. /dev/kmsg is newer and more advanced interface for kernel ring buffer compared to /proc/kmsg so I tried to change syslog-ng to read /dev/kmsg but that didn’t work. It seems that syslog-ng on Omnia is so old that it doesn’t support /dev/kmsg.