I noticed that my /var/log/boot.log
file has date 2016-04-22, last time I booted in 15.10. Where are Xenial boot.log
files located?
I noticed that my /var/log/boot.log
file has date 2016-04-22, last time I booted in 15.10. Where are Xenial boot.log
files located?
Use
journalctl
Since
journald
contains all the logs, you can use thejournalctl
command with suitable filters. In the case ofboot.log
, which used to contain messages from the init system, you could do:-b0
shows messages from the current boot,-b1
from the previous boot, and so on. Without the-b
option,journalctl
will show messages from the beginning of the log.SYSLOG_PID
filters messages from PID 1, aka init.Or:
_COMM=systemd
looks for messages from thesystemd
command. Sincesystemd
is init, this is the one we're interested in.--system
filters messages from the system log instead of user session logs.Example:
journalctl
opens the logs in a pager by default, so you don't need to pipe toless
.Persistent logging
Ubuntu, by default, does not enable persistent journald logs. Thanks to the comment by @Auspex, you need to do either of:
Edit
/etc/systemd/journald.conf
to include:Create a
/var/log/journal
directory manually:Related:
I was going through some bug reports and noticed in this one: https://bugs.launchpad.net/ubuntu/+source/ubuntu-gnome-default-settings/+bug/1536771 that Plymouth is actually writing to boot.log.
If you look at https://launchpadlibrarian.net/257898272/plymouth-debug.log and search in your browser for 'boot.log' you get the following lines:
I have no understanding of how the internals of Plymouth work, but since it is responsible for the splash screen that shows up before the login screen, I can only assume that if there is no splash screen (black screen) before getting to the login screen, the file is not modified. If you do have a splash screen showing before the login screen, the boot process output is redirected to the boot.log file.
In Ubuntu 16.04 the
boot.log
file is still located in the/var/log
folder as you can see here. The boot logfile is from today (2016-04-29). Maybe something went wrong when you installed Ubuntu 16.04 or have upgraded the operating system from Ubuntu 15.10 to Ubuntu 16.04 LTS.Alternatively you can examine the general boot behavior from the comprehensive
kern.log
file. Another possible alternative would be to manually configure the syslog daemon to generate the boot log file and here is a tutorial how exactly to do this : How To View and Configure Linux LogsAdditional information :
I investigated the boot logging behavior on two different machines. On a computer with an UEFI based BIOS the
boot.log
file exists - but on a computer with legacy based BIOS it seems to not exist at all. So in case the system is installed in legacy BIOS (MBR/msdos) mode, this could be the explanation why yourboot.log
file is dated from 2016-04-22, it's a leftover from Ubuntu 15.10.Updated information 2016-05-02 :
I kept on investigating the behavior of the boot logging file and observed that the
boot.log
file still exists on the UEFI based machine, but since a few days the file is empty. Another alternative I tried to see what happens during the boot process, was to install BootChart, butbootchart.png
did not exist in the/var/log
folder as expected after rebooting the system ... there only was an empty/var/log/bootchart
folder which also did not contain the expectedbootchart.png
file.Updated information 2016-05-04 :
Today the
boot.log
file seemed to have "functionality" again, it is filled with partial information from the boot process. It appears to be a randomly changing behavior, that I think can't be solved here on Ask Ubuntu - so you should consider to file a bug report on Launchpad to get this solved !Conclusion - after one week of investigation of the
boot.log
file behavior in Ubuntu 16.04 : You shouldn't worry about/var/log/boot.log
any longer and just get used tojournalctl
instead.