0

Laptop is an Acer Aspire V3-772 with 8GB and Ubuntu 22.04.3 LTS, Gnome 42.9 & Wayland on UEFI

My friends laptop suffers from shutdown problems and I wanted to take a look at the previous boot.log to see what caused the shutdown, but there is only 1 boot.log file showing when I ask for the logs with ls /var/log and that is the current boot.log.

auth.log  boot.log  btmp  cups  dmesg  gdm3  gpu-manager.log  journal  kern.log  lastlog  private  syslog  ubuntu-advantage.log  unattended-upgrades  wtmp

And when taking a look at journals:

$ /var/log/journal
$ ls
9be0c0a693aa409aa7b4e30f37396627

this also results in just one (the current) journal.

I do not know if the situation has ever be different, i.e. if older log files were retained once, maybe the system always behaved in this manner.

I learned that the behavior of logs depends on logrotate.conf, so here I give its content.

The result of sudo nano /etc/logrotate.conf is pretty standard I guess:


# global options do not affect preceding include directives

rotate log files weekly

weekly

use the adm group by default, since this is the owning group

of /var/log/syslog.

su root adm

keep 4 weeks worth of backlogs

rotate 4

create new (empty) log files after rotating old ones

create

use date as a suffix of the rotated file

#dateext

uncomment this if you want your log files compressed

#compress

packages drop log rotation information into this directory

include /etc/logrotate.d

system-specific logs may also be configured here.

I am not sure if the following errors which are marked as important in the current log might be related, but here they are:

ACPI Error: Aborting method _SB.PCI0.PEG0.PEGP.DD02._BCL due to previous error (AE_NOT_FOUND) (20210730/psparse-529)

ACPI BIOS Error (bug): Could not resolve symbol [_SB.PCI0.GFX0.DD02._BCL], AE_NOT_FOUND (20210730/psargs-330)

Can't chdir to /var/spool/anacron: No such file or directory

Timed out waiting for device /sys/devices/virtual/misc/vmbus!hv_kvp.

Failed to start Application launched by gnome-session-binary.

I looked everywhere for information on missing log files, but to no avail. How this could have happened, why are the older log files, older than the current, missing?

EDIT:

I have read that in cases that only the current log can be viewed, there is no directory journal in /etc/var/ and should be created, OR that in /etc/systemd/journald.conf the option storage = persistent should be set which would cause the directory journal to be created, thus solving the problem.

But because in my system the journal directory already exists and setting storage = persistent did not make any difference, I wonder if it is safe to try to delete the journal directory and let it be created through the mechanism that should result from having storage = persistent been set.

Maybe when created in that automatic way this will result in a system with persistent logs?

plopper
  • 129
  • take a look https://askubuntu.com/questions/765315/how-to-find-previous-boot-log-after-ubuntu-16-04-restarts/1008210#1008210 here please. – nobody Sep 17 '23 at 16:11
  • 1
    Logs are now managed by journalctl. sudo journalctl -b -1 -ex, for example, shows the log messages leading up to the previous shotdown, with eXtended error messages. Read man journalctl, do sudo journalctl --list-boots. – waltinator Sep 17 '23 at 20:00
  • @waltinator: sudo journalctl --list-boots also gives just one – plopper Sep 23 '23 at 13:39
  • @all: I edited the question to add a sub-question concerning the possibility of deleting the journal-directory in order to have that being re-created, please comment. – plopper Sep 23 '23 at 15:28
  • See https://www.digitalocean.com/community/tutorials/how-to-use-journalctl-to-view-and-manipulate-systemd-logs it explains how to enable persistent journalctl data. BTW, simply deleting an in-use directory is an obdolete idea, don't do it. Either reboot (sudo shutdown -r now) or restart the journalctl servicr. – waltinator Sep 24 '23 at 04:53
  • @waltinator: What I wrote under the EDIT in my question is exactly what is told in your link, so this does not work. – plopper Sep 24 '23 at 08:07

0 Answers0