lfam pushed a commit to branch kernel-updates
in repository guix.
commit 31349f6b799e42a0dfe9c97d2ae67bd160b845a1
Author: Roman Riabenko <[email protected]>
AuthorDate: Tue Jan 28 13:50:29 2025 -0500
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 <[email protected]>
---
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 308583f54d..4d5988ab97 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -920,7 +920,11 @@ ARCH and optionally VARIANT, or #f if there is no such
configuration."
("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