From linux-debugging
Verify that systemd-journald is configured for persistent storage so logs survive reboot — essential for diagnosing hard crashes and unexpected reboots. Configures it if not. Use proactively on any new desktop, and as a precondition before any post-crash investigation skill.
npx claudepluginhub danielrosehill/claude-code-plugins --plugin linux-debuggingThis skill uses the workspace's default tool permissions.
By default on some distros, journald stores logs only in `/run/log/journal` (tmpfs) and they vanish on reboot. For crash forensics you need them in `/var/log/journal` so `journalctl -b -1` works after the system comes back up.
Guides Next.js Cache Components and Partial Prerendering (PPR): 'use cache' directives, cacheLife(), cacheTag(), revalidateTag() for caching, invalidation, static/dynamic optimization. Auto-activates on cacheComponents: true.
Guides building MCP servers enabling LLMs to interact with external services via tools. Covers best practices, TypeScript/Node (MCP SDK), Python (FastMCP).
Share bugs, ideas, or general feedback.
By default on some distros, journald stores logs only in /run/log/journal (tmpfs) and they vanish on reboot. For crash forensics you need them in /var/log/journal so journalctl -b -1 works after the system comes back up.
journalctl --list-boots --no-pager | head -10
ls -la /var/log/journal/ 2>/dev/null
ls -la /run/log/journal/ 2>/dev/null
grep -E '^Storage=' /etc/systemd/journald.conf /etc/systemd/journald.conf.d/*.conf 2>/dev/null
Three states to distinguish:
/var/log/journal/<machine-id>/ exists and contains .journal files; --list-boots shows multiple entries./run/log/journal/ exists; --list-boots shows one entry; previous boots are gone.Storage=auto (the default) but /var/log/journal/ doesn't exist, so journald falls back to volatile.sudo mkdir -p /var/log/journal
sudo systemd-tmpfiles --create --prefix /var/log/journal
sudo systemctl restart systemd-journald
journalctl --list-boots --no-pager | head -3
For an explicit configuration (not relying on auto), drop in:
sudo tee /etc/systemd/journald.conf.d/persistent.conf <<'EOF'
[Journal]
Storage=persistent
SystemMaxUse=2G
SystemKeepFree=1G
SystemMaxFileSize=200M
MaxRetentionSec=1month
ForwardToSyslog=no
EOF
sudo systemctl restart systemd-journald
Tune SystemMaxUse to taste — 2G holds many weeks of desktop logs.
After enabling, the test is on the next reboot:
journalctl --list-boots --no-pager | head -5
Should show at least 2 entries with distinct timestamps. If -b -1 returns content, you're good.
State explicitly:
journalctl --disk-usage)