summaryrefslogtreecommitdiff
path: root/gnu/bootloader/grub.scm
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2018-06-29 22:51:23 +0200
committerRicardo Wurmus <rekado@elephly.net>2018-06-29 22:51:23 +0200
commitf1728d43460e63b106dd446e70001d8e100eaf6d (patch)
tree9d211fabf9e200743be49e25d108d58ed88d2f60 /gnu/bootloader/grub.scm
parentcda7f4bc8ecf331d623c7d37b01931a46830c648 (diff)
parent373cc3b74a6ad33fddf75c2d773a97b1775bda8e (diff)
Merge branch 'master' into core-updates
Diffstat (limited to 'gnu/bootloader/grub.scm')
-rw-r--r--gnu/bootloader/grub.scm10
1 files changed, 8 insertions, 2 deletions
diff --git a/gnu/bootloader/grub.scm b/gnu/bootloader/grub.scm
index a131f3b506..06856dd58c 100644
--- a/gnu/bootloader/grub.scm
+++ b/gnu/bootloader/grub.scm
@@ -387,12 +387,18 @@ submenu \"GNU system, old configurations...\" {~%")
;; 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")))
+ (install-dir (string-append mount-point "/boot"))
+ ;; When installing GuixSD, it's common to mount EFI-DIR below
+ ;; MOUNT-POINT rather than /boot/efi on the live image.
+ (target-esp (if (file-exists? (string-append mount-point efi-dir))
+ (string-append mount-point efi-dir)
+ efi-dir)))
;; 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))
+ "--bootloader-id=GuixSD"
+ "--efi-directory" target-esp))
(error "failed to install GRUB (EFI)")))))