From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id WOaZDsIEwV8uDwAA0tVLHw (envelope-from ) for ; Fri, 27 Nov 2020 13:53:06 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id aMlpCsIEwV+naAAAbx9fmQ (envelope-from ) for ; Fri, 27 Nov 2020 13:53:06 +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 DEBCB9401BC for ; Fri, 27 Nov 2020 13:53:05 +0000 (UTC) Received: from localhost ([::1]:39572 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kieBM-0002bE-Sw for larch@yhetil.org; Fri, 27 Nov 2020 08:53:04 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:43736) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kiSXO-0007aq-U5 for bug-guix@gnu.org; Thu, 26 Nov 2020 20:27:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:60028) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kiSXO-0005Wn-Mk for bug-guix@gnu.org; Thu, 26 Nov 2020 20:27:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kiSXO-0006G8-Jx for bug-guix@gnu.org; Thu, 26 Nov 2020 20:27:02 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#44898: [wishlist] Make the GRUB installation procedure smarter Resent-From: guixuser6392 Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 27 Nov 2020 01:27:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 44898 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 44898@debbugs.gnu.org X-Debbugs-Original-To: "bug-guix@gnu.org" Received: via spool by submit@debbugs.gnu.org id=B.160644038224003 (code B ref -1); Fri, 27 Nov 2020 01:27:02 +0000 Received: (at submit) by debbugs.gnu.org; 27 Nov 2020 01:26:22 +0000 Received: from localhost ([127.0.0.1]:43339 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kiSWj-0006F4-JT for submit@debbugs.gnu.org; Thu, 26 Nov 2020 20:26:22 -0500 Received: from lists.gnu.org ([209.51.188.17]:36470) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kiQUn-00011p-6z for submit@debbugs.gnu.org; Thu, 26 Nov 2020 18:16:15 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:51042) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kiQUm-0002lB-Lc for bug-guix@gnu.org; Thu, 26 Nov 2020 18:16:13 -0500 Received: from mail-40135.protonmail.ch ([185.70.40.135]:18583) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kiQUh-0001p1-0K for bug-guix@gnu.org; Thu, 26 Nov 2020 18:16:12 -0500 Date: Thu, 26 Nov 2020 23:15:58 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1606432561; bh=EQLLR+rJSf5bbL24GCYDQY/ZbKIPlCXSYNZOCuhaoYE=; h=Date:To:From:Reply-To:Subject:From; b=fxOKqt41BnKKTB64TWZsVgBxQ76Ah5Fd9oj0rWFMUgSjpNCSOj2LUrBnxIuJES0B0 9re2wp9dzfGsk/x63zxSdf3t3WpbJE/O4pqwOc2Wjxr/EjqtTpMY9SekwOXV9/tbkf 6B7FlefvPM581em6e4qLGn9X/3Zs0I3Nz5f2c0VI= Message-ID: <8xxH7oMlchpQqTKfkQXnJPhhoetZDQbFldlVKSNNlELUWA_WMMr3PLEjlUhsjrDQkWPwAinml4aAgLDArwcjehjdt0WrWOh9mPej2TxLgAE=@protonmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=185.70.40.135; envelope-from=guixuser6392@protonmail.com; helo=mail-40135.protonmail.ch X-Spam_score_int: -15 X-Spam_score: -1.6 X-Spam_bar: - X-Spam_report: (-1.6 / 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_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, FREEMAIL_REPLYTO_END_DIGIT=0.25, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.9 (/) X-Mailman-Approved-At: Thu, 26 Nov 2020 20:26:20 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -1.8 (-) X-Mailman-Approved-At: Fri, 27 Nov 2020 08:52:58 -0500 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: guixuser6392 , guixuser6392 From: guixuser6392 via Bug reports for GNU Guix X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -2.77 X-Scanner: ns3122888.ip-94-23-21.eu Authentication-Results: aspmx1.migadu.com; dkim=fail (headers rsa verify failed) header.d=protonmail.com header.s=protonmail header.b=fxOKqt41; 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-TUID: pqxaJZX2ewEJ Every time the operating system is instantiated the GRUB boot-loader is ine= xplicitly re-installed. This behaviour leads to unsolicited changes to the = user's boot configuration on UEFI systems; and leads to unnecessary write o= perations on the ESP, and/or the MBR, which, in case they are abruptly abor= ted during the building of the install-bootloader derivation, can leave the= system in an unbootable state. Futhermore, frequent writes to the platform= 's NV-RAM may negatively impact its lifespan. NixOS stores the GRUB derivation as well as boot parameters in a state file= , and only re-installs the boot-loader if the computed state is different f= rom the stored state: https://github.com/NixOS/nixpkgs/blob/master/nixos/mo= dules/system/boot/loader/grub/install-grub.pl#L626. However, unless I am mi= staken, that alone will not prevent GRUB from altering the user's boot conf= iguration in a scenario, in which we want GRUB to be re-installed because i= t has received an update. To summarize, I think that consecutive grub-install invocations should not = be allowed to modify the user's boot configuration on UEFI systems, and tha= t we should teach Guix to only re-install the boot-loader if the boot param= eters has been changed and/or the GRUB package has been upgraded. Although other boot-loaders are not in the scope of this wish, brining thei= r installation procedures to the same high standard would be beneficial, to= o.