* [bug#75808] [PATCH] [PATCH] gnu: system: Disable EFI pstore backend by default
@ 2025-01-24 16:01 Roman Riabenko via Guix-patches via
2025-01-28 20:38 ` [bug#75808] " Leo Famulari
2025-02-03 21:25 ` bug#75808: " Leo Famulari
0 siblings, 2 replies; 3+ messages in thread
From: Roman Riabenko via Guix-patches via @ 2025-01-24 16:01 UTC (permalink / raw)
To: 75808; +Cc: Roman Riabenko
* 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
list: <https://lists.gnu.org/archive/html/help-guix/2025-01/msg00173.html>.
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(+)
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [bug#75808] [PATCH] gnu: system: Disable EFI pstore backend by default
2025-01-24 16:01 [bug#75808] [PATCH] [PATCH] gnu: system: Disable EFI pstore backend by default Roman Riabenko via Guix-patches via
@ 2025-01-28 20:38 ` Leo Famulari
2025-02-03 21:25 ` bug#75808: " Leo Famulari
1 sibling, 0 replies; 3+ messages in thread
From: Leo Famulari @ 2025-01-28 20:38 UTC (permalink / raw)
To: 75808; +Cc: roman
[-- Attachment #1: Type: text/plain, Size: 391 bytes --]
On Fri, Jan 24, 2025 at 06:01:54PM +0200, Roman Riabenko via Guix-patches via wrote:
> * gnu/system.scm (%default-kernel-arguments): Add efi_pstore.pstore_disable=1.
As discussed in the help-guix thread, here is a patch that makes this
change via the build-time configuration system rather than the run-time
command line.
https://lists.gnu.org/archive/html/help-guix/2025-01/msg00201.html
[-- Attachment #2: 0001-gnu-system-Disable-EFI-pstore-backend-by-default.patch --]
[-- Type: text/plain, Size: 2927 bytes --]
From c55c77f0758bc35b2543987b8cf3d78af5282a56 Mon Sep 17 00:00:00 2001
Message-ID: <c55c77f0758bc35b2543987b8cf3d78af5282a56.1738096695.git.leo@famulari.name>
From: Roman Riabenko <roman@riabenko.com>
Date: Tue, 28 Jan 2025 13:50:29 -0500
Subject: [PATCH] gnu: system: Disable EFI pstore backend by default
This commit 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 changing the option via 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
list: <https://lists.gnu.org/archive/html/help-guix/2025-01/msg00173.html>.
* gnu/packages/linux.scm (default-extra-linux-options): Enable the kernel
build-time configuration option CONFIG_EFI_VARS_PSTORE_DEFAULT_DISABLE.
Change-Id: Id0294fa90ccbf3bacbb55a22aeb4f0a863efe22c
Co-authored-by: Leo Famulari <leo@famulari.name>
---
gnu/packages/linux.scm | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index f236aefed5..ba735c4921 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -920,7 +920,11 @@ (define (default-extra-linux-options version)
("CONFIG_VIRTIO_MMIO" . m)
("CONFIG_FUSE_FS" . m)
("CONFIG_CIFS" . m)
- ("CONFIG_9P_FS" . m)))
+ ("CONFIG_9P_FS" . m)
+ ;; Disable the EFI pstore storage backend to avoid causing
+ ;; unrecoverable failures on some EFI systems:
+ ;; https://lists.gnu.org/archive/html/help-guix/2025-01/msg00173.html
+ ("CONFIG_EFI_VARS_PSTORE_DEFAULT_DISABLE" . #t)))
(define (config->string options)
(string-join (map (match-lambda
base-commit: 97fb1887ad10000c067168176c504274e29e4430
prerequisite-patch-id: fb8199eb3a9afa9d787a86b2cf7f408992d7e9a1
prerequisite-patch-id: bfa219db9b8e6aa9a58d2f395dd6ef85ff5bc856
prerequisite-patch-id: f9e40dd45ac4ce149a5d41317488a2485514e8ad
--
2.47.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* bug#75808: [PATCH] gnu: system: Disable EFI pstore backend by default
2025-01-24 16:01 [bug#75808] [PATCH] [PATCH] gnu: system: Disable EFI pstore backend by default Roman Riabenko via Guix-patches via
2025-01-28 20:38 ` [bug#75808] " Leo Famulari
@ 2025-02-03 21:25 ` Leo Famulari
1 sibling, 0 replies; 3+ messages in thread
From: Leo Famulari @ 2025-02-03 21:25 UTC (permalink / raw)
To: 75808-done
I pushed this fix as commit 616ae36e0f557cecb4abe58c5b0973b9428d25e0.
I decided to effect the change using the Guile
'default-extra-linux-options' interface to the build-time kernel
configuration.
Thanks to everyone involved for helping debug and suggest fixes.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-02-03 21:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-24 16:01 [bug#75808] [PATCH] [PATCH] gnu: system: Disable EFI pstore backend by default Roman Riabenko via Guix-patches via
2025-01-28 20:38 ` [bug#75808] " Leo Famulari
2025-02-03 21:25 ` bug#75808: " Leo Famulari
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).