Boot msgs

I am aware of /var/run/dmesg.boot but have noticed that not all boot msgs appear. Should I be looking elsewhere?

Also is the a way of displaying the above msgs, apart from cat /var/run/dmesg.boot , since dmesg() shows /var/log/dmesg.today
 
This file show some of the stuff after dmesg. Sometimes if stuff fails at boot the clues are in there.
cat /var/log/messages | tail -n 20
 
You can also get more dmesg output with the -v flag.
On the beastie menu drop to loader prompt and type boot -v
 
@balanga: Maybe some background information might be useful.

The kernel contains a circular message buffer that has a fixed size. The default (as of FreeBSD 12) is 96 KB. Typically that's enough for roughly 1,000 lines on average. You can change the size using the MSGBUF_SIZE kernel configuration option, although that requires building a new kernel.

After switching the computer on, the kernel starts with an empty buffer (except if this is a virtual machine – in this case the memory contents can be preserved across virtual power switching, so the kernel can pick up the previous contents of the buffer). If the buffer is full, i.e. the kernel reaches its end while writing to it, it starts over from the beginning of the buffer – that's why it's called a circular buffer. This means that old messages will be overwritten after a while.

The dmesg(8) command displays the current contents of the buffer. However, since it is overwritten after a while, the contents are preserved into regular files at certain points. First, when the system is booted, it is written to /var/run/dmesg.boot. So if you want to review the kernel's boot messages, you should look at that file. Second, it is written to /var/log/dmesg.today every night at about 3am.

Note that dmesg(8) displays only the actual kernel output by default. Hewever, the message buffer also contains other console output, including certain syslog messages. To see all of that, use dmesg -a. You can also look at /var/log/console.log, but this is not enabled by default. To enable it, create a file /etc/syslog.d/console.conf containing this line:
Code:
console.info    /var/log/console.log
Then type these commands:
Code:
touch /var/log/console.log
chmod 600 /var/log/console.log
service syslogd reload
You might also want to add an entry to /etc/newsyslog.conf, so the console.log file is rotated regularly.
 
Back
Top