From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 26 12:14:54 2020 Received: (at 41011) by debbugs.gnu.org; 26 Sep 2020 16:14:54 +0000 Received: from localhost ([127.0.0.1]:47652 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kMCqb-0008HO-UR for submit@debbugs.gnu.org; Sat, 26 Sep 2020 12:14:54 -0400 Received: from dd26836.kasserver.com ([85.13.145.193]:57600) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kMCqZ-0008HF-O5 for 41011@debbugs.gnu.org; Sat, 26 Sep 2020 12:14:52 -0400 Received: from localhost (80-110-126-103.cgn.dynamic.surfer.at [80.110.126.103]) by dd26836.kasserver.com (Postfix) with ESMTPSA id E719833683FD; Sat, 26 Sep 2020 18:14:49 +0200 (CEST) Date: Sat, 26 Sep 2020 18:13:57 +0200 From: Danny Milosavljevic To: Stefan Subject: Re: [bug#41011] [PATCH] gnu: grub: Support for network boot via TFTP. Message-ID: <20200926181357.1aa2faa4@scratchpost.org> In-Reply-To: <066A5D57-B0B1-4FF4-B07B-1A5030AA789F@vodafonemail.de> References: <9AAFEFF4-8ACE-4C95-975F-67C3F4FDAF81@vodafonemail.de> <20200906163559.1b56c36f@scratchpost.org> <45F0D825-F888-42E9-BDAE-7BB6FA010A6E@vodafonemail.de> <20200909003732.5c401932@scratchpost.org> <20200914065911.GB1717@E5400> <20200916075117.GE19874@E5400> <5C85E809-92D7-48F2-A8E2-2DF57460A6D9@vodafonemail.de> <2A23E912-6919-4A4A-A4CC-0C5FB1A5D5C1@vodafonemail.de> <066A5D57-B0B1-4FF4-B07B-1A5030AA789F@vodafonemail.de> X-Mailer: Claws Mail 3.17.5 (GTK+ 2.24.32; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/oRnESS6NO63ZjXFqMtTBmDa"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 41011 Cc: 41011@debbugs.gnu.org, Efraim Flashner 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.7 (-) --Sig_/oRnESS6NO63ZjXFqMtTBmDa Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Hi Stefan, I think this is almost ready to be merged. There's still one thing I'm unclear about. I tested it this way: (1) create ~/config.scm with the following contents: (use-modules (gnu)) (operating-system (timezone "UTC") (bootloader (bootloader-configuration (bootloader grub-efi-netboot-bootloader) (target "/boot"))) (file-systems (cons* (file-system (mount-point "/") (device ":/foo") (type "nfs")) %base-file-systems)) (host-name "client1")) (2) mkdir ~/tf (3) ./pre-inst-env guix system init ~/config.scm ~/tf Now, ~/tf contains the system to be booted over the network, right? But ~/tf/boot/efi/Guix/grub.cfg points to the tftp machine's /boot . Is that a bug? Shouldn't it point to the /boot of ~/tf, the system to be booted? Likewise, the gnu store directly inside ~/tf is not used, but ~/tf/boot/gnu points to the tftp machines's /gnu. Shouldn't it point to the former? On Sat, 26 Sep 2020 12:54:00 +0200 Stefan wrote: > + (let* ((net-dir (string-append mount-point target "/")) > + (sub-dir (string-append net-dir #$subdir "/")) > + (store-link (string-append net-dir (%store-prefix))) > + (grub-cfg "/boot/grub/grub.cfg") Shouldn't that be (string-append mount-point "/boot/grub/grub.cfg") ? > + (grub-cfg-link (string-append sub-dir (basename grub-cfg= ))) > + (boot-efi-link (string-append sub-dir #$boot-efi-link))) > + ;; Prepare the symlink to the store. > + (mkdir-p (dirname store-link)) > + (false-if-exception (delete-file store-link)) > + (symlink-relative (%store-prefix) store-link) Shouldn't that be (symlink-relative (string-append mount-point (%store-prefix)) store-link) ? > + ;; Install GRUB, which refers to the grub.cfg, with support f= or > + ;; encrypted partitions, > + (setenv "GRUB_ENABLE_CRYPTODISK" "y") > + (invoke/quiet (string-append bootloader "/bin/grub-mknetdir") > + (string-append "--net-directory=3D" net-dir) > + (string-append "--subdir=3D" #$subdir)) > + ;; Prepare the symlink to the grub.cfg, which points into the= store. > + (false-if-exception (delete-file grub-cfg-link)) > + (symlink-relative grub-cfg grub-cfg-link) > + ;; Prepare the bootloader symlink, which points to GRUB. > + (false-if-exception (delete-file boot-efi-link)) > + (symlink #$efi-bootloader boot-efi-link)))))) Okay. --Sig_/oRnESS6NO63ZjXFqMtTBmDa Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAl9vaMUACgkQ5xo1VCww uqXAMwgAhoOQD30qdQ58+VfnoS8bv2fUxKD351NxlQb9N/7BnTEhR0gfQUTfl6ab FgWSfuF5cRT2sl2jM9JlTvhTBcH1TDgk4XisOvbgQykZtYLloA07Pl5BQihsqcAk HMOWj1RYuPSxc684EGtRviMHrzNucROEwmUg1hsmnTEjVnAIWLb5URPBi0D294pi sf1IBd9bakDt5Um0DJ9uFfWdFvC3cm2+TGWr57NRNtequ9KkaytdqlCG3ORk7RrF /4+jARfqqIZp9/l3+EWZh4em0Yd+UHtylFBf6zKHJgPxJQO9QVZbwR7UWd4ZZApE bO6FEfPXpknFuUG6WXFTerl9apSd9Q== =4/QB -----END PGP SIGNATURE----- --Sig_/oRnESS6NO63ZjXFqMtTBmDa--