From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41393) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dRjbJ-0002Ax-U7 for guix-patches@gnu.org; Sun, 02 Jul 2017 14:28:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dRjbG-000370-Pr for guix-patches@gnu.org; Sun, 02 Jul 2017 14:28:05 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:46310) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dRjbG-00036l-M3 for guix-patches@gnu.org; Sun, 02 Jul 2017 14:28:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dRjbG-0001L4-Df for guix-patches@gnu.org; Sun, 02 Jul 2017 14:28:02 -0400 Subject: [bug#27529] [PATCH] bootloader: Use for the bootloader side. Resent-Message-ID: Date: Sun, 2 Jul 2017 20:26:56 +0200 From: Danny Milosavljevic Message-ID: <20170702202656.60c2af09@scratchpost.org> In-Reply-To: <8737ae995g.fsf@gnu.org> References: <20170629104259.13537-1-dannym@scratchpost.org> <8737ae995g.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 27529@debbugs.gnu.org Hi Ludo, On Sun, 02 Jul 2017 16:59:55 +0200 ludo@gnu.org (Ludovic Court=C3=A8s) wrote: > Danny Milosavljevic skribis: >=20 > > * gnu/bootloader.scm (menu-entry-device-mount-point): New variable. Ex= port it. > > (: New field "device". > > * gnu/bootloader/grub.scm (grub-confgiuration-file): Handle > > entries. > > * gnu/bootloader/extlinux.scm (extlinux-configuration-file): Handle > > entries. > > * gnu/system.scm (menu->entry->boot-parameters): Delete variable. > > (boot-parameters->menu-entry): New variable. Export it. > > (operating-system-bootcfg): Make OLD-ENTRIES a list of . > > * guix/script/system.scm (reinstall-bootloader): Fix bootcfg usage. > > --- > > gnu/bootloader.scm | 3 +++ > > gnu/bootloader/extlinux.scm | 19 +++++++++---------- > > gnu/bootloader/grub.scm | 27 ++++++++++++--------------- > > gnu/system.scm | 29 ++++++++++++++--------------- > > guix/scripts/system.scm | 10 +++++----- > > 5 files changed, 43 insertions(+), 45 deletions(-) =20 >=20 > Could you explain the rationale? >=20 > IIRC there was the idea that implementations of the bootloader API > should use , and that would be used only > in the user-facing APIs (it had even disappeared with the initial > thing.) Yeah, it's preparation for chainloading support (non-Linux OSes etc). I do= n't feel strongly one way or another but I think those chainloading entries= would actually be menu entries and not really boot-parameters as in Guix-c= an-use-them-for-anything. What this does is use boot-parameters for stuff which Guix needs for itself= , and menu entries (which could be a poem by Goethe as much as Guix cares) = for the rest. *Some* boot-parameters will end up as menu entries, but not = all (for example think of chainloading: There would only be a menu-entry fo= r chainloading, but both a boot-parameter and a (generated) menu-entry for = the Guix Linux kernel). There would be no way to get from a to a beca= use it could as well make no sense to do that. In short, the bootloader would always and only get menu-entries, but the re= mainder of Guix would only use them as support under wobbly chairs or somet= hing :) On the other hand, boot-parameters are things which Guix needs and manages. If we want that (or want it again - it was that way before), this patch wou= ld be a way to do it. If not, I'm fine with it as well. It just bothered = me a bit even when the (otherwise great) multi bootloader support went in t= hat it used boot-parameters as some kind of menu-entry substitute. In the = beginning, was grub-private, so that was the only way to get t= he multi bootloader support to work. But now the is public. = Then why not use it for what it is?