summary refs log tree commit diff
path: root/gnu/system
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2022-12-19 00:40:33 +0100
committerLudovic Courtès <ludo@gnu.org>2022-12-19 00:40:33 +0100
commit12ca7677028119bb280e33f7a759a66724d468d1 (patch)
tree42ea4bb7b3ebcca0598e14444e269cb7cf39c59f /gnu/system
parent553f46a094951df99eb1fb6b1a4d3ca1df91adfd (diff)
parent989a3916dc8967bcb7275f10452f89bc6c3389cc (diff)
downloadguix-12ca7677028119bb280e33f7a759a66724d468d1.tar.gz
Merge branch 'version-1.4.0'
Diffstat (limited to 'gnu/system')
-rw-r--r--gnu/system/install.scm13
1 files changed, 12 insertions, 1 deletions
diff --git a/gnu/system/install.scm b/gnu/system/install.scm
index 3f5352be87..b3cf7a1bd8 100644
--- a/gnu/system/install.scm
+++ b/gnu/system/install.scm
@@ -284,13 +284,24 @@ templates under @file{/etc/configuration}.")))
 ;; appropriate options.  The GUI installer needs it when the machine does not
 ;; support Kernel Mode Setting.  Otherwise kmscon is missing /dev/fb0.
 (define (uvesafb-shepherd-service _)
+  (define modprobe
+    (program-file "modprobe-wrapper"
+                  #~(begin
+                      ;; Use a wrapper because shepherd 0.9.3 won't let us
+                      ;; pass environment variables to the child process:
+                      ;; <https://issues.guix.gnu.org/60106>.
+                      (setenv "LINUX_MODULE_DIRECTORY"
+                              "/run/booted-system/kernel/lib/modules")
+                      (apply execl #$(file-append kmod "/bin/modprobe")
+                             "modprobe" (cdr (command-line))))))
+
   (list (shepherd-service
          (documentation "Load the uvesafb kernel module if needed.")
          (provision '(maybe-uvesafb))
          (requirement '(file-systems))
          (start #~(lambda ()
                     (or (file-exists? "/dev/fb0")
-                        (invoke #+(file-append kmod "/bin/modprobe")
+                        (invoke #+modprobe
                                 "uvesafb"
                                 (string-append "v86d=" #$v86d "/sbin/v86d")
                                 "mode_option=1024x768"))))