diff options
author | Marius Bakke <mbakke@fastmail.com> | 2019-03-14 16:30:19 +0100 |
---|---|---|
committer | Marius Bakke <mbakke@fastmail.com> | 2019-03-14 16:30:19 +0100 |
commit | 19008a22d18e772062952034c58a15ed341df3b5 (patch) | |
tree | 3a7fb9b4abe5cbac3f7edd5d5c76abd993fad255 /gnu/system | |
parent | 520ae432d446010ed6a5233c8abfda88a945926c (diff) | |
parent | c958c31caefb20c32cf89caea7d4668d7021a92b (diff) | |
download | guix-19008a22d18e772062952034c58a15ed341df3b5.tar.gz |
Merge branch 'staging' into core-updates
Diffstat (limited to 'gnu/system')
-rw-r--r-- | gnu/system/examples/vm-image.tmpl | 2 | ||||
-rw-r--r-- | gnu/system/install.scm | 2 | ||||
-rw-r--r-- | gnu/system/linux-container.scm | 14 | ||||
-rw-r--r-- | gnu/system/mapped-devices.scm | 57 | ||||
-rw-r--r-- | gnu/system/vm.scm | 6 |
5 files changed, 41 insertions, 40 deletions
diff --git a/gnu/system/examples/vm-image.tmpl b/gnu/system/examples/vm-image.tmpl index 4d292c1bc6..6dc67b0901 100644 --- a/gnu/system/examples/vm-image.tmpl +++ b/gnu/system/examples/vm-image.tmpl @@ -8,7 +8,7 @@ (define vm-image-motd (plain-file "motd" " This is the GNU system. Welcome! -This instance of GuixSD is a bare-bones template for virtualized environments. +This instance of Guix System is a bare-bones template for virtualized environments. You will probably want to do these things first if you booted in a virtual private server (VPS): diff --git a/gnu/system/install.scm b/gnu/system/install.scm index 0ba2066d11..bad318d06b 100644 --- a/gnu/system/install.scm +++ b/gnu/system/install.scm @@ -353,7 +353,7 @@ You have been warned. Thanks for being so brave.\x1b[0m ;; the appropriate one. (cons* (file-system (mount-point "/") - (device (file-system-label "GuixSD_image")) + (device (file-system-label "Guix_image")) (type "ext4")) ;; Make /tmp a tmpfs instead of keeping the overlayfs. This diff --git a/gnu/system/linux-container.scm b/gnu/system/linux-container.scm index bceea41332..3fe3482d7f 100644 --- a/gnu/system/linux-container.scm +++ b/gnu/system/linux-container.scm @@ -1,6 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2015 David Thompson <davet@gnu.org> -;;; Copyright © 2016, 2017 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2016, 2017, 2019 Ludovic Courtès <ludo@gnu.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -28,6 +28,7 @@ #:use-module (guix modules) #:use-module (gnu build linux-container) #:use-module (gnu services) + #:use-module (gnu services base) #:use-module (gnu system) #:use-module (gnu system file-systems) #:export (system-container @@ -54,8 +55,19 @@ containerized OS." (file-system (inherit (file-system-mapping->bind-mount fs)) (needed-for-boot? #t))) + (define useless-services + ;; Services that make no sense in a container. Those that attempt to + ;; access /dev/tty[0-9] in particular cannot work in a container. + (list console-font-service-type + mingetty-service-type + agetty-service-type)) + (operating-system (inherit os) (swap-devices '()) ; disable swap + (services (remove (lambda (service) + (memq (service-kind service) + useless-services)) + (operating-system-user-services os))) (file-systems (append (map mapping->fs (cons %store-mapping mappings)) %container-file-systems user-file-systems)))) diff --git a/gnu/system/mapped-devices.scm b/gnu/system/mapped-devices.scm index a874666463..7c58f876a3 100644 --- a/gnu/system/mapped-devices.scm +++ b/gnu/system/mapped-devices.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2014, 2015, 2016, 2017, 2018 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2016 Andreas Enge <andreas@enge.fr> ;;; Copyright © 2017, 2018 Mark H Weaver <mhw@netris.org> ;;; @@ -32,8 +32,7 @@ #:use-module (gnu system uuid) #:autoload (gnu build file-systems) (find-partition-by-luks-uuid) #:autoload (gnu build linux-modules) - (device-module-aliases matching-modules known-module-aliases - normalize-module-name file-name->module-name) + (missing-modules) #:autoload (gnu packages cryptsetup) (cryptsetup-static) #:autoload (gnu packages linux) (mdadm-static) #:use-module (srfi srfi-1) @@ -118,37 +117,27 @@ (define (check-device-initrd-modules device linux-modules location) "Raise an error if DEVICE needs modules beyond LINUX-MODULES to operate. DEVICE must be a \"/dev\" file name." - (define aliases - ;; Attempt to load 'modules.alias' from the current kernel, assuming we're - ;; on GuixSD, and assuming that corresponds to the kernel we'll be - ;; installing. Skip the whole thing if that file cannot be read. + (define missing + ;; Attempt to determine missing modules. (catch 'system-error (lambda () - (known-module-aliases)) - (const #f))) - - (when aliases - (let* ((modules (delete-duplicates - (append-map (cut matching-modules <> aliases) - (device-module-aliases device)))) - - ;; Module names (not file names) are supposed to use underscores - ;; instead of hyphens. MODULES is a list of module names, whereas - ;; LINUX-MODULES is file names without '.ko', so normalize them. - (provided (map file-name->module-name linux-modules)) - (missing (remove (cut member <> provided) modules))) - (unless (null? missing) - ;; Note: What we suggest here is a list of module names (e.g., - ;; "usb_storage"), not file names (e.g., "usb-storage.ko"). This is - ;; OK because we have machinery that accepts both the hyphen and the - ;; underscore version. - (raise (condition - (&message - (message (format #f (G_ "you may need these modules \ + (missing-modules device linux-modules)) + + ;; If we can't do that (e.g., EPERM), skip the whole thing. + (const '()))) + + (unless (null? missing) + ;; Note: What we suggest here is a list of module names (e.g., + ;; "usb_storage"), not file names (e.g., "usb-storage.ko"). This is + ;; OK because we have machinery that accepts both the hyphen and the + ;; underscore version. + (raise (condition + (&message + (message (format #f (G_ "you may need these modules \ in the initrd for ~a:~{ ~a~}") - device missing))) - (&fix-hint - (hint (format #f (G_ "Try adding them to the + device missing))) + (&fix-hint + (hint (format #f (G_ "Try adding them to the @code{initrd-modules} field of your @code{operating-system} declaration, along these lines: @@ -161,9 +150,9 @@ these lines: If you think this diagnostic is inaccurate, use the @option{--skip-checks} option of @command{guix system}.\n") - missing))) - (&error-location - (location (source-properties->location location))))))))) + missing))) + (&error-location + (location (source-properties->location location))))))) ;;; diff --git a/gnu/system/vm.scm b/gnu/system/vm.scm index e09c687a04..e561285964 100644 --- a/gnu/system/vm.scm +++ b/gnu/system/vm.scm @@ -463,8 +463,8 @@ the image." "Build a docker image. OS is the desired <operating-system>. NAME is the base name to use for the output file. When REGISTER-CLOSURES? is not #f, register the closure of OS with Guix in the resulting Docker image. This only -makes sense when you want to build a GuixSD Docker image that has Guix -installed inside of it. If you don't need Guix (e.g., your GuixSD Docker +makes sense when you want to build a Guix System Docker image that has Guix +installed inside of it. If you don't need Guix (e.g., your Docker image just contains a web server that is started by the Shepherd), then you should set REGISTER-CLOSURES? to #f." (define schema @@ -610,7 +610,7 @@ to USB sticks meant to be read-only." (define root-label ;; Volume name of the root file system. - (normalize-label "GuixSD_image")) + (normalize-label "Guix_image")) (define root-uuid ;; UUID of the root file system, computed in a deterministic fashion. |