[PATCH] [PATCH] gnu: system: Disable EFI pstore backend by default

  • Open
  • quality assurance status badge
Details
One participant
  • Roman Riabenko
Owner
unassigned
Submitted by
Roman Riabenko
Severity
normal
R
R
Roman Riabenko wrote 46 hours ago
(address . guix-patches@gnu.org)(name . Roman Riabenko)(address . roman@riabenko.com)
20250124160840.3114-1-roman@riabenko.com
* gnu/system.scm (%default-kernel-arguments): Add efi_pstore.pstore_disable=1.

Change-Id: Id0294fa90ccbf3bacbb55a22aeb4f0a863efe22c
---

This patch disables one of the backends for the persistent storage driver pstore
in the Linux kernel, in particular the backend which allows it to save data to
EFI variables storage in UEFI NVRAM, such as error log "dump" files.

This reduces writes to UEFI to reduce the chances of it wearing out or
malfunctioning for other reasons, as well as prevents situations when the efivar
is full and cannot take new variables, which is known to cause
"Could not prepare Boot variable: No space left on device" errors on computers
with some UEFI implementations which are susceptible to such problems, typically
on relatively older machines. The user is confronted by the issue at the later
stages of guix system reconfiguration when the new boot entry is created. It may
be difficult to recover from because the exact cause depends on UEFI. Sometimes
it is enough to remove dumps from efivars. Disabling the EFI pstore backend is
expected to reduce the chances of unaware users running into issues with UEFI
and failing to boot their Guix Systems.

Sophisticated users may still enable the backend by removing the option from the
kernel arguments, either in the system configuration or in GRUB.

The above is my summary of what was previously discussed in guix-help mailing

Disclosure: I have ran into this issue recently. I am a guix user who researched
the topic but not a developer.

To be sure, I reconfigured the system with this patch and it worked as expected
by adding the kernel argument.

gnu/system.scm | 3 +++
1 file changed, 3 insertions(+)

Toggle diff (18 lines)
diff --git a/gnu/system.scm b/gnu/system.scm
index 8df871f255..5785cfdd9a 100644
--- a/gnu/system.scm
+++ b/gnu/system.scm
@@ -761,6 +761,9 @@ (define %default-kernel-arguments
;; Default arguments passed to the kernel.
(list (string-append "modprobe.blacklist="
(string-join %default-modprobe-blacklist ","))
+ ;; Avoiding susceptible UEFIs failures from efivars used for pstore, see
+ ;; <https://lists.gnu.org/archive/html/help-guix/2025-01/msg00173.html>.
+ "efi_pstore.pstore_disable=1"
"quiet"))
(define* (operating-system-directory-base-entries os)

base-commit: 13367c6c47f5a4962dde6fab480ea14cd0ac536c
--
2.47.1
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 75808@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 75808
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch