From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:bcc0::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id SJJsNmAJYGAATAAAgWs5BA (envelope-from ) for ; Sun, 28 Mar 2021 06:43:12 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id EPhJMGAJYGDXRQAAB5/wlQ (envelope-from ) for ; Sun, 28 Mar 2021 04:43:12 +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 3584E8132 for ; Sun, 28 Mar 2021 06:43:12 +0200 (CEST) Received: from localhost ([::1]:57636 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lQNGX-0008Ei-HX for larch@yhetil.org; Sun, 28 Mar 2021 00:43:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36966) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lQNGQ-0008EP-L4 for bug-guix@gnu.org; Sun, 28 Mar 2021 00:43:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:33756) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lQNGQ-0003P1-E5 for bug-guix@gnu.org; Sun, 28 Mar 2021 00:43:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lQNGQ-0003oS-AK for bug-guix@gnu.org; Sun, 28 Mar 2021 00:43:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#47442: guix system delete-generations does not use bootloader configuration Resent-From: raid5atemyhomework Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sun, 28 Mar 2021 04:43:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 47442 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 47442@debbugs.gnu.org X-Debbugs-Original-To: "bug-guix@gnu.org" Received: via spool by submit@debbugs.gnu.org id=B.161690655714622 (code B ref -1); Sun, 28 Mar 2021 04:43:02 +0000 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= Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" Reply-to: raid5atemyhomework X-ACL-Warn: , raid5atemyhomework From: raid5atemyhomework via Bug reports for GNU Guix X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1616906592; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=lIPQX2RJfZnPEsKIaTg7hmq48fAlH4vFt3jA5qsMHBQ=; b=qzjIk7OcM42O4+C6FFEToUMmGNHuMHYEmjIm7lQ7X3TIjuYLAzJogRps3+Tu5BF7uRunP3 6U7RpzSU1B/3wmUS6sYoyLSqz7753jaZebVPrWP/ZdRPUqxP6KxOhqt/JvEFX78I0irlkQ OYU/YXCXzgDJDYf10P61uuHWvFC4FCINyczQiGE0gPX7zRNE6ZRjd4BM2Li/w+x+/SlxlC ceP0/szw1PGkLzjD68jg5H8IOHy8lqHoW0rHjqmmbsi9Vrz9xc8oUIZDmdVIbQdLTWNgyc V/tGubdiQlvDDsaolryBBwmdjE58gpMTq6d6mSGn+OlFwuWvhKBxYalB7H0qKQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1616906592; a=rsa-sha256; cv=none; b=aU2tq/1p2CjBLvOaG7VnZ2bL39W4WJE8/VCx/mktGcPs+ha/kLf7GXcYmt59H1ZLqfT3xb KD+y0Tu3f+hS8ja1ID+RcrYetx2sfWZudAXoH5CMVlJr9hqfeEQ5oAJ+GmYR+t6SkDV6j+ Jy3N1BV2RMAAot4CUMpOP3kdliQi/oabsXAQ0AJYrjsjnAU7E5AF7pzGAz56AkY/oaqMdI Uvhd7IZk26sUUyvZUC0Hs0VXgLGoOfAXaUuk651srVcHd1e2+fx2pdl73VoDvy3wMMIc+u poNv0gB1QqRQOOhgv1twqyV/GVYYyYP6ycIAcDBXwl7lQIu9dwOYjMP57qFQKA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=protonmail.com header.s=protonmail header.b="FgiPRC9/"; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Spam-Score: -2.92 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=protonmail.com header.s=protonmail header.b="FgiPRC9/"; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Queue-Id: 3584E8132 X-Spam-Score: -2.92 X-Migadu-Scanner: scn0.migadu.com X-TUID: 625d9BbiCqLy 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