From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 6OcDDihVyl5FEwAA0tVLHw (envelope-from ) for ; Sun, 24 May 2020 11:06:16 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id MNPeCShVyl6WCAAAB5/wlQ (envelope-from ) for ; Sun, 24 May 2020 11:06:16 +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 9EA2E940C5C for ; Sun, 24 May 2020 11:06:15 +0000 (UTC) Received: from localhost ([::1]:43726 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jcoSL-0007wK-BJ for larch@yhetil.org; Sun, 24 May 2020 07:06:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56902) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jcoOI-0003Gt-Lz for guix-patches@gnu.org; Sun, 24 May 2020 07:02:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:53230) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jcoOI-0007ot-Az for guix-patches@gnu.org; Sun, 24 May 2020 07:02:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jcoOI-0000MO-7b for guix-patches@gnu.org; Sun, 24 May 2020 07:02:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#41011] [PATCH] gnu: grub: Support for network boot via tftp/nfs. Resent-From: Danny Milosavljevic Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 24 May 2020 11:02:02 +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: Mathieu Othacehe , 41011@debbugs.gnu.org Received: via spool by 41011-submit@debbugs.gnu.org id=B41011.15903180691326 (code B ref 41011); Sun, 24 May 2020 11:02:02 +0000 Received: (at 41011) by debbugs.gnu.org; 24 May 2020 11:01:09 +0000 Received: from localhost ([127.0.0.1]:36543 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jcoNQ-0000LK-Se for submit@debbugs.gnu.org; Sun, 24 May 2020 07:01:09 -0400 Received: from dd26836.kasserver.com ([85.13.145.193]:43034) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jcoNN-0000L9-89 for 41011@debbugs.gnu.org; Sun, 24 May 2020 07:01:07 -0400 Received: from localhost (80-110-127-207.cgn.dynamic.surfer.at [80.110.127.207]) by dd26836.kasserver.com (Postfix) with ESMTPSA id AA4E833623B8; Sun, 24 May 2020 13:01:03 +0200 (CEST) Date: Sun, 24 May 2020 13:00:32 +0200 From: Danny Milosavljevic Message-ID: <20200524125859.7efe5169@scratchpost.org> In-Reply-To: <92DB8E2B-1CA2-41AE-9265-53C4F5337686@vodafonemail.de> References: <9AAFEFF4-8ACE-4C95-975F-67C3F4FDAF81@vodafonemail.de> <87a72gi4kz.fsf@gmail.com> <1179D890-7D6C-43D8-A286-DA7A0F61D585@vodafonemail.de> <87h7w7cc55.fsf@gnu.org> <92DB8E2B-1CA2-41AE-9265-53C4F5337686@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_/6HHy1=B/.9DoMaLvGG0Kt7G"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -1.7 (-) 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: 0.39 X-TUID: o7rysNAM4fAS --Sig_/6HHy1=B/.9DoMaLvGG0Kt7G Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Stefan, On Sun, 24 May 2020 12:18:38 +0200 Stefan wrote: > But I=E2=80=99m not sure, if the field bootloader-name can be dropped the= n[after adding bootloader-configuration-file to boot-parameters] from . But if, then we could probably also drop the field name from = the record.=20 We definitely can't drop it. The name is required in order to know which bootloader to restore when deleting system generations. After all you coul= d be deleting the generation that switched from extlinux to grub. How to boot t= hen? (see lookup-bootloader-by-name call site) Since we are trying to have the bootloader to use part of the Guix system configuration (for better or for worse), we have to be really careful to pick the right bootloader and generate the configuration for the right bootloader, otherwise the computer won't boot anymore *and* you couldn't select the before-fuckup generation anymore either. > 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 work. 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 >In it seems =E2=80=93 but I=E2=80=99m not sure yet =E2= =80=93 that we only keep a symbol name to figure out the path to the grub.c= fg, although it is possible to just put that path directly there instead. A= nd using the symbol makes it hard do get a configurable bootloader: A new b= ootloader has to be a variable, tricks with macros come up. Also inheriting= from a bootloader and overwriting the configuration-file field =E2=80=93 f= or whatever reason =E2=80=93 is problematic: It seems to work at the beginn= ing, but only fails badly when removing a system generation. It seems to ha= ve subtle bugs. It=E2=80=99s not usable like other parts in guix. It=E2=80= =99s not hackable. I=E2=80=99d really prefer to change this. Yeah, well... that is the only way we could think of to make sure it actua= lly boots in all cases, as it is right now. (Though if the user had custom entries, that would nuke all of them--but that's still better than not being able to boot at all) Using a symbol was to make it clear that this is supposed to be a reference to an actual variable and not some weird mini-programming language inside a string or whatever. It would be better to have some kind of abstract representation of *all* the bootloader things one could want, in Guix in config.scm. That would make Guix system a lot more complicated, though (chainloading bootloaders for one--I saw you working on this, too). Just to be clear, I'm fine with changing boot-parameters, but be very very careful that all old versions of Guix and new versions of Guix can handle all the boot-parameters--at least falling back to something. It's not fun if you can't boot anymore. Source: I modified a lot of that stuff and wasn't able to boot quite often until I finally stopped overcomplicating the boot-parameters. >Actually there is a problem with all this in guix: There is (bootloader (t= arget =E2=80=A6)), >which gives the impression that one is able to freely chose a folder for t= he >bootloader files. However, the path =E2=80=9C/boot/grub.cfg=E2=80=9D is ki= nd of hard coded. Could you elaborate why having that hard-coded file path is bad? It makes booting a lot more resilient if it's hard-coded as opposed to havi= ng basic stuff like that configurable--and being careful all the time it's actually configured correctly for all the parties to it, some of them maybe not even inside Guix. --Sig_/6HHy1=B/.9DoMaLvGG0Kt7G Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAl7KU9AACgkQ5xo1VCww uqUgcggAktmn9d/OWm+RkfK/Iv1iq6gO1IJbWBzmX9pjbH2hTnPyMsiR0Tw8nbEG I17LQHLY9/T+KfjygpvXPtRazByP5t4/B3ga+FPxQnaFcWXvOQprDyQgtzOFnQiG 4vXo3NqVWCcB/2tuRehhrdwkUMZ3gna+fgaRYlB8zSEiWCw7HlQAFcGJb05h1x5w gCkQEelaNBK+9cnjyjqyP9yEJhQruMfdtY1N3iCNZs2bJSY5jgMCsRe6ZrS3bSpy GiQh47gORJqePheNdnXjcws83Jtb8DDEwzJxIOxILtkpHs6mjtaOk4sP0lXay0+Z fR5L1ZQyXw1w3eYL5WsR1b4vDFDTyg== =Tih4 -----END PGP SIGNATURE----- --Sig_/6HHy1=B/.9DoMaLvGG0Kt7G--