diff --git a/doc/guix.texi b/doc/guix.texi index 2267fadd1db99843e1abef4b516b070724965c72..3c33a19decddf4eaa1aa8c2c9858e29f0cdb0ad5 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -8241,8 +8241,8 @@ in particular: @itemize @item -Make sure the @code{grub-configuration} form refers to the target you -want to install GRUB on. It should mention @code{grub-bootloader} if +Make sure the @code{bootloader-configuration} form refers to the target +you want to install GRUB on. It should mention @code{grub-bootloader} if you are installing GRUB in the legacy way, or @code{grub-efi-bootloader} for newer UEFI systems. For legacy systems, the @code{target} field names a device, like @code{/dev/sda}; for UEFI systems it names a path diff --git a/gnu/system/examples/vm-image.tmpl b/gnu/system/examples/vm-image.tmpl index 056b439c5fc758c06e97af3107ab25dacea858b2..ce3653c8b4a48bc1579236cb99bdb80e975f0e8d 100644 --- a/gnu/system/examples/vm-image.tmpl +++ b/gnu/system/examples/vm-image.tmpl @@ -26,8 +26,10 @@ partprobe, and then 2) resizing the filesystem with resize2fs.\n")) ;; Assuming /dev/sdX is the target hard disk, and "my-root" is ;; the label of the target root file system. - (bootloader (grub-configuration (target "/dev/sda") - (terminal-outputs '(console)))) + (bootloader (bootloader-configuration + (bootloader grub-bootloader) + (target "/dev/sda") + (terminal-outputs '(console)))) (file-systems (cons (file-system (device "my-root") (title 'label) diff --git a/gnu/system/install.scm b/gnu/system/install.scm index 78f2bf3a13924d1ab060359a5f75156b2e5f5a5f..2e4dd05bb2ed5d7eac929331bc3ea64042f93294 100644 --- a/gnu/system/install.scm +++ b/gnu/system/install.scm @@ -3,6 +3,7 @@ ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org> ;;; Copyright © 2016 Andreas Enge <andreas@enge.fr> ;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com> +;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr> ;;; ;;; This file is part of GNU Guix. ;;; @@ -301,7 +302,9 @@ (define installation-os (host-name "gnu") (timezone "Europe/Paris") (locale "en_US.utf8") - (bootloader (grub-configuration (target "/dev/sda"))) + (bootloader (bootloader-configuration + (bootloader grub-bootloader) + (target "/dev/sda"))) (file-systems ;; Note: the disk image build code overrides this root file system with ;; the appropriate one. diff --git a/gnu/tests.scm b/gnu/tests.scm index 97b9cc5107c0f808e2197fe4f88ae4ac196d7cc4..0caa922fdfb1ebafbef0f143953d2144fc11b10b 100644 --- a/gnu/tests.scm +++ b/gnu/tests.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2016, 2017 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com> +;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr> ;;; ;;; This file is part of GNU Guix. ;;; @@ -21,6 +22,7 @@ (define-module (gnu tests) #:use-module (guix gexp) #:use-module (guix utils) #:use-module (guix records) + #:use-module (gnu bootloader) #:use-module (gnu bootloader grub) #:use-module (gnu system) #:use-module (gnu system file-systems) @@ -206,7 +208,9 @@ (define %simple-os (timezone "Europe/Berlin") (locale "en_US.UTF-8") - (bootloader (grub-configuration (target "/dev/sdX"))) + (bootloader (bootloader-configuration + (bootloader grub-bootloader) + (target "/dev/sdX"))) (file-systems (cons (file-system (device "my-root") (title 'label) diff --git a/gnu/tests/install.scm b/gnu/tests/install.scm index 0e97de0a878a62e0d7b69874aea96acc67fadc97..3ac4a579da1dc793315122e02eea2bd74edd8ccb 100644 --- a/gnu/tests/install.scm +++ b/gnu/tests/install.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2016, 2017 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr> ;;; ;;; This file is part of GNU Guix. ;;; @@ -60,7 +61,9 @@ (define-os-with-source (%minimal-os %minimal-os-source) (timezone "Europe/Paris") (locale "en_US.UTF-8") - (bootloader (grub-configuration (target "/dev/vdb"))) + (bootloader (bootloader-configuration + (bootloader grub-bootloader) + (target "/dev/vdb"))) (kernel-arguments '("console=ttyS0")) (file-systems (cons (file-system (device "my-root") @@ -343,7 +346,9 @@ (define-os-with-source (%minimal-os-on-vda %minimal-os-on-vda-source) (timezone "Europe/Paris") (locale "en_US.UTF-8") - (bootloader (grub-configuration (target "/dev/vda"))) + (bootloader (bootloader-configuration + (bootloader grub-bootloader) + (target "/dev/vda"))) (kernel-arguments '("console=ttyS0")) (file-systems (cons (file-system (device "my-root") @@ -418,7 +423,9 @@ (define-os-with-source (%separate-home-os %separate-home-os-source) (timezone "Europe/Paris") (locale "en_US.utf8") - (bootloader (grub-configuration (target "/dev/vdb"))) + (bootloader (bootloader-configuration + (bootloader grub-bootloader) + (target "/dev/vdb"))) (kernel-arguments '("console=ttyS0")) (file-systems (cons* (file-system (device "my-root") @@ -476,7 +483,9 @@ (define-os-with-source (%separate-store-os %separate-store-os-source) (timezone "Europe/Paris") (locale "en_US.UTF-8") - (bootloader (grub-configuration (target "/dev/vdb"))) + (bootloader (bootloader-configuration + (bootloader grub-bootloader) + (target "/dev/vdb"))) (kernel-arguments '("console=ttyS0")) (file-systems (cons* (file-system (device "root-fs") @@ -552,7 +561,9 @@ (define-os-with-source (%raid-root-os %raid-root-os-source) (timezone "Europe/Paris") (locale "en_US.utf8") - (bootloader (grub-configuration (target "/dev/vdb"))) + (bootloader (bootloader-configuration + (bootloader grub-bootloader) + (target "/dev/vdb"))) (kernel-arguments '("console=ttyS0")) (initrd (lambda (file-systems . rest) ;; Add a kernel module for RAID-0 (aka. "stripe"). @@ -635,7 +646,9 @@ (define-os-with-source (%encrypted-root-os %encrypted-root-os-source) (timezone "Europe/Paris") (locale "en_US.UTF-8") - (bootloader (grub-configuration (target "/dev/vdb"))) + (bootloader (bootloader-configuration + (bootloader grub-bootloader) + (target "/dev/vdb"))) ;; Note: Do not pass "console=ttyS0" so we can use our passphrase prompt ;; detection logic in 'enter-luks-passphrase'. @@ -762,7 +775,9 @@ (define-os-with-source (%btrfs-root-os %btrfs-root-os-source) (timezone "Europe/Paris") (locale "en_US.UTF-8") - (bootloader (grub-configuration (target "/dev/vdb"))) + (bootloader (bootloader-configuration + (bootloader grub-bootloader) + (target "/dev/vdb"))) (kernel-arguments '("console=ttyS0")) (file-systems (cons (file-system (device "my-root") diff --git a/gnu/tests/nfs.scm b/gnu/tests/nfs.scm index 889f578d01859b03dd0ebf7d2d7e2bcedc3e88d9..d58cf7aefd38391712e2e10fe8d0bc42680d242d 100644 --- a/gnu/tests/nfs.scm +++ b/gnu/tests/nfs.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2016, 2017 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2016 John Darrington <jmd@gnu.org> ;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com> +;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr> ;;; ;;; This file is part of GNU Guix. ;;; @@ -20,6 +21,7 @@ (define-module (gnu tests nfs) #:use-module (gnu tests) + #:use-module (gnu bootloader) #:use-module (gnu bootloader grub) #:use-module (gnu system) #:use-module (gnu system file-systems) @@ -41,7 +43,9 @@ (define %base-os (timezone "Europe/Berlin") (locale "en_US.UTF-8") - (bootloader (grub-configuration (target "/dev/sdX"))) + (bootloader (bootloader-configuration + (bootloader grub-bootloader) + (target "/dev/sdX"))) (file-systems %base-file-systems) (users %base-user-accounts) (packages (cons* diff --git a/tests/guix-system.sh b/tests/guix-system.sh index 213864833a8fed9672ac4220a04d23c219184de9..ed8563c8aa2cdac3217cdf5365568f55ceba3f6b 100644 --- a/tests/guix-system.sh +++ b/tests/guix-system.sh @@ -1,5 +1,6 @@ # GNU Guix --- Functional package management for GNU # Copyright © 2014, 2015, 2016, 2017 Ludovic Courtès <ludo@gnu.org> +# Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr> # # This file is part of GNU Guix. # @@ -134,7 +135,9 @@ OS_BASE=' (timezone "Europe/Paris") (locale "en_US.UTF-8") - (bootloader (grub-configuration (device "/dev/sdX"))) + (bootloader (bootloader-configuration + (bootloader grub-bootloader) + (device "/dev/sdX"))) (file-systems (cons (file-system (device "root") (title (string->symbol "label")) @@ -205,7 +208,9 @@ make_user_config () (timezone "Europe/Paris") (locale "en_US.UTF-8") - (bootloader (grub-configuration (device "/dev/sdX"))) + (bootloader (bootloader-configuration + (bootloader grub-bootloader) + (device "/dev/sdX"))) (file-systems (cons (file-system (device "root") (title 'label) diff --git a/tests/system.scm b/tests/system.scm index a661544a5fe00426488647bd699adc5faa718165..6a7f45c59c2236b0ef40bd135ad2adf1dcd97f95 100644 --- a/tests/system.scm +++ b/tests/system.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2016 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr> ;;; ;;; This file is part of GNU Guix. ;;; @@ -36,7 +37,9 @@ (define %os (host-name "komputilo") (timezone "Europe/Berlin") (locale "en_US.utf8") - (bootloader (grub-configuration (target "/dev/sdX"))) + (bootloader (bootloader-configuration + (bootloader grub-bootloader) + (target "/dev/sdX"))) (file-systems (cons %root-fs %base-file-systems)) (users %base-user-accounts))) @@ -51,7 +54,9 @@ (define %os-with-mapped-device (host-name "komputilo") (timezone "Europe/Berlin") (locale "en_US.utf8") - (bootloader (grub-configuration (target "/dev/sdX"))) + (bootloader (bootloader-configuration + (bootloader grub-bootloader) + (target "/dev/sdX"))) (mapped-devices (list %luks-device)) (file-systems (cons (file-system (inherit %root-fs)