guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

02/02: file-system: Add efivarfs support.


From: guix-commits
Subject: 02/02: file-system: Add efivarfs support.
Date: Fri, 31 Jul 2020 08:17:52 -0400 (EDT)

mothacehe pushed a commit to branch master
in repository guix.

commit f94835a917cf78675eb597fecd222b6c6d1fb1ae
Author: Mathieu Othacehe <othacehe@gnu.org>
AuthorDate: Fri Jul 31 13:43:36 2020 +0200

    file-system: Add efivarfs support.
    
    Tools such as efibootmgr rely on the deprecated /sys/firmware/efi/vars API 
as
    well as on the new /sys/firmware/efi/efivars API. The latter needs to be
    mounted.
    
    Reported by Keyhenge here:
    https://lists.gnu.org/archive/html/bug-guix/2020-04/msg00274.html
    
    Here is the efivarfs documentation:
    https://www.kernel.org/doc/Documentation/filesystems/efivarfs.txt.
    
    * gnu/system/file-systems.scm (%efivars-file-system): New exported variable,
    (%base-file-systems): add it.
    * gnu/system/install.scm (%efivars-file-system): Add it.
    
    Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
---
 gnu/system/file-systems.scm | 12 ++++++++++++
 gnu/system/install.scm      |  1 +
 2 files changed, 13 insertions(+)

diff --git a/gnu/system/file-systems.scm b/gnu/system/file-systems.scm
index 9c5cbc9..a62cf90 100644
--- a/gnu/system/file-systems.scm
+++ b/gnu/system/file-systems.scm
@@ -70,6 +70,7 @@
             %fuse-control-file-system
             %binary-format-file-system
             %debug-file-system
+            %efivars-file-system
             %shared-memory-file-system
             %pseudo-terminal-file-system
             %tty-gid
@@ -382,6 +383,16 @@ TARGET in the other system."
     (check? #f)
     (create-mount-point? #t)))
 
+(define %efivars-file-system
+  ;; Support for EFI variables file system.
+  (file-system
+    (device "efivarfs")
+    (mount-point "/sys/firmware/efi/efivars")
+    (type "efivarfs")
+    (mount-may-fail? #t)
+    (needed-for-boot? #f)
+    (check? #f)))
+
 (define %tty-gid
   ;; ID of the 'tty' group.  Allocate it statically to make it easy to refer
   ;; to it from here and from the 'tty' group definitions.
@@ -483,6 +494,7 @@ TARGET in the other system."
   (list %pseudo-terminal-file-system
         %debug-file-system
         %shared-memory-file-system
+        %efivars-file-system
         %immutable-store))
 
 ;; File systems for Linux containers differ from %base-file-systems in that
diff --git a/gnu/system/install.scm b/gnu/system/install.scm
index d0ff2e7..a87c2f4 100644
--- a/gnu/system/install.scm
+++ b/gnu/system/install.scm
@@ -497,6 +497,7 @@ Access documentation at any time by pressing Alt-F2.\x1b[0m
             ;; elogind's cgroup file systems.
             (list %pseudo-terminal-file-system
                   %shared-memory-file-system
+                  %efivars-file-system
                   %immutable-store)))
 
     (users (list (user-account



reply via email to

[Prev in Thread] Current Thread [Next in Thread]