mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 21:38:07 -05:00
bootloader: grub-efi: Support EFI directories relative to MOUNT-POINT.
* gnu/bootloader/grub.scm (install-grub-efi): When MOUNT-POINT/EFI-DIR exists, install there rather than EFI-DIR directly.
This commit is contained in:
parent
88d4a9c2be
commit
aa5a549c65
1 changed files with 7 additions and 2 deletions
|
@ -387,12 +387,17 @@ (define install-grub-efi
|
|||
;; 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))
|
||||
"--efi-directory" target-esp))
|
||||
(error "failed to install GRUB (EFI)")))))
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue