aboutsummaryrefslogtreecommitdiff
path: root/gnu/bootloader/grub.scm
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2017-08-21 02:40:37 +0200
committerMarius Bakke <mbakke@fastmail.com>2017-08-21 02:40:37 +0200
commit2718a9cd096d0f5ae4b23cc0814a42aee5cf3c4d (patch)
tree334bed3ef9be203d77065a75380696c2537ede92 /gnu/bootloader/grub.scm
parent9c4ce3afac2ad42c832dc7a9f0932744b5fd8892 (diff)
parente904de7ec1789e243e830b19187b5ef550b2eefa (diff)
downloadpatches-2718a9cd096d0f5ae4b23cc0814a42aee5cf3c4d.tar
patches-2718a9cd096d0f5ae4b23cc0814a42aee5cf3c4d.tar.gz
Merge branch 'master' into core-updates
Diffstat (limited to 'gnu/bootloader/grub.scm')
-rw-r--r--gnu/bootloader/grub.scm16
1 files changed, 15 insertions, 1 deletions
diff --git a/gnu/bootloader/grub.scm b/gnu/bootloader/grub.scm
index ef62fe059b..a9f0875f36 100644
--- a/gnu/bootloader/grub.scm
+++ b/gnu/bootloader/grub.scm
@@ -389,7 +389,20 @@ submenu \"GNU system, old configurations...\" {~%")
(unless (zero? (system* grub "--no-floppy"
"--boot-directory" install-dir
device))
- (error "failed to install GRUB")))))
+ (error "failed to install GRUB (BIOS)")))))
+
+(define install-grub-efi
+ #~(lambda (bootloader efi-dir mount-point)
+ ;; Install GRUB onto the EFI partition mounted at EFI-DIR, for the
+ ;; system whose root is mounted at MOUNT-POINT.
+ (let ((grub-install (string-append bootloader "/sbin/grub-install"))
+ (install-dir (string-append mount-point "/boot")))
+ ;; Tell 'grub-install' that there might be a LUKS-encrypted /boot or
+ ;; root partition.
+ (setenv "GRUB_ENABLE_CRYPTODISK" "y")
+ (unless (zero? (system* grub-install "--boot-directory" install-dir
+ "--efi-directory" efi-dir))
+ (error "failed to install GRUB (EFI)")))))
@@ -408,6 +421,7 @@ submenu \"GNU system, old configurations...\" {~%")
(define* grub-efi-bootloader
(bootloader
(inherit grub-bootloader)
+ (installer install-grub-efi)
(name 'grub-efi)
(package grub-efi)))