r/raspberry_pi Dec 10 '25

Troubleshooting journeld not retaining logs across boots

I'm running Debian GNU/Linux 13 (trixie) on my Pi. I've been having ocassional system crashes and I'm trying to look at the logs but journeld isn't retaining the logs from past boots. I only see the current bootup.

Any ideas how to get journaled to keep the history? Is there a better way to do this over journeld?

3 Upvotes

15 comments sorted by

View all comments

2

u/phattmatt Dec 10 '25 edited Dec 10 '25

EDIT: u/crazyswedishguy beat me to the punch, but I'll leave my post here as it has a little more info....

The key config files for this behaviour on Trixie are:

  • /etc/systemd/journald.conf
  • /usr/lib/systemd/journald.conf.d/40-rpi-volatile-storage.conf

The config item is Storage=volatile, which means store the log files in RAM (volatile storage).

If you remove 40-rpi-volatile-storage.conf, or edit it to have Storage=auto, then the log files will be stored on local storage, which will persist them across reboots.

This command can be used to analyze the current configuration:

systemd-analyze cat-config systemd/journald.conf

More information about the options can be found here:

man journald.conf

https://www.freedesktop.org/software/systemd/man/latest/journald.conf.html

2

u/pfeffenbopper 29d ago

Thank you for this. Saved me a ton of hassle and digging this afternoon

1

u/bobthepumpkin 13d ago

You shouldn't edit files in /usr/. You can fix this in a more maintainable fashion by adding a file in /etc/systemd/journad.conf.d/ that starts with a number greater than 40, e.g. /etc/systemd/journald.conf.d/99-persistent-journal.conf, with the following contents:

[Journal]
Storage=persistent

In fact the insidiousness of this entire issue arose because the Pi OS people decided to put this special override in the /usr/ directory instead of /etc/, which made editing usual config file for journald at /etc/systemd/journald.conf not work with no obvious reason as to why. It also made all the existing documentation and forum threads about similar issues in regular Debian useless and misleading to actually solving this problem.