From debbugs-submit-bounces@debbugs.gnu.org Sat May 23 04:02:40 2020 Received: (at 41011) by debbugs.gnu.org; 23 May 2020 08:02:40 +0000 Received: from localhost ([127.0.0.1]:33326 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jcP6v-0002OR-Cx for submit@debbugs.gnu.org; Sat, 23 May 2020 04:02:40 -0400 Received: from eggs.gnu.org ([209.51.188.92]:54662) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jcP6t-0002OF-JM for 41011@debbugs.gnu.org; Sat, 23 May 2020 04:02:24 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:40115) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jcP6m-0001t2-UF; Sat, 23 May 2020 04:02:16 -0400 Received: from [2a01:e0a:fa:a50:7ced:409d:b570:ed70] (port=38194 helo=meru) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jcP6m-0003iT-94; Sat, 23 May 2020 04:02:16 -0400 From: Mathieu Othacehe To: Stefan Subject: Re: [bug#41011] [PATCH] gnu: grub: Support for network boot via tftp/nfs. References: <9AAFEFF4-8ACE-4C95-975F-67C3F4FDAF81@vodafonemail.de> <87a72gi4kz.fsf@gmail.com> <1179D890-7D6C-43D8-A286-DA7A0F61D585@vodafonemail.de> Date: Sat, 23 May 2020 10:02:14 +0200 In-Reply-To: <1179D890-7D6C-43D8-A286-DA7A0F61D585@vodafonemail.de> (Stefan's message of "Sun, 10 May 2020 23:13:20 +0200") Message-ID: <87h7w7cc55.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 41011 Cc: 41011@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello Stefan, > Yes, it=E2=80=99s kind of possible to inherit from grub-efi-bootloader an= d overwrite the (configuration-file) field. In a first step this seems to w= ork. But when e.g. deleting a system generation, in guix/scripts/system.scm= (reinstall-bootloader) there is this code: > > ;; Use the detected bootloader with default configuration. > ;; It will be enough to allow the system to boot. > (bootloader-config (bootloader-configuration > (bootloader bootloader)))=20 > > It reads this information form /var/guix/profiles/system/parameters: (boo= tloader-name grub-efi-bootloader). > With this again the hard-coded path =E2=80=9C/boot/grub.cfg=E2=80=9D of i= s used, ignoring any value overwritten in (configuration-file). Oh, we need to fix that! It means that we would need to add a "bootloader-configuration-file" field to record, is that correct? > Another issue is (install-dir (string-append mount-point "/boot")) in (in= stall-grub-efi), which ignores any (configuration-file) setting, too =E2=80= =93 well, it has no access to that setting =E2=80=93, and implies at least = =E2=80=9C/boot=E2=80=9D to be the prefix of (bootloader (target =E2=80=A6))= .=20 > > Beside the wish to avoid this hard-coded =E2=80=9C/boot=E2=80=9C assumpti= on, I made this a function with two parameters for two more reasons.=20 Could it be an option to infer the bootloader installation directory and the efi subdir from the install-grub-efi/install-grub-efi-net functions? If TARGET is /boot-nfs/efi/Guix", could we suppose that the boot-directory is "/boot-nfs" and the efi-subdir is "efi/Guix"? The make-grub-efi-net-bootloader macro is a nice hack, but I fear that it makes the bootloader configuration (even more) difficult. Thanks, Mathieu