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.

3 Answers 3

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.

1

One may view messages from this boot with

sudo journalctl -b 0

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

1
  • 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, 2020 at 9: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

11
  • This does not work for me in Ubuntu 18.04 unfortunately. (Yes, I ran sudo update-grub.) Anyway, is there any bug report regarding this?
    – Melebius
    Jan 13, 2020 at 13:08
  • Same here as @Melebius : I tested both "quiet splash" and "nosplash" (followed by update-grub) on 19.10, but no boot.log.
    – FedKad
    Jan 13, 2020 at 15:05
  • @Melebius I found the bug report from 16.04 and added a link. Jan 19, 2020 at 14:01
  • Thank you for the update but I still haven’t found advice on how to make boot.log working on my machine (18.04) or newer (OP’s 19.10) in your answer. It currently looks just like a very extensive comment… The bootlogd package last appeared in 16.04.
    – Melebius
    Jan 20, 2020 at 8:21
  • 1
    No worries. I upvoted both your Q&A to help offset your bounty costs :) Jan 23, 2020 at 16:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .