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 MFOmCEqlyl5MZwAA0tVLHw (envelope-from ) for ; Sun, 24 May 2020 16:48:10 +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 EDh3BEqlyl5yZQAAB5/wlQ (envelope-from ) for ; Sun, 24 May 2020 16:48:10 +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 A2F239400C3 for ; Sun, 24 May 2020 16:48:09 +0000 (UTC) Received: from localhost ([::1]:55338 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jctnE-0003pq-Gv for larch@yhetil.org; Sun, 24 May 2020 12:48:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54034) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jctn7-0003oL-V2 for guix-patches@gnu.org; Sun, 24 May 2020 12:48:01 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:55237) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jctn7-00079i-Lg for guix-patches@gnu.org; Sun, 24 May 2020 12:48:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jctn7-0002ho-KF for guix-patches@gnu.org; Sun, 24 May 2020 12:48:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#41011] [PATCH] gnu: grub: Support for network boot via tftp/nfs. Resent-From: Stefan Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 24 May 2020 16:48: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: Danny Milosavljevic Cc: Mathieu Othacehe , 41011@debbugs.gnu.org Received: via spool by 41011-submit@debbugs.gnu.org id=B41011.159033886410373 (code B ref 41011); Sun, 24 May 2020 16:48:01 +0000 Received: (at 41011) by debbugs.gnu.org; 24 May 2020 16:47:44 +0000 Received: from localhost ([127.0.0.1]:38550 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jctmq-0002hE-5h for submit@debbugs.gnu.org; Sun, 24 May 2020 12:47:44 -0400 Received: from vsmx012.vodafonemail.xion.oxcs.net ([153.92.174.90]:47240) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jctmo-0002h1-OL for 41011@debbugs.gnu.org; Sun, 24 May 2020 12:47:43 -0400 Received: from vsmx004.vodafonemail.xion.oxcs.net (unknown [192.168.75.198]) by mta-8-out.mta.xion.oxcs.net (Postfix) with ESMTP id 9DF8DF34F33; Sun, 24 May 2020 16:47:36 +0000 (UTC) Received: from macbook-pro.kuh-wiese.my-router.de (unknown [2.206.141.243]) by mta-8-out.mta.xion.oxcs.net (Postfix) with ESMTPA id D703B19B02F; Sun, 24 May 2020 16:47:29 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) From: Stefan In-Reply-To: <20200524154215.1fdb0a94@scratchpost.org> Date: Sun, 24 May 2020 18:47:28 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <29547D4C-4E43-457D-A836-7EEF417A55B9@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> <20200524125859.7efe5169@scratchpost.org> <078D1EA7-0875-4F24-AA49-D39CCDC77403@vodafonemail.de> <20200524154215.1fdb0a94@scratchpost.org> X-Mailer: Apple Mail (2.3124) X-VADE-STATUS: LEGIT 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.99 X-TUID: HvxkGy4QKDeo Hi Danny! > Am 24.05.2020 um 15:42 schrieb Danny Milosavljevic = : >=20 > You are totally right O_O >=20 > reinstall-bootloader says: >=20 >> ;; Only install bootloader configuration file. >=20 > What happened here? Why?! =46rom my point of o newbie view nothing, this has ever been so. :-) > I think the actual bootloader (any of them those worked before) should = be reinstalled by guix system delete-generations too, but apparently it = doesn't do it right now. > Sounds very dangerous. Doesn't that mean if one changed bootloaders = in the past and then keeps using guix system delete-generations, that = one eventually couldn't boot anymore? O_O I think this may not be needed. The task of the bootloader is to parse = the generated configuration file and load the initrd and kernel. If the = current latest bootloader is able do this, than all is fine. The loaded = system generation does not matter for this. Why should 'guix system switch-generation' or 'guix system = delete-generations' brake anything here, as long as the generated = configuration file is still readable by the bootloader in use? Ah, now I got your point! An older generation now potentially has a = different value in the bootloader-name field of the = record. Then it will generate the wrong bootloader configuration file, = e.g. for extlinux instead of for grub-efi.=20 Well, the bootloader-name information of an older system generation does = not help. > So the "brand new bootloader" case should be fine. > But the delete-generation case basically would have had to do the = actual bootloader installation too. Like it is now, it totally has a = huge problem. >=20 > A possible way around having to know which bootloader is in use would = be to just always install the configurations for all the known = bootloaders. Hm, not sure. >> Maybe the information about the bootloader version in use needs to = reside with the installed bootloader somewhere below /boot/efi/=E2=80=A6? = But this may be impossible for the legacy grub-bootloader. >=20 > That sounds like a huge can of worms to open. Better would be some = kind of bootloader detector (can package "os-prober" do it maybe?)--or = better yet, just also install the bootloader each time a system = generation is deleted and/or system is reconfigured. That was the = original plan. Some information from the installed bootloader could very well be passed = via kernel arguments. This way the bootloader would actively spread = information about itself and this will work with any bootloader.=20 We could use for example these two kernel arguments: --bootloader-configuration-file-generator=3Dgrub-configuration-file = --bootloader-configuration-file=3D/boot/grub.cfg If we =E2=80=93 like today =E2=80=93 do not reinstall the bootloader = when switching generations, these are the needed information: how and = where to generate the configuration file. If the guix in $HOME does not know the passed generator procedure, then = it there would automatically be a fallback: = /var/guix/profiles/system/parameters contains a kernel-arguments field = already! That would contain a matching generator function then. If the = generator is neither in kernel-arguments, then we could fall-back to the = bootloader-name field and even reinstall the bootloader. As it is today, the bootloader is a state. And to reduce the risk of = failures (power-loss), it makes sense to install the bootloader only if = absolutely necessary. Bye Stefan