From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id wORnNJvayF4YMwAA0tVLHw (envelope-from ) for ; Sat, 23 May 2020 08:11:07 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id AOlFMJvayF6pTQAA1q6Kng (envelope-from ) for ; Sat, 23 May 2020 08:11:07 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 54A8D9404CA for ; Sat, 23 May 2020 08:11:07 +0000 (UTC) Received: from localhost ([::1]:57486 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jcPFJ-0004ag-PW for larch@yhetil.org; Sat, 23 May 2020 04:11:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34550) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jcPFG-0004aW-6q for guix-patches@gnu.org; Sat, 23 May 2020 04:11:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:50032) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jcPFF-0003pM-UC for guix-patches@gnu.org; Sat, 23 May 2020 04:11:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jcPFF-0002bY-QK for guix-patches@gnu.org; Sat, 23 May 2020 04:11:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#41011] [PATCH] gnu: grub: Support for network boot via tftp/nfs. Resent-From: Mathieu Othacehe Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 23 May 2020 08:11:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41011 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Stefan Cc: 41011@debbugs.gnu.org Received: via spool by 41011-submit@debbugs.gnu.org id=B41011.15902214279972 (code B ref 41011); Sat, 23 May 2020 08:11:01 +0000 Received: (at 41011) by debbugs.gnu.org; 23 May 2020 08:10:27 +0000 Received: from localhost ([127.0.0.1]:33345 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jcPEg-0002am-UE for submit@debbugs.gnu.org; Sat, 23 May 2020 04:10:27 -0400 Received: from eggs.gnu.org ([209.51.188.92]:55350) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jcPEg-0002ab-3l for 41011@debbugs.gnu.org; Sat, 23 May 2020 04:10:26 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:40216) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jcPEY-0003Zs-Kd; Sat, 23 May 2020 04:10:18 -0400 Received: from [2a01:e0a:fa:a50:7ced:409d:b570:ed70] (port=38334 helo=meru) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jcPEY-0001oY-0O; Sat, 23 May 2020 04:10:18 -0400 From: Mathieu Othacehe References: <9AAFEFF4-8ACE-4C95-975F-67C3F4FDAF81@vodafonemail.de> <87a72gi4kz.fsf@gmail.com> <1179D890-7D6C-43D8-A286-DA7A0F61D585@vodafonemail.de> <0CE089DD-54B6-43AD-8CE7-8EC7004768EB@vodafonemail.de> Date: Sat, 23 May 2020 10:10:16 +0200 In-Reply-To: (Stefan's message of "Thu, 21 May 2020 20:40:44 +0200") Message-ID: <87d06vcbrr.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -3.3 (---) X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Spam-Score: -1.01 X-TUID: b9GLEZqgoC5m Hey Stefan, Thanks for rebasing! > + #~(lambda (bootloader target mount-point) > + "Install GRUB as e.g. \"bootx64.efi\" or \"bootarm64.efi\" \"into > +EFI-SUBDIR, which is usually \"efi/boot\" or \"efi/Guix\" below the directory Is that TARGET or EFI-SUBDIR? > +TARGET for the system whose root is mounted at MOUNT-POINT." > + (let* ((mount-point-list (delete "" (string-split mount-point #\/))) > + (target-list (delete "" (string-split target #\/))) > + (net-dir > + (string-append "/" (string-join (append > + mount-point-list > + target-list) > + "/"))) I think you can use something like "(in-vicinity mount-point target)" to do the same job. > + ;; Tell 'grub-install' that there might be a LUKS-encrypted /boot or > + ;; root partition. > + (setenv "GRUB_ENABLE_CRYPTODISK" "y") > + (invoke/quiet (string-append bootloader "/bin/grub-mknetdir") > + (string-append "--net-directory=" net-dir) > + (string-append "--subdir=" subdir)) > + (false-if-exception > + (delete-file efi-bootloader-link)) > + (symlink #$efi-bootloader > + efi-bootloader-link) > + (false-if-exception > + (delete-file store-link)) > + (symlink store > + store-link))))) What's the purpose of those two symlinks, isn't grub-mknetdir taking care of all this? Creating a system test for this may be a bit difficult, but if you could add a section in the documentation describing how to setup a 'grub-efi-net-bootloader, that would be great! Thanks, Mathieu