First boot messages are not logged to file
Username: Andreas
Origin: https://bugs.openwrt.org/index.php?do=details&task_id=568
I’m saving logs to a file on an external partition that is mounted at boot. After rebooting with an empty log file, an inconsistency can be noticed between the output of logread and the content of the log file. The first message printed by logread is, as expected,
Mon Feb 27 20:33:15 2017 kern.info kernel: [ 0.000000] Booting Linux on physical CPU 0x0
while the first message in the log file reads
Mon Feb 27 20:33:16 2017 user.notice : Added device handler type: tunnel
The first boot messages are missing from the log file. From this point on, logread and the log file are identical.
Of course this is a minor issue, but still one would expect logs to be 100% complete, regardless whether they are stored in memory or to file.
root@lede:~# cat /etc/config/system config system option hostname 'lede' option zonename 'Europe/Rome' option timezone 'CET-1CEST,M3.5.0,M10.5.0/3' option ttylogin '0' option urandom_seed '0' option log_remote '0' option log_type 'file' option log_file '/mnt/sda1/var/log/messages' option log_buffer_size '64' option log_size '1024' option conloglevel '8' option cronloglevel '0' ...
Start order of init scripts log and fstab has been changed to start logging as early as possible.
root@lede:~# ls -1 /etc/rc.d/S* /etc/rc.d/S00sysfixtime /etc/rc.d/S10boot /etc/rc.d/S10fstab /etc/rc.d/S10system /etc/rc.d/S11log /etc/rc.d/S11sysctl ...
Device: WRT1200AC
Software version: Reboot (17.01.0, r3205-59508e30)