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
  • 9,212
  • 7
  • 40
  • 79

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
  • 9,212
  • 7
  • 40
  • 79
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
  • 35,099
  • 19
  • 57
  • 93
  • 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

WinEunuuchs2Unix
  • 99,709
  • 34
  • 237
  • 401
  • 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 '20 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 '20 at 15:05
  • @Melebius I found the bug report from 16.04 and added a link. – WinEunuuchs2Unix Jan 19 '20 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`](https://packages.ubuntu.com/search?keywords=bootlogd&searchon=names&suite=all&section=all) package last appeared in 16.04. – Melebius Jan 20 '20 at 08:21
  • @Melebius Do you have the `sysvinit` packages installed as shown in my answer update? – WinEunuuchs2Unix Jan 20 '20 at 11:33
  • I have `sysvinit-utils` installed but [`sysv-rc`](https://packages.ubuntu.com/search?keywords=sysv-rc&searchon=names&suite=all&section=all) last appeared in 16.04, too. – Melebius Jan 20 '20 at 12:19
  • I think that is for rc.local service to run programs on startup with Sudo permissions and may not be required in your case. – WinEunuuchs2Unix Jan 20 '20 at 13:24
  • I am terribly sorry WinEunuuchs2Unix . The closest answer to my question was yours. And it did deserve the bounty. However, I mistakenly click the @starkus 's answer for awarding the bounty and the system does not allow me to undo it! :( – FedKad Jan 23 '20 at 13:23
  • A mod can probably fix that. – WinEunuuchs2Unix Jan 23 '20 at 13:49
  • I informed mods. Sorry again. – FedKad Jan 23 '20 at 14:11
  • 1
    No worries. I upvoted both your Q&A to help offset your bounty costs :) – WinEunuuchs2Unix Jan 23 '20 at 16:06