From 74f01059cb30827de92f75e99a3bb4ee31c19118 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Fri, 10 Apr 2020 15:43:03 +0200 Subject: vm: 'system-disk-image' honors #:substitutable? for ISO9660 images. This is a followup to a328f66a9e16d7bae765d8bc088e4a97037e6e2b. * gnu/system/vm.scm (iso9660-image): Add #:substitutable? and pass it to 'expression->derivation-in-linux-vm'. (system-disk-image): Pass #:substitutable? to 'iso9660-image'. --- gnu/system/vm.scm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'gnu/system') diff --git a/gnu/system/vm.scm b/gnu/system/vm.scm index 60a41584d0..00c6f0fe38 100644 --- a/gnu/system/vm.scm +++ b/gnu/system/vm.scm @@ -283,7 +283,8 @@ substitutable." bootloader (register-closures? (has-guix-service-type? os)) (inputs '()) - (grub-mkrescue-environment '())) + (grub-mkrescue-environment '()) + (substitutable? #t)) "Return a bootable, stand-alone iso9660 image. INPUTS is a list of inputs (as for packages)." @@ -354,6 +355,7 @@ INPUTS is a list of inputs (as for packages)." #:make-disk-image? #f #:single-file-output? #t #:references-graphs inputs + #:substitutable? substitutable? ;; Xorriso seems to be quite memory-hungry, so increase the VM's RAM size. #:memory-size 512)) @@ -735,7 +737,8 @@ substitutable." #:inputs `(("system" ,os) ("bootcfg" ,bootcfg)) #:grub-mkrescue-environment - '(("MKRESCUE_SED_MODE" . "mbr_hfs"))) + '(("MKRESCUE_SED_MODE" . "mbr_hfs")) + #:substitutable? substitutable?) (qemu-image #:name name #:os os #:bootcfg-drv bootcfg -- cgit v1.2.3 From 557e6820a77b24f8f3f03f28ee473137b1caeb64 Mon Sep 17 00:00:00 2001 From: Florian Pelz Date: Sat, 11 Apr 2020 18:56:37 +0200 Subject: installer: Load uvesafb kernel module. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes . Machines without Kernel Mode Setting (those with many old and current AMD GPUs, SiS GPUs, …) need uvesafb to show the GUI installer. Some may also need a kernel parameter like nomodeset or vga=793, but we leave that for the user to specify in GRUB. * gnu/system/install.scm (uvesafb-shepherd-service): New procedure. (uvesafb-service-type): New variable. (%installation-services): Add it. Co-authored-by: Ludovic Courtès --- gnu/system/install.scm | 42 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) (limited to 'gnu/system') diff --git a/gnu/system/install.scm b/gnu/system/install.scm index c15c2c7814..203a085bcd 100644 --- a/gnu/system/install.scm +++ b/gnu/system/install.scm @@ -4,6 +4,7 @@ ;;; Copyright © 2016 Andreas Enge ;;; Copyright © 2017 Marius Bakke ;;; Copyright © 2017, 2019 Tobias Geerinckx-Rice +;;; Copyright © 2020 Florian Pelz ;;; ;;; This file is part of GNU Guix. ;;; @@ -27,6 +28,7 @@ #:use-module (guix gexp) #:use-module (guix store) #:use-module (guix monads) + #:use-module (guix modules) #:use-module ((guix packages) #:select (package-version)) #:use-module ((guix store) #:select (%store-prefix)) #:use-module (gnu installer) @@ -50,6 +52,7 @@ #:use-module (gnu packages texinfo) #:use-module (gnu packages compression) #:use-module (gnu packages nvi) + #:use-module (gnu packages xorg) #:use-module (ice-9 match) #:use-module (srfi srfi-26) #:export (installation-os @@ -287,6 +290,37 @@ the user's target storage device rather than on the RAM disk." (persistent? #f) (max-database-size (* 5 (expt 2 20)))))) ;5 MiB + +;; These define a service to load the uvesafb kernel module with the +;; 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 _) + (list (shepherd-service + (documentation "Load the uvesafb kernel module.") + (provision '(uvesafb)) + (requirement '(file-systems)) + (start #~(lambda () + ;; uvesafb is only supported on x86 and x86_64. + (or (not (and (string-suffix? "linux-gnu" %host-type) + (or (string-prefix? "x86_64" %host-type) + (string-prefix? "i686" %host-type)))) + (invoke #+(file-append kmod "/bin/modprobe") + "uvesafb" + (string-append "v86d=" #$v86d "/sbin/v86d") + "mode_option=1024x768")))) + (respawn? #f) + (one-shot? #t)))) + +(define uvesafb-service-type + (service-type + (name 'uvesafb) + (extensions + (list (service-extension shepherd-root-service-type + uvesafb-shepherd-service))) + (description + "Load the @code{uvesafb} kernel module with the right options.") + (default-value #t))) + (define %installation-services ;; List of services of the installation system. (let ((motd (plain-file "motd" " @@ -408,7 +442,13 @@ Access documentation at any time by pressing Alt-F2.\x1b[0m (list bare-bones-os glibc-utf8-locales texinfo - (canonical-package guile-2.2)))))) + (canonical-package guile-2.2))) + + ;; Machines without Kernel Mode Setting (those with many old and + ;; current AMD GPUs, SiS GPUs, ...) need uvesafb to show the GUI + ;; installer. Some may also need a kernel parameter like nomodeset + ;; or vga=793, but we leave that for the user to specify in GRUB. + (service uvesafb-service-type)))) (define %issue ;; Greeting. -- cgit v1.2.3 From 0ad60b2a89d6d387236466e0bcdd61ac489fca37 Mon Sep 17 00:00:00 2001 From: Florian Pelz Date: Tue, 14 Apr 2020 14:49:25 +0200 Subject: installer: Only load uvesafb kernel module when needed. This is a follow-up to commit 557e6820a77b24f8f3f03f28ee473137b1caeb64. * gnu/system/install.scm (uvesafb-shepherd-service): Check that /dev/fb0 is not already present. --- gnu/system/install.scm | 1 + 1 file changed, 1 insertion(+) (limited to 'gnu/system') diff --git a/gnu/system/install.scm b/gnu/system/install.scm index 203a085bcd..0965c4d237 100644 --- a/gnu/system/install.scm +++ b/gnu/system/install.scm @@ -304,6 +304,7 @@ the user's target storage device rather than on the RAM disk." (or (not (and (string-suffix? "linux-gnu" %host-type) (or (string-prefix? "x86_64" %host-type) (string-prefix? "i686" %host-type)))) + (file-exists? "/dev/fb0") (invoke #+(file-append kmod "/bin/modprobe") "uvesafb" (string-append "v86d=" #$v86d "/sbin/v86d") -- cgit v1.2.3