Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[202311] Fix pstore service not running #54

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions build_debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -526,6 +526,9 @@ rm /files/lib/systemd/system/rsyslog.service/Service/ExecStart/arguments
set /files/lib/systemd/system/rsyslog.service/Service/ExecStart/arguments/1 -n
"

# Ensure pstore service is running
sudo cp files/image_config/system-pstore/systemd-pstore.service $FILESYSTEM_ROOT/lib/systemd/system/systemd-pstore.service

sudo mkdir -p $FILESYSTEM_ROOT/var/core

# Config sysctl
Expand Down
28 changes: 28 additions & 0 deletions files/image_config/system-pstore/systemd-pstore.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
#
# This file is part of systemd.
#
# systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.

[Unit]
Description=Platform Persistent Storage Archival
Documentation=man:systemd-pstore(8)
ConditionDirectoryNotEmpty=/sys/fs/pstore
ConditionVirtualization=!container
DefaultDependencies=no
Conflicts=shutdown.target
Before=sysinit.target shutdown.target
After=modprobe@efi_pstore.service
Wants=modprobe@efi_pstore.service

[Service]
Type=oneshot
ExecStart=/lib/systemd/systemd-pstore
RemainAfterExit=yes
StateDirectory=systemd/pstore

[Install]
WantedBy=sysinit.target