summaryrefslogtreecommitdiff
path: root/gnu/bootloader/grub.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/bootloader/grub.scm')
-rw-r--r--gnu/bootloader/grub.scm26
1 files changed, 16 insertions, 10 deletions
diff --git a/gnu/bootloader/grub.scm b/gnu/bootloader/grub.scm
index 57deaba9127..23c7a820844 100644
--- a/gnu/bootloader/grub.scm
+++ b/gnu/bootloader/grub.scm
@@ -423,18 +423,24 @@ fi~%"))))
423 423
424(define install-grub 424(define install-grub
425 #~(lambda (bootloader device mount-point) 425 #~(lambda (bootloader device mount-point)
426 ;; Install GRUB on DEVICE which is mounted at MOUNT-POINT.
427 (let ((grub (string-append bootloader "/sbin/grub-install")) 426 (let ((grub (string-append bootloader "/sbin/grub-install"))
428 (install-dir (string-append mount-point "/boot"))) 427 (install-dir (string-append mount-point "/boot")))
429 ;; Tell 'grub-install' that there might be a LUKS-encrypted /boot or 428 ;; Install GRUB on DEVICE which is mounted at MOUNT-POINT. If DEVICE
430 ;; root partition. 429 ;; is #f, then we populate the disk-image rooted at MOUNT-POINT.
431 (setenv "GRUB_ENABLE_CRYPTODISK" "y") 430 (if device
432 431 (begin
433 ;; Hide potentially confusing messages from the user, such as 432 ;; Tell 'grub-install' that there might be a LUKS-encrypted
434 ;; "Installing for i386-pc platform." 433 ;; /boot or root partition.
435 (invoke/quiet grub "--no-floppy" "--target=i386-pc" 434 (setenv "GRUB_ENABLE_CRYPTODISK" "y")
436 "--boot-directory" install-dir 435
437 device)))) 436 ;; Hide potentially confusing messages from the user, such as
437 ;; "Installing for i386-pc platform."
438 (invoke/quiet grub "--no-floppy" "--target=i386-pc"
439 "--boot-directory" install-dir
440 device))
441 ;; When creating a disk-image, only install GRUB modules.
442 (copy-recursively (string-append bootloader "/lib/")
443 install-dir)))))
438 444
439(define install-grub-disk-image 445(define install-grub-disk-image
440 #~(lambda (bootloader root-index image) 446 #~(lambda (bootloader root-index image)