From unknown Tue Jun 17 20:14:04 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#47442 <47442@debbugs.gnu.org> To: bug#47442 <47442@debbugs.gnu.org> Subject: Status: guix system delete-generations does not use bootloader configuration Reply-To: bug#47442 <47442@debbugs.gnu.org> Date: Wed, 18 Jun 2025 03:14:04 +0000 retitle 47442 guix system delete-generations does not use bootloader config= uration reassign 47442 guix submitter 47442 raid5atemyhomework severity 47442 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 28 00:42:37 2021 Received: (at submit) by debbugs.gnu.org; 28 Mar 2021 04:42:37 +0000 Received: from localhost ([127.0.0.1]:45302 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lQNG1-0003nm-5R for submit@debbugs.gnu.org; Sun, 28 Mar 2021 00:42:37 -0400 Received: from lists.gnu.org ([209.51.188.17]:59248) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lQNFx-0003nd-Cu for submit@debbugs.gnu.org; Sun, 28 Mar 2021 00:42:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36910) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lQNFx-0008Ca-4X for bug-guix@gnu.org; Sun, 28 Mar 2021 00:42:33 -0400 Received: from mail-40137.protonmail.ch ([185.70.40.137]:11988) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lQNFt-00032b-Ue for bug-guix@gnu.org; Sun, 28 Mar 2021 00:42:32 -0400 Date: Sun, 28 Mar 2021 04:42:17 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1616906546; bh=lIPQX2RJfZnPEsKIaTg7hmq48fAlH4vFt3jA5qsMHBQ=; h=Date:To:From:Reply-To:Subject:From; b=FgiPRC9/qtPOsMoMl0N5HbtSUxqmuJfKrCFzhvCCUXcN6D2FZzaHgoPS3qqrgKbqx WW4NcMvPczhBrRJk+6js46zcA/Np0+UuaB99SPxomiOchX/coXIf4bukAC8/SNugpQ dY7PzAITCajrEr5kkZPglIgXBfgdMvACeM+zYp7Q= To: "bug-guix@gnu.org" From: raid5atemyhomework Subject: guix system delete-generations does not use bootloader configuration Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM shortcircuit=no autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on mailout.protonmail.ch Received-SPF: pass client-ip=185.70.40.137; envelope-from=raid5atemyhomework@protonmail.com; helo=mail-40137.protonmail.ch X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: submit 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: , Reply-To: raid5atemyhomework Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Hello, I use a coreboot that does not have a VGA option rom, which means Grub can'= t use `gfxterm`, so I have this setting in my `operating-system`: (bootloader-configuration ; ... (terminal-outputs '(console))) This lets me see a boot menu at startup even without the VGA option rom. However, recently when I did a `guix system delete-generations` to remove s= ome old configurations, I saw to my dismay that the `/boot/grub/grub.cfg` g= ot reverted to `terminal_output gfxterm`. Creating a pointless whitespace change to a daemon configuration file and `= guix system reconfigure` got this fixed. This workaround is undesirable si= nce it makes deleting old generations a multi-step, non-atomic process. The expected behavior is that whatever settings were used in my latest `boo= tloader-configuration` should not be touched by `guix system delete-generat= ions`. The actual behavior is `guix system delete-generations` uses the default co= nfiguration. Looking at the code, it seems to be an issue with `guix/scripts/system.scm`= 's `reinstall-bootloader` function: ```scheme ;; Use the detected bootloader with default configuration. ;; It will be enough to allow the system to boot. (bootloader-config (bootloader-configuration (bootloader bootloader))) ``` While "it will be enough to allow the system to boot", it is not enough for= me, on my specific system, to get a convenient boot menu where I can, you = know, select older systems (absolutely vital due to the brittleness of Shep= herd). On my system, using `terminal_output gfxterm` leads to an "invisibl= e" boot menu, making Guix's vaunted ability to have multiple bootable syste= ms fairly useless --- I can't be sure what system I end up booting into sin= ce I can't see the boot menu. I think on other systems as well that need o= ther terminal outputs (such as some sort of `serial`) this will be a proble= m as well. A possible solution would be to check if the current system has a `provenan= ce`, and if so, to read in the file and look for the `configuration` field.= Then read *that* file and extract its `bootloader` field, and to only fal= l back to a default configuration if that attempt fails. See https://lists= .gnu.org/archive/html/guix-devel/2021-03/msg00294.html for similar idea. W= ould this be an acceptable solution? Thanks raid5atemyhomework From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 28 22:01:41 2021 Received: (at 47442) by debbugs.gnu.org; 29 Mar 2021 02:01:41 +0000 Received: from localhost ([127.0.0.1]:47376 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lQhDp-00046j-DN for submit@debbugs.gnu.org; Sun, 28 Mar 2021 22:01:41 -0400 Received: from mail4.protonmail.ch ([185.70.40.27]:47964) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lQhDn-00046V-8p for 47442@debbugs.gnu.org; Sun, 28 Mar 2021 22:01:40 -0400 Date: Mon, 29 Mar 2021 02:01:24 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1616983292; bh=BSS2zSH736vwnKI7a+4DpUZPrBeSVSkLgY7iaPf4QHc=; h=Date:To:From:Reply-To:Subject:From; b=AVwY6Hvre5fjv/oavVFuo8/Tb/BJvgTctxqoy1jC51lo3425nzZSa9/O0Kwl8bhmB qjFyFs+fPmCigKamQyPG27RxPa6MmOTH8gX50zbR5Glk4hG+C+qYtEw7odUql5+rWd vhddgh4m/1+orbug4/MQbRkoRlBCsu3US5n3Ssvw= To: "47442@debbugs.gnu.org" <47442@debbugs.gnu.org> From: raid5atemyhomework Subject: guix system delete-generations does not use bootloader configuration Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM shortcircuit=no autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on mailout.protonmail.ch X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 47442 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: , Reply-To: raid5atemyhomework Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Note as well that keyboard layouts at Grub time are also broken by this. A= s the keyboard layout is used when accepting passphrases for cryptodisks, t= his can leave a user potentially unable to boot at all without expert GRUB = knowledge, if they selected a passphrase including characters not available= on default US keyboard. An alternative solution is to split the `grub.cfg` file into two pieces: on= e containing the bootloader configuration settings, the other containing th= e entries. Then `reinstall-bootloader` just changes the entries. On alternative bootloaders, there is usually little to no configuration. * `depthcharge` - No configuration. * `extlinux` - Only `timeout` configuration. * `u-boot` - Based on `extlinux` (so only `timeout` configuration). So a possible design would be to have a "split" generation of the configura= tion file. This affects how `bootloader-configuration-file-generator` is used, however= . This affects three points: * `gnu/machine/ssh.scm` - This is given a `bootloader-configuration` from t= he actual OS on the machine, so probably OK to use this legacy interface. * `gnu/system.scm` - Like the above, given a `bootloader-configuration` fro= m the actual OS on the machine. * `gnu/scripts/system.scm` - This is the problem point identified before. Yet another solution would be to augment `boot-parameters` with the fields = of `bootloader-configuration`, but that violates DRY --- fields added to `b= ootloader-configuration` in the future need to be added to `boot-parameters= ` as well, so I think this is undesirable. Thanks raid5atemyhomework From debbugs-submit-bounces@debbugs.gnu.org Fri Jul 23 11:32:28 2021 Received: (at 47442) by debbugs.gnu.org; 23 Jul 2021 15:32:28 +0000 Received: from localhost ([127.0.0.1]:44347 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m6xA4-0004QW-98 for submit@debbugs.gnu.org; Fri, 23 Jul 2021 11:32:28 -0400 Received: from mail-4325.protonmail.ch ([185.70.43.25]:24719) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m6xA3-0004QJ-Dn for 47442@debbugs.gnu.org; Fri, 23 Jul 2021 11:32:27 -0400 Date: Fri, 23 Jul 2021 15:32:12 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1627054340; bh=0EKU79L6rGiK8XhzJaYyUmUMOCs1OV/nwQuMN50Hjno=; h=Date:To:From:Reply-To:Subject:In-Reply-To:References:From; b=KaZ7KLCaVJj+UJPsCuoid1Oqmdf9oB1O8sW1QaVepRZ7Sb7CnPtca4fYgSfTemMFa cPnbYXtq5tw9/6piVdA9KBQYMhbSGUchihd5OLIm31ckPNDTntu+sA5b53iq2mssIH vYqBxzIZDRZ75EfGbnn5hIdaW2i4MvWrW4vUbljM= To: "47442@debbugs.gnu.org" <47442@debbugs.gnu.org> From: raid5atemyhomework Subject: Re: guix system delete-generations does not use bootloader configuration Message-ID: In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM shortcircuit=no autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on mailout.protonmail.ch X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 47442 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: , Reply-To: raid5atemyhomework Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Bump.