Solved Can't capture boot log before syslog

What's the easiest way to capture all the log messages that show up BEFORE the /var/log/messages during the boot process. There's something weird printed out to screen on boot, but it's before the syslog starts working.

AI says something about console output during boot, but maybe there's a niftier way to be able to see what freaking happens during the boot? Maybe set it to pause or debug or something, please?
 
all the log messages that show up BEFORE the /var/log/messages during the boot process
These messages are written into /dev/console and are not logged by default.
syslogd(8) is in charge of these logs and what you want to do can be achieved with configuring it via syslog.conf(5) (/etc/syslog.conf):
Code:
# Log all writes to /dev/console to a separate file.
console.*  /var/log/console.log

I personally has this in my /etc/syslog.conf:
Code:
# uncomment this to log all writes to /dev/console to /var/log/console.log
# touch /var/log/console.log and chmod it to mode 600 before it will work
console.info  /var/log/console.log

.info is a severity level of the message:
Code:
The level describes the severity of the message, and is a keyword from the following
ordered list (higher to lower): emerg, alert, crit, err, warning, notice, info and debug. 
These keywords correspond to similar “LOG_” values specified to the syslog(3) library routine.
 
Thanks, this is definitely log messages that were not in /var/log/messages.

But I also want messages BEFORE syslog. Like, kernel loading modules.

What's the high-tech way to do it that doesn't include recording a video on a smartphone of all those console messages?
 
Well, for now it seems recording a video or taking pictures of the FreeBSD booting process is the only approachable solution for anyone who does not have a COM1 port. It is a solution of sorts.

Taking a picture of the FreeBSD booting is how I learned that I had to move some kernel modules loading from /boot/loader.conf to /etc/rc.conf so I can see them load in the syslog. For some reason, I had this confusion that I had to load things in loader.conf, whereas in reality loader.conf only needs to include things there that are the minimum required to set the stage for rc.conf and the multi-user mode stage. The handbook just says "reasonable defaults" for boot/loader stuff. 🍨 It should say "minimum defaults to proceed to the next booting stage." 📓
 
I had this confusion that I had to load things in loader.conf, whereas in reality loader.conf only needs to include things there that are the minimum required to set the stage for rc.conf and the multi-user mode stage.
Yes, this is not quite accurate. In FreeBSD there are 3 main configuration files:
/etc/rc.conf -- enable/disable system services and daemons.
/boot/loader.conf -- tunables that can be set ONLY at boot time, not later.
/etc/sysctl.conf -- tunables that can be set anytime.

This sort of separation (at least in my opinion) is quite reasonable and does make sense :)
 
Back
Top