5

By removing the parameters quiet and splash from GRUB_CMDLINE_LINUX_DEFAULT line at the /etc/default/grub file, I am able to display the messages displayed by system startup scripts (services) to the screen during Ubuntu boot.

However, these messages are scrolling very fast and it is practically impossible to catch any FAILED messages. The file /var/log/boot.log used to hold these messages. For example:

# grep -a FAILED /var/log/boot.log
[FAILED] Failed to start Raise network interfaces.
...

However, this file is no longer updated (since April 2019) on my system, which suggests that starting with Ubuntu 19.04 it is deprecated. Where can I find that content on Ubuntu 19.10? Is there a way to capture the data displayed by init scripts on the console during boot to a file?

Note

The same functionality (i.e., the exact console text output) is not provided by journalctl. For example:

# journalctl -b 0 | grep Raise
Jan 13 12:01:25 ... systemd[1]: Starting Raise network interfaces...
Jan 13 12:01:25 ... systemd[1]: Started Raise network interfaces.
FedKad
  • 10,515

3 Answers3

2

After doing some tests, I finally got the following:

  1. See this.
  2. Bootlogd is no longer supported. Plymouth service takes over. The file /etc/default/bootlogd is irrelevant.
  3. For plymouth.service to log messages to /var/log/boot.log file, the file /etc/default/grub should contain the following line: GRUB_CMDLINE_LINUX_DEFAULT="quiet splash". Otherwise plymouth service will not log anything to boot.log!

So, the answer of @WinEunuuchs2Unix is more or less the correct one.

FedKad
  • 10,515
1

One may view messages from this boot with

sudo journalctl -b 0

Read man journalctl and see my AskUbuntu profile for journalctl hints.

waltinator
  • 36,399
  • Yes, that is something I looked into. However, the format is not the same as the contents of boot.log which is exactly the same as the text displayed on the console during boot. – FedKad Jan 13 '20 at 09:16
0

The problem has been around since Ubuntu 16.04:

Answers there also recommend journalctl but buried in comments:

I confirm that when configuring GRUB_CMDLINE_LINUX_DEFAULT="" in /etc/default/grub than boot.log is not written. When using GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" than boot.log is again written. I use Ubuntu 19.04. – adrhc Jun 9 '19 at 11:21

When I first started using 16.04 I recall /var/log/boot.log was empty but I didn't care enough to investigate. I looked after reading this question and now it is populated. There was a bug that has since been fixed:

There may have been a bug regression in 19.10 or the sysvinit package is not installed. On my 16.04 installation I have this:

$ apt list | grep sysv | grep installed

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

    sysv-rc/xenial,xenial,now 2.88dsf-59.3ubuntu2 all [installed]
    sysvinit-utils/xenial,now 2.88dsf-59.3ubuntu2 amd64 [installed]

To those that do not know, the advantage of /var/log/boot.log over journalctl -b is the color formatting that mirrors the console boot messages:

boot.log.png