diff options
| author | Marius Bakke <mbakke@fastmail.com> | 2018-06-23 23:38:18 +0200 |
|---|---|---|
| committer | Marius Bakke <mbakke@fastmail.com> | 2018-06-26 17:27:40 +0200 |
| commit | aa5a549c65485ff826267a48795c1564af17f1c9 (patch) | |
| tree | 38a43c25e2df5925556ee1dccc6c0391b405d902 /gnu | |
| parent | 88d4a9c2be12a754a99b3c4f8dc125a33be70927 (diff) | |
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.
Diffstat (limited to 'gnu')
| -rw-r--r-- | gnu/bootloader/grub.scm | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/gnu/bootloader/grub.scm b/gnu/bootloader/grub.scm index a131f3b5062..8371888fa58 100644 --- a/gnu/bootloader/grub.scm +++ b/gnu/bootloader/grub.scm | |||
| @@ -387,12 +387,17 @@ submenu \"GNU system, old configurations...\" {~%") | |||
| 387 | ;; Install GRUB onto the EFI partition mounted at EFI-DIR, for the | 387 | ;; Install GRUB onto the EFI partition mounted at EFI-DIR, for the |
| 388 | ;; system whose root is mounted at MOUNT-POINT. | 388 | ;; system whose root is mounted at MOUNT-POINT. |
| 389 | (let ((grub-install (string-append bootloader "/sbin/grub-install")) | 389 | (let ((grub-install (string-append bootloader "/sbin/grub-install")) |
| 390 | (install-dir (string-append mount-point "/boot"))) | 390 | (install-dir (string-append mount-point "/boot")) |
| 391 | ;; When installing GuixSD, it's common to mount EFI-DIR below | ||
| 392 | ;; MOUNT-POINT rather than /boot/efi on the live image. | ||
| 393 | (target-esp (if (file-exists? (string-append mount-point efi-dir)) | ||
| 394 | (string-append mount-point efi-dir) | ||
| 395 | efi-dir))) | ||
| 391 | ;; Tell 'grub-install' that there might be a LUKS-encrypted /boot or | 396 | ;; Tell 'grub-install' that there might be a LUKS-encrypted /boot or |
| 392 | ;; root partition. | 397 | ;; root partition. |
| 393 | (setenv "GRUB_ENABLE_CRYPTODISK" "y") | 398 | (setenv "GRUB_ENABLE_CRYPTODISK" "y") |
| 394 | (unless (zero? (system* grub-install "--boot-directory" install-dir | 399 | (unless (zero? (system* grub-install "--boot-directory" install-dir |
| 395 | "--efi-directory" efi-dir)) | 400 | "--efi-directory" target-esp)) |
| 396 | (error "failed to install GRUB (EFI)"))))) | 401 | (error "failed to install GRUB (EFI)"))))) |
| 397 | 402 | ||
| 398 | 403 | ||
