From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35778) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fXBNh-0007Z7-W7 for guix-patches@gnu.org; Sun, 24 Jun 2018 16:13:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fXBNe-0004Mq-Kp for guix-patches@gnu.org; Sun, 24 Jun 2018 16:13:05 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:54461) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fXBNe-0004Mi-Gm for guix-patches@gnu.org; Sun, 24 Jun 2018 16:13:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fXBNe-0006Vf-B6 for guix-patches@gnu.org; Sun, 24 Jun 2018 16:13:02 -0400 Subject: [bug#31959] [PATCH] bootloader: grub-efi: Support EFI directories relative to MOUNT-POINT. Resent-Message-ID: Received: from eggs.gnu.org ([2001:4830:134:3::10]:34396) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fXBMU-00079b-FT for guix-patches@gnu.org; Sun, 24 Jun 2018 16:11:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fXBMR-0003Bu-1D for guix-patches@gnu.org; Sun, 24 Jun 2018 16:11:50 -0400 Received: from out2-smtp.messagingengine.com ([66.111.4.26]:50259) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fXBMQ-00035P-31 for guix-patches@gnu.org; Sun, 24 Jun 2018 16:11:46 -0400 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 773A820DDC for ; Sun, 24 Jun 2018 16:11:44 -0400 (EDT) Received: from localhost (ti0005a400-0034.bb.online.no [88.91.194.35]) by mail.messagingengine.com (Postfix) with ESMTPA id F3B22E4434 for ; Sun, 24 Jun 2018 16:11:43 -0400 (EDT) From: Marius Bakke Date: Sun, 24 Jun 2018 22:11:41 +0200 Message-Id: <20180624201141.29124-1-mbakke@fastmail.com> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 31959@debbugs.gnu.org * gnu/bootloader/grub.scm (install-grub-efi): When MOUNT-POINT/EFI-DIR exists, install there rather than EFI-DIR directly. --- gnu/bootloader/grub.scm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/gnu/bootloader/grub.scm b/gnu/bootloader/grub.scm index a131f3b50..8371888fa 100644 --- a/gnu/bootloader/grub.scm +++ b/gnu/bootloader/grub.scm @@ -387,12 +387,17 @@ 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)) + "--efi-directory" target-esp)) (error "failed to install GRUB (EFI)"))))) -- 2.18.0