summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorAndy Wingo <wingo@igalia.com>2017-08-23 21:48:58 +0200
committerAndy Wingo <wingo@igalia.com>2017-08-23 22:23:19 +0200
commit045ebb3e58d74c75f39ce47380045d3cd00359c3 (patch)
tree2e2b805a7764bd7049bddb417c9d6ccf9ce83653 /gnu
parentba015ce9c04e2cd8e686add647109b514c3fa244 (diff)
gnu: bootloader: Deprecate "device" field in favor of "target".
* gnu/bootloader.scm (<bootloader-configuration>): Deprecate "device" field in favor of "target" field. This is mostly a renaming but also a generalization to support UEFI targets being paths to a mounted partition instead of a device name. * gnu/system/examples/bare-bones.tmpl: * gnu/system/examples/desktop.tmpl: * gnu/system/examples/lightweight-desktop.tmpl: * gnu/system/examples/vm-image.tmpl: * gnu/system/install.scm: * gnu/tests.scm: * gnu/tests/install.scm: * gnu/tests/nfs.scm: * tests/system.scm: Adapt all invocations of bootloader-configuration. * guix/scripts/system.scm (perform-action): Rename device argument to bootloader-target. (process-action): Adapt caller. * doc/guix.texi (Proceeding with the Installation): * doc/guix.texi (Bootloader Configuration): Update documentation.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/bootloader.scm13
-rw-r--r--gnu/system/examples/bare-bones.tmpl2
-rw-r--r--gnu/system/examples/desktop.tmpl2
-rw-r--r--gnu/system/examples/lightweight-desktop.tmpl2
-rw-r--r--gnu/system/examples/vm-image.tmpl2
-rw-r--r--gnu/system/install.scm3
-rw-r--r--gnu/tests.scm2
-rw-r--r--gnu/tests/install.scm14
-rw-r--r--gnu/tests/nfs.scm2
9 files changed, 26 insertions, 16 deletions
diff --git a/gnu/bootloader.scm b/gnu/bootloader.scm
index e080b04568..122e350874 100644
--- a/gnu/bootloader.scm
+++ b/gnu/bootloader.scm
@@ -43,7 +43,7 @@
bootloader-configuration
bootloader-configuration?
bootloader-configuration-bootloader
- bootloader-configuration-device
+ bootloader-configuration-target
bootloader-configuration-menu-entries
bootloader-configuration-default-entry
bootloader-configuration-timeout
@@ -107,6 +107,8 @@
(bootloader bootloader-configuration-bootloader) ; <bootloader>
(device bootloader-configuration-device ; string
(default #f))
+ (target %bootloader-configuration-target ; string
+ (default #f))
(menu-entries bootloader-configuration-menu-entries ; list of <boot-parameters>
(default '()))
(default-entry bootloader-configuration-default-entry ; integer
@@ -126,6 +128,15 @@
(additional-configuration bootloader-configuration-additional-configuration ; record
(default #f)))
+(define (bootloader-configuration-target config)
+ (or (%bootloader-configuration-target config)
+ (let ((device (bootloader-configuration-device config)))
+ (when device
+ (issue-deprecation-warning
+ "The 'device' field of bootloader configurations is deprecated."
+ "Use 'target' instead."))
+ device)))
+
;;;
;;; Bootloaders.
diff --git a/gnu/system/examples/bare-bones.tmpl b/gnu/system/examples/bare-bones.tmpl
index a10ee6e7fe..459d241885 100644
--- a/gnu/system/examples/bare-bones.tmpl
+++ b/gnu/system/examples/bare-bones.tmpl
@@ -14,7 +14,7 @@
;; the label of the target root file system.
(bootloader (bootloader-configuration
(bootloader grub-bootloader)
- (device "/dev/sdX")))
+ (target "/dev/sdX")))
(file-systems (cons (file-system
(device "my-root")
(title 'label)
diff --git a/gnu/system/examples/desktop.tmpl b/gnu/system/examples/desktop.tmpl
index 3cfbd9add6..2131d1f18f 100644
--- a/gnu/system/examples/desktop.tmpl
+++ b/gnu/system/examples/desktop.tmpl
@@ -15,7 +15,7 @@
;; is the label of the target root file system.
(bootloader (bootloader-configuration
(bootloader grub-bootloader)
- (device "/dev/sdX")))
+ (target "/dev/sdX")))
;; Specify a mapped device for the encrypted root partition.
;; The UUID is that returned by 'cryptsetup luksUUID'.
diff --git a/gnu/system/examples/lightweight-desktop.tmpl b/gnu/system/examples/lightweight-desktop.tmpl
index 127ceb4dc5..fb7cfebf6d 100644
--- a/gnu/system/examples/lightweight-desktop.tmpl
+++ b/gnu/system/examples/lightweight-desktop.tmpl
@@ -15,7 +15,7 @@
;; Partition mounted on /boot/efi.
(bootloader (bootloader-configuration
(bootloader grub-efi-bootloader)
- (device "/boot/efi")))
+ (target "/boot/efi")))
;; Assume the target root file system is labelled "my-root".
(file-systems (cons* (file-system
diff --git a/gnu/system/examples/vm-image.tmpl b/gnu/system/examples/vm-image.tmpl
index 57ac71c535..056b439c5f 100644
--- a/gnu/system/examples/vm-image.tmpl
+++ b/gnu/system/examples/vm-image.tmpl
@@ -26,7 +26,7 @@ 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 (device "/dev/sda")
+ (bootloader (grub-configuration (target "/dev/sda")
(terminal-outputs '(console))))
(file-systems (cons (file-system
(device "my-root")
diff --git a/gnu/system/install.scm b/gnu/system/install.scm
index 6837385daf..7f6ffe9582 100644
--- a/gnu/system/install.scm
+++ b/gnu/system/install.scm
@@ -299,8 +299,7 @@ Use Alt-F2 for documentation.
(host-name "gnu")
(timezone "Europe/Paris")
(locale "en_US.utf8")
- (bootloader (grub-configuration
- (device "/dev/sda")))
+ (bootloader (grub-configuration (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 2886a982f4..97b9cc5107 100644
--- a/gnu/tests.scm
+++ b/gnu/tests.scm
@@ -206,7 +206,7 @@ the system under test."
(timezone "Europe/Berlin")
(locale "en_US.UTF-8")
- (bootloader (grub-configuration (device "/dev/sdX")))
+ (bootloader (grub-configuration (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 22e4181ab1..866bf885ce 100644
--- a/gnu/tests/install.scm
+++ b/gnu/tests/install.scm
@@ -59,7 +59,7 @@
(timezone "Europe/Paris")
(locale "en_US.UTF-8")
- (bootloader (grub-configuration (device "/dev/vdb")))
+ (bootloader (grub-configuration (target "/dev/vdb")))
(kernel-arguments '("console=ttyS0"))
(file-systems (cons (file-system
(device "my-root")
@@ -98,7 +98,7 @@
(bootloader (bootloader-configuration
(bootloader extlinux-bootloader-gpt)
- (device "/dev/vdb")))
+ (target "/dev/vdb")))
(kernel-arguments '("console=ttyS0"))
(file-systems (cons (file-system
(device "my-root")
@@ -326,7 +326,7 @@ per %test-installed-os, this test is expensive in terms of CPU and storage.")
(timezone "Europe/Paris")
(locale "en_US.utf8")
- (bootloader (grub-configuration (device "/dev/vdb")))
+ (bootloader (grub-configuration (target "/dev/vdb")))
(kernel-arguments '("console=ttyS0"))
(file-systems (cons* (file-system
(device "my-root")
@@ -384,7 +384,7 @@ partition. In particular, home directories must be correctly created (see
(timezone "Europe/Paris")
(locale "en_US.UTF-8")
- (bootloader (grub-configuration (device "/dev/vdb")))
+ (bootloader (grub-configuration (target "/dev/vdb")))
(kernel-arguments '("console=ttyS0"))
(file-systems (cons* (file-system
(device "root-fs")
@@ -460,7 +460,7 @@ where /gnu lives on a separate partition.")
(timezone "Europe/Paris")
(locale "en_US.utf8")
- (bootloader (grub-configuration (device "/dev/vdb")))
+ (bootloader (grub-configuration (target "/dev/vdb")))
(kernel-arguments '("console=ttyS0"))
(initrd (lambda (file-systems . rest)
;; Add a kernel module for RAID-0 (aka. "stripe").
@@ -543,7 +543,7 @@ by 'mdadm'.")
(timezone "Europe/Paris")
(locale "en_US.UTF-8")
- (bootloader (grub-configuration (device "/dev/vdb")))
+ (bootloader (grub-configuration (target "/dev/vdb")))
;; Note: Do not pass "console=ttyS0" so we can use our passphrase prompt
;; detection logic in 'enter-luks-passphrase'.
@@ -670,7 +670,7 @@ build (current-guix) and then store a couple of full system images.")
(timezone "Europe/Paris")
(locale "en_US.UTF-8")
- (bootloader (grub-configuration (device "/dev/vdb")))
+ (bootloader (grub-configuration (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 2e666b2c08..889f578d01 100644
--- a/gnu/tests/nfs.scm
+++ b/gnu/tests/nfs.scm
@@ -41,7 +41,7 @@
(timezone "Europe/Berlin")
(locale "en_US.UTF-8")
- (bootloader (grub-configuration (device "/dev/sdX")))
+ (bootloader (grub-configuration (target "/dev/sdX")))
(file-systems %base-file-systems)
(users %base-user-accounts)
(packages (cons*