summaryrefslogtreecommitdiff
path: root/gnu/bootloader
diff options
context:
space:
mode:
authorAndy Wingo <wingo@igalia.com>2017-08-20 10:48:19 +0200
committerAndy Wingo <wingo@igalia.com>2017-08-20 11:16:42 +0200
commit2941b347b664a3d3114de0ac95e28db78db66144 (patch)
tree7615f881b2d26ec94692c975f4b0d7c28da8214b /gnu/bootloader
parent97291c0c7c6bc50aa503f9bf7f9abd97cffae9c9 (diff)
gnu: grub-efi-bootloader: Specialize grub-install invocation.
* gnu/bootloader/grub.scm (install-grub-efi): Fix grub-install invocation for EFI systems. * gnu/system/examples/bare-bones.tmpl: Use the newer "bootloader-configuration" syntax. * gnu/system/examples/desktop.tmpl: Use bootloader-configuration sytax. Also, use the same label for the LUKS-mapped device and the root partition. Remove unneeded "title" field for the file-system based on LUKS; as noted in the manual, the "title" field is ignored for mapped devices. * gnu/system/examples/lightweight-desktop.tmpl: Use bootloader-configuration, and use grub-efi-bootloader.
Diffstat (limited to 'gnu/bootloader')
-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 ef62fe059bd..a9f0875f365 100644
--- a/gnu/bootloader/grub.scm
+++ b/gnu/bootloader/grub.scm
@@ -389,7 +389,20 @@ submenu \"GNU system, old configurations...\" {~%")
389 (unless (zero? (system* grub "--no-floppy" 389 (unless (zero? (system* grub "--no-floppy"
390 "--boot-directory" install-dir 390 "--boot-directory" install-dir
391 device)) 391 device))
392 (error "failed to install GRUB"))))) 392 (error "failed to install GRUB (BIOS)")))))
393
394(define install-grub-efi
395 #~(lambda (bootloader efi-dir mount-point)
396 ;; Install GRUB onto the EFI partition mounted at EFI-DIR, for the
397 ;; system whose root is mounted at MOUNT-POINT.
398 (let ((grub-install (string-append bootloader "/sbin/grub-install"))
399 (install-dir (string-append mount-point "/boot")))
400 ;; Tell 'grub-install' that there might be a LUKS-encrypted /boot or
401 ;; root partition.
402 (setenv "GRUB_ENABLE_CRYPTODISK" "y")
403 (unless (zero? (system* grub-install "--boot-directory" install-dir
404 "--efi-directory" efi-dir))
405 (error "failed to install GRUB (EFI)")))))
393 406
394 407
395 408
@@ -408,6 +421,7 @@ submenu \"GNU system, old configurations...\" {~%")
408(define* grub-efi-bootloader 421(define* grub-efi-bootloader
409 (bootloader 422 (bootloader
410 (inherit grub-bootloader) 423 (inherit grub-bootloader)
424 (installer install-grub-efi)
411 (name 'grub-efi) 425 (name 'grub-efi)
412 (package grub-efi))) 426 (package grub-efi)))
413 427